Closed md7automation closed 4 years ago
Hello, I have the same problem as decribed by md7automation
Log Details (ERROR) Fri Aug 09 2019 23:12:29 GMT+0200 (sentraleuropeisk sommertid) Exception in async_discover_sensor when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'voltronic_Inverter_mode', 'unit_of_measurement': '', 'state_topic': 'homeassistant/sensor/voltronic_Inverter_mode', 'icon': 'mdi:solar-power', 'retain': True, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 81, in async_discover_sensor config = PLATFORM_SCHEMA(discovery_payload) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 267, in call return self._compiled([], data) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['retain']
And
Log Details (ERROR) Fri Aug 09 2019 23:12:30 GMT+0200 (sentraleuropeisk sommertid) Exception in async_discover_sensor when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'voltronic', 'state_topic': 'homeassistant/sensor/voltronic', 'retain': True, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 81, in async_discover_sensor config = PLATFORM_SCHEMA(discovery_payload) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 267, in call return self._compiled([], data) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['retain']
And so on, and this is what it puts to the mqtt topic
ubuntu@ubuntu:~$ mosquitto_sub -h 192.168.10.156 -v -t "homeassistant/#" homeassistant/sensor/voltronic_Inverter_mode/config { "name": "voltronic_Inverter_mode", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_Inverter_mode", "icon": "mdi:solar-power", "retain": true } homeassistant/sensor/voltronic_AC_grid_voltage/config { "name": "voltronic_AC_grid_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_AC_grid_voltage", "icon": "mdi:power-plug", "retain": true } homeassistant/sensor/voltronic_AC_grid_frequency/config { "name": "voltronic_AC_grid_frequency", "unit_of_measurement": "Hz", "state_topic": "homeassistant/sensor/voltronic_AC_grid_frequency", "icon": "mdi:current-ac", "retain": true } homeassistant/sensor/voltronic_AC_out_voltage/config { "name": "voltronic_AC_out_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_AC_out_voltage", "icon": "mdi:power-plug", "retain": true } homeassistant/sensor/voltronic_AC_out_frequency/config { "name": "voltronic_AC_out_frequency", "unit_of_measurement": "Hz", "state_topic": "homeassistant/sensor/voltronic_AC_out_frequency", "icon": "mdi:current-ac", "retain": true } homeassistant/sensor/voltronic_PV_in_voltage/config { "name": "voltronic_PV_in_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_PV_in_voltage", "icon": "mdi:solar-panel-large", "retain": true } homeassistant/sensor/voltronic_PV_in_current/config { "name": "voltronic_PV_in_current", "unit_of_measurement": "A", "state_topic": "homeassistant/sensor/voltronic_PV_in_current", "icon": "mdi:solar-panel-large", "retain": true } homeassistant/sensor/voltronic_PV_in_watts/config { "name": "voltronic_PV_in_watts", "unit_of_measurement": "W", "state_topic": "homeassistant/sensor/voltronic_PV_in_watts", "icon": "mdi:solar-panel-large", "retain": true } homeassistant/sensor/voltronic_PV_in_watthour/config { "name": "voltronic_PV_in_watthour", "unit_of_measurement": "Wh", "state_topic": "homeassistant/sensor/voltronic_PV_in_watthour", "icon": "mdi:solar-panel-large", "retain": true } homeassistant/sensor/voltronic_SCC_voltage/config { "name": "voltronic_SCC_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_SCC_voltage", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Load_pct/config { "name": "voltronic_Load_pct", "unit_of_measurement": "%", "state_topic": "homeassistant/sensor/voltronic_Load_pct", "icon": "mdi:brightness-percent", "retain": true } homeassistant/sensor/voltronic_Load_watt/config { "name": "voltronic_Load_watt", "unit_of_measurement": "W", "state_topic": "homeassistant/sensor/voltronic_Load_watt", "icon": "mdi:chart-bell-curve", "retain": true } homeassistant/sensor/voltronic_Load_watthour/config { "name": "voltronic_Load_watthour", "unit_of_measurement": "Wh", "state_topic": "homeassistant/sensor/voltronic_Load_watthour", "icon": "mdi:chart-bell-curve", "retain": true } homeassistant/sensor/voltronic_Load_va/config { "name": "voltronic_Load_va", "unit_of_measurement": "VA", "state_topic": "homeassistant/sensor/voltronic_Load_va", "icon": "mdi:chart-bell-curve", "retain": true } homeassistant/sensor/voltronic_Bus_voltage/config { "name": "voltronic_Bus_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Bus_voltage", "icon": "mdi:details", "retain": true } homeassistant/sensor/voltronic_Heatsink_temperature/config { "name": "voltronic_Heatsink_temperature", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_Heatsink_temperature", "icon": "mdi:details", "retain": true } homeassistant/sensor/voltronic_Battery_capacity/config { "name": "voltronic_Battery_capacity", "unit_of_measurement": "%", "state_topic": "homeassistant/sensor/voltronic_Battery_capacity", "icon": "mdi:battery-outline", "retain": true } homeassistant/sensor/voltronic_Battery_voltage/config { "name": "voltronic_Battery_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Battery_voltage", "icon": "mdi:battery-outline", "retain": true } homeassistant/sensor/voltronic_Battery_charge_current/config { "name": "voltronic_Battery_charge_current", "unit_of_measurement": "A", "state_topic": "homeassistant/sensor/voltronic_Battery_charge_current", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Battery_discharge_current/config { "name": "voltronic_Battery_discharge_current", "unit_of_measurement": "A", "state_topic": "homeassistant/sensor/voltronic_Battery_discharge_current", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Load_status_on/config { "name": "voltronic_Load_status_on", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_Load_status_on", "icon": "mdi:power", "retain": true } homeassistant/sensor/voltronic_SCC_charge_on/config { "name": "voltronic_SCC_charge_on", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_SCC_charge_on", "icon": "mdi:power", "retain": true } homeassistant/sensor/voltronic_AC_charge_on/config { "name": "voltronic_AC_charge_on", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_AC_charge_on", "icon": "mdi:power", "retain": true } homeassistant/sensor/voltronic_Battery_recharge_voltage/config { "name": "voltronic_Battery_recharge_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Battery_recharge_voltage", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Battery_under_voltage/config { "name": "voltronic_Battery_under_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Battery_under_voltage", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Battery_bulk_voltage/config { "name": "voltronic_Battery_bulk_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Battery_bulk_voltage", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Battery_float_voltage/config { "name": "voltronic_Battery_float_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Battery_float_voltage", "icon": "mdi:current-dc", "retain": true } homeassistant/sensor/voltronic_Max_grid_charge_current/config { "name": "voltronic_Max_grid_charge_current", "unit_of_measurement": "A", "state_topic": "homeassistant/sensor/voltronic_Max_grid_charge_current", "icon": "mdi:current-ac", "retain": true } homeassistant/sensor/voltronic_Max_charge_current/config { "name": "voltronic_Max_charge_current", "unit_of_measurement": "A", "state_topic": "homeassistant/sensor/voltronic_Max_charge_current", "icon": "mdi:current-ac", "retain": true } homeassistant/sensor/voltronic_Out_source_priority/config { "name": "voltronic_Out_source_priority", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_Out_source_priority", "icon": "mdi:grid", "retain": true } homeassistant/sensor/voltronic_Charger_source_priority/config { "name": "voltronic_Charger_source_priority", "unit_of_measurement": "", "state_topic": "homeassistant/sensor/voltronic_Charger_source_priority", "icon": "mdi:solar-power", "retain": true } homeassistant/sensor/voltronic_Battery_redischarge_voltage/config { "name": "voltronic_Battery_redischarge_voltage", "unit_of_measurement": "V", "state_topic": "homeassistant/sensor/voltronic_Battery_redischarge_voltage", "icon": "mdi:battery-negative", "retain": true } homeassistant/sensor/voltronic/config { "name": "voltronic", "state_topic": "homeassistant/sensor/voltronic", "retain": true
Hello, I have the same error. My sensor show nothing but "-". Thank you for your hard work.
Hi guys,
Can you try and run inverter_poller -d -1
directly, and see what it returns?
Im getting below error whrn adding to home assitant
19-09-13 04:12:54 INFO (MainThread) [hassio.store.git] Clone add-on https://github.com/ned-kelly/docker-voltronic-homeassistant repository 19-09-13 04:12:58 ERROR (MainThread) [hassio.utils.json] Can't read json from /data/addons/git/aa1df823/repository.json: [Errno 2] No such file or directory: '/data/addons/git/aa1df823/repository.json' 19-09-13 04:12:58 WARNING (MainThread) [hassio.store.data] Can't read repository information from /data/addons/git/aa1df823/repository.json 19-09-13 04:12:59 INFO (MainThread) [hassio.store] Load add-ons from store: 60 all - 0 new - 0 remove
Hi @manju850,
The project as it currently stands is not setup for Hass.io, the idea here is that you manually clone/run the project on a SBC of your choice (Raspberry/Orange Pi etc) and then integrate the MQTT data into your HA deployment using Sensors etc...
If you want to make the relevant changes and submit a PR for native Hass.io integration please do! - I'm just running 'bare-bones' HomeAssistant in Docker without Hass.io so am unable to test/support this for now, sorry.
Hi @md7automation,
Forgot to mention that the data['retain']
key that was sent with the MQTT data has now been removed (with the most recent update of the code) which will fix this issue - It was a recent feature added into HA.
Closing as this should fix the original issue - @manju850 please open a new Issue for your comments about Haas.io so other users can also follow your progress :)
Cheers,
ERROR (MainThread) [homeassistant.components.mqtt.sensor] Exception in async_discover_sensor when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'voltronic_Load_watt', 'unit_of_measurement': 'W', 'state_topic': 'homeassistant/sensor/voltronic_Load_watt', 'icon': 'mdi:chart-bell-curve', 'retain': True, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/app/homeassistant/components/mqtt/sensor.py", line 61, in async_discover_sensor config = PLATFORM_SCHEMA(discovery_payload) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 267, in call return self._compiled([], data) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['retain']
Please could you update your code or advise ?