Comments (4)
I agree with you -- based on the error message, it looks like HA failed to download the elasticsearch
client dependency. I'm on HA 0.74
right now, but let me test on a fresh install of 0.77
to see if I can reproduce.
Sorry to ask the obvious, but have you tried restarting HA to see if that fixes the problem?
Otherwise, are you able to check if the elasticsearch
package is installed by HA? (see https://developers.home-assistant.io/docs/en/creating_component_deps_and_reqs.html#requirements)
from homeassistant-elasticsearch.
I think we just saw a typical example of PEBKAC here. So now it loads as it should but I see the following error now:
2018-09-02 07:48:00 ERROR (MainThread) [custom_components.elastic] Error publishing documents to Elasticsearch: ({'domain': 'zwave', 'entity_id': 'e2_kontor_varme_gulvtermostat', 'attributes': {'node_id': 19, 'node_name': 'Kontor Gulvvarme', 'manufacturer_name': 'ThermoFloor AS', 'product_name': 'Heatit Thermostat TF 021', 'query_stage': 'Complete', 'is_awake': True, 'is_ready': True, 'is_failed': False, 'is_info_received': True, 'max_baud_rate': 40000, 'is_zwave_plus': True, 'capabilities': {'listening', 'zwave_plus', 'beaming', 'routing'}, 'neighbors': {128, 1, 8, 9, 10, 13, 21, 24, 27, 28, 29, 36, 38, 73, 84, 111, 118, 119, 120, 121, 122, 125}, 'sentCnt': 12, 'sentFailed': 0, 'retries': 0, 'receivedCnt': 29, 'receivedDups': 2, 'receivedUnsolicited': 22, 'sentTS': '2018-09-02 07:32:26:942 ', 'receivedTS': '2018-09-02 07:47:02:627 ', 'lastRequestRTT': 119, 'averageRequestRTT': 80, 'lastResponseRTT': 134, 'averageResponseRTT': 100, 'friendly_name': 'Kontor Gulvvarme'}, 'time': datetime.datetime(2018, 9, 2, 5, 47, 2, 739831, tzinfo=), 'value': 'ready'}, TypeError("Unable to serialize {'listening', 'zwave_plus', 'beaming', 'routing'} (type: <class 'set'>)",))
Traceback (most recent call last):
File "/config/deps/lib/python3.6/site-packages/elasticsearch/serializer.py", line 52, in dumps
separators=(',', ':'),
File "/usr/local/lib/python3.6/site-packages/simplejson/init.py", line 399, in dumps
**kw).encode(obj)
File "/usr/local/lib/python3.6/site-packages/simplejson/encoder.py", line 296, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.6/site-packages/simplejson/encoder.py", line 378, in iterencode
return _iterencode(o, 0)
File "/config/deps/lib/python3.6/site-packages/elasticsearch/serializer.py", line 34, in default
raise TypeError("Unable to serialize %r (type: %s)" % (data, type(data)))
TypeError: Unable to serialize {'listening', 'zwave_plus', 'beaming', 'routing'} (type: <class 'set'>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/elastic.py", line 205, in do_publish
bulk_response = bulk(self._gateway.get_client(), actions)
File "/config/deps/lib/python3.6/site-packages/elasticsearch/helpers/init.py", line 257, in bulk
for ok, item in streaming_bulk(client, actions, *args, **kwargs):
File "/config/deps/lib/python3.6/site-packages/elasticsearch/helpers/init.py", line 180, in streaming_bulk
client.transport.serializer):
File "/config/deps/lib/python3.6/site-packages/elasticsearch/helpers/init.py", line 64, in _chunk_actions
data = serializer.dumps(data)
File "/config/deps/lib/python3.6/site-packages/elasticsearch/serializer.py", line 55, in dumps
raise SerializationError(data, e)
elasticsearch.exceptions.SerializationError: ({'domain': 'zwave', 'entity_id': 'e2_kontor_varme_gulvtermostat', 'attributes': {'node_id': 19, 'node_name': 'Kontor Gulvvarme', 'manufacturer_name': 'ThermoFloor AS', 'product_name': 'Heatit Thermostat TF 021', 'query_stage': 'Complete', 'is_awake': True, 'is_ready': True, 'is_failed': False, 'is_info_received': True, 'max_baud_rate': 40000, 'is_zwave_plus': True, 'capabilities': {'listening', 'zwave_plus', 'beaming', 'routing'}, 'neighbors': {128, 1, 8, 9, 10, 13, 21, 24, 27, 28, 29, 36, 38, 73, 84, 111, 118, 119, 120, 121, 122, 125}, 'sentCnt': 12, 'sentFailed': 0, 'retries': 0, 'receivedCnt': 29, 'receivedDups': 2, 'receivedUnsolicited': 22, 'sentTS': '2018-09-02 07:32:26:942 ', 'receivedTS': '2018-09-02 07:47:02:627 ', 'lastRequestRTT': 119, 'averageRequestRTT': 80, 'lastResponseRTT': 134, 'averageResponseRTT': 100, 'friendly_name': 'Kontor Gulvvarme'}, 'time': datetime.datetime(2018, 9, 2, 5, 47, 2, 739831, tzinfo=), 'value': 'ready'}, TypeError("Unable to serialize {'listening', 'zwave_plus', 'beaming', 'routing'} (type: <class 'set'>)",))
It creates indexes as it should I think because I see data in ELK:
from homeassistant-elasticsearch.
Thanks for the followup @MrBoggi!
It looks like you've found a bug -- I am not serializing python sets
correctly. I've opened #26 to track this.
from homeassistant-elasticsearch.
Closing as the original issue was resolved 👍
from homeassistant-elasticsearch.
Related Issues (20)
- Investigate removing YAML config HOT 1
- ES and Kibana bootstrapping fails in certain Docker configurations
- Publishing All States doesn't fire if there are no state/attribute changes in the queue
- Cache sanitized datastream and attribute names HOT 1
- Consider removing some core attributes that duplicate other fields
- Strict dynamic mapping is going to cause issues HOT 2
- Component is broken in 2024.5 HOT 1
- Add simple entity publishing benchmark test
- manifest.json version is out of date HOT 1
- Update doc site for 2.0 release
- Support publishing to multiple clusters HOT 1
- Improve Benchmarking suite
- Clean-up follow-ups from Floors PR
- Entity area should default to device area
- `hass.object_id` should be a property of the `entity` HOT 2
- state.class vs state.value
- device.entity, entity.device or entity,device?
- Automatically rollover datastreams when index template changes
- Missing component diagnostics HOT 1
- Switch to Mypy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-elasticsearch.