bouwew / sems2mqtt Goto Github PK
View Code? Open in Web Editor NEWThis project forked from hesselonline/sems
GoodWe SEMS MQTT-componenent for Home Assistant
License: MIT License
This project forked from hesselonline/sems
GoodWe SEMS MQTT-componenent for Home Assistant
License: MIT License
Hi,
Can 'state_class' please be added to the appropriate sensor so it can be used in the new Energy Management?
https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics
Thanks!
Logger: homeassistant
Source: custom_components/sems2mqtt/init.py:353
First occurred: 2:33:13 PM (1 occurrences)
Last logged: 2:33:13 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/sems2mqtt/init.py", line 353, in async_get_sems_data
payload = locals()[payload]
KeyError: 'payload_dc_voltage_str_1'
Like i all ready told in discussion i Hass core regularly reboots because there is a problem with the API in sems2mqtt.
Below is a log of Hass core.
`Message: 'Unable to fetch data from the SEMS API,'
Arguments: (KeyError('inverter'), 'not available')
2021-11-01 10:11:25 WARNING (MainThread) [custom_components.sems2mqtt] HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=20)
--- Logging error ---
2021-11-01 10:12:32 ERROR (MainThread) [custom_components.sems2mqtt] Failed to obtain data from the SEMS API
Traceback (most recent call last):
File "/config/custom_components/sems2mqtt/__init__.py", line 207, in async_get_sems_data
data = await getCurrentReadings(station)
File "/config/custom_components/sems2mqtt/__init__.py", line 117, in getCurrentReadings
inverterData = data['inverter'][0]['invert_full']
KeyError: 'inverter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/logging/handlers.py", line 1432, in emit
self.enqueue(self.prepare(record))
File "/usr/local/lib/python3.9/logging/handlers.py", line 1415, in prepare
msg = self.format(record)
File "/usr/local/lib/python3.9/logging/__init__.py", line 927, in format
return fmt.format(record)
File "/usr/local/lib/python3.9/logging/__init__.py", line 663, in format
record.message = record.getMessage()
File "/usr/local/lib/python3.9/logging/__init__.py", line 367, in getMessage
msg = msg % self.args`
Hopefully you can help to fix this problem and if you need more information just ask me.
Gr Kees
Hello,
It seems somewhere in the codes (dont know where) the givin values from sems2mqtt dont match MQTT requirements.
Can you take a look for me.
2021-11-20 12:22:22 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'sems_battery_soh', 'unit_of_measurement': '%', 'value_template': '{{ value_json.battery_soh }}', 'icon': 'mdi:medical-bag', 'state_topic': 'sems/sensors', 'state_class': 'measurement', 'device_class': None, 'unique_id': 'sems_battery_soh_sensor', 'device': {'identifiers': 'Goodwe Inverter', 'name': 'GoodWe Inverter', 'model': 'GW3600D-NS', 'manufacturer': 'GoodWe'}, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 198, in async_discover config = schema(discovery_payload) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 218, in __call__ return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: value must be one of ['aqi', 'battery', 'carbon_dioxide', 'carbon_monoxide', 'current', 'date', 'energy', 'gas', 'humidity', 'illuminance', 'monetary', 'nitrogen_dioxide', 'nitrogen_monoxide', 'nitrous_oxide', 'ozone', 'pm1', 'pm10', 'pm25', 'power', 'power_factor', 'pressure', 'signal_strength', 'sulphur_dioxide', 'temperature', 'timestamp', 'volatile_organic_compounds', 'voltage'] for dictionary value @ data['device_class']
Greets Kees
scan_interval: 150 is not allowed anymore...
Hi there, i have two goodwe inversors in the SEMS page, but once i have configured the integration, only the entities from the Inversor 01 are showing up, can someone help me please? I think its something from the API not getting the 2nd inversor information.
In init.py, the "payload_dc_current_str_" for both 1 and 2 have an incorrect Unit of Measure "'unit_of_meas':'VDC'," as (VDC), when it should actually be A (Amps), or maybe IDC?
Logger: homeassistant.util.async_
Source: util/async_.py:144
First occurred: 8:46:23 AM (53 occurrences)
Last logged: 11:16:53 AM
Detected blocking call inside the event loop. This is causing stability issues. Please report issue to the custom component author for sems2mqtt doing blocking calls at custom_components/sems2mqtt/init.py, line 183: time.sleep((2*i) ** 2)
Logger: homeassistant.components.sensor
Source: components/sensor/init.py:669
Integration: Sensor
Entity sensor.sems_str_1_voltage (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'VDC' which is not a valid unit for the device class ('voltage') it is using; expected one of ['mV', 'V'];
Entity sensor.sems_grid_current (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'IAC' which is not a valid unit for the device class ('current') it is using; expected one of ['A', 'mA'];
Entity sensor.sems_grid_voltage (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'VAC' which is not a valid unit for the device class ('voltage') it is using; expected one of ['mV', 'V'];
PR incoming.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.