Comments (9)
Hi @northalpha this might be more related to #5 - can you try the legacy addon?
It uses SMA-EM directly for a connection
from hassio-sma-em.
Nice, we are one step further to getting this working. Using the legacy 0.5.5
i get:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/pconsume/config'
payload: ('{"name": "pconsume", "dev_cla": "power", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/pconsume", "unit_of_meas": "W", "uniq_id": '
'"300xxxxxxxxx_pconsume", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/pconsumecounter/config'
payload: ('{"name": "pconsumecounter", "dev_cla": "energy", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/pconsumecounter", "unit_of_meas": "kWh", '
'"uniq_id": "300xxxxxxxxx_pconsumecounter", "dev": {"ids": '
'["sma_em_300xxxxxxxxx"], "name": "SMA Energy Meter", "mdl": "Energy Meter", '
'"mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/u1/config'
payload: ('{"name": "u1", "dev_cla": "voltage", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/u1", "unit_of_meas": "V", "uniq_id": '
'"300xxxxxxxxx_u1", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA Energy '
'Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/psupply/config'
payload: ('{"name": "psupply", "dev_cla": "power", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/psupply", "unit_of_meas": "W", "uniq_id": '
'"300xxxxxxxxx_psupply", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/sconsume/config'
payload: ('{"name": "sconsume", "dev_cla": "energy", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/sconsume", "unit_of_meas": "", "uniq_id": '
'"300xxxxxxxxx_sconsume", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/ssupply/config'
payload: ('{"name": "ssupply", "dev_cla": "energy", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/ssupply", "unit_of_meas": "", "uniq_id": '
'"300xxxxxxxxx_ssupply", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/cosphi/config'
payload: ('{"name": "cosphi", "dev_cla": "energy", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/cosphi", "unit_of_meas": "", "uniq_id": '
'"300xxxxxxxxx_cosphi", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/frequency/config'
payload: ('{"name": "frequency", "dev_cla": null, "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/frequency", "unit_of_meas": "Hz", "uniq_id": '
'"300xxxxxxxxx_frequency", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
ic| topic: 'homeassistant/sensor/300xxxxxxxxx/psupplycounter/config'
payload: ('{"name": "psupplycounter", "dev_cla": "energy", "stat_t": '
'"SMA-EM/status/300xxxxxxxxx/psupplycounter", "unit_of_meas": "kWh", "uniq_id": '
'"300xxxxxxxxx_psupplycounter", "dev": {"ids": ["sma_em_300xxxxxxxxx"], "name": '
'"SMA Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
So far, nice! But these Sensors are in "unknown" state, but i have found this in HA logs:
Logger: homeassistant.util.logging
Source: util/logging.py:105
First occurred: 9:41:04 (3 occurrences)
Last logged: 9:44:02
Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'frequency', 'device_class': None, 'state_topic': 'SMA-EM/status/300xxxxxxxxx/frequency', 'unit_of_measurement': 'Hz', 'unique_id': '300xxxxxxxxx_frequency', 'device': {'identifiers': ['sma_em_300xxxxxxxxx'], 'name': 'SMA Energy Meter', 'model': 'Energy Meter', 'manufacturer': 'SMA'}, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 180, in async_discover config = schema(discovery_payload) 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 ['battery', 'carbon_dioxide', 'carbon_monoxide', 'current', 'energy', 'humidity', 'illuminance', 'monetary', 'power', 'power_factor', 'pressure', 'signal_strength', 'temperature', 'timestamp', 'voltage'] for dictionary value @ data['device_class']
Removing u1
and frequency
from measurements list in addon config is not able to get values for the messurement either.
from hassio-sma-em.
device_class
was never implemented for frequency it seems, from your log:
"dev_cla": null
from hassio-sma-em.
Try removing frequency for now
from hassio-sma-em.
Unfortunately same "error" (no values seems to be read or feed into mqtt. I am only using pconsume
in config at this point, I can see that the topic is being created in mosquitto, but no joy until now :(
Addon Log
ic| topic: 'homeassistant/sensor/300xxxxx/pconsume/config'
payload: ('{"name": "pconsume", "dev_cla": "power", "stat_t": '
'"SMA-EM/status/300xxxxx/pconsume", "unit_of_meas": "W", "uniq_id": '
'"300xxxxx_pconsume", "dev": {"ids": ["sma_em_300xxxxx"], "name": "SMA '
'Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}')
Inside Mosquitto:
{"name": "pconsume", "dev_cla": "power", "stat_t": "SMA-EM/status/300xxxxx/pconsume", "unit_of_meas": "W", "uniq_id": "300xxxxx/_pconsume", "dev": {"ids": ["sma_em_300xxxxx/"], "name": "SMA Energy Meter", "mdl": "Energy Meter", "mf": "SMA"}}
from hassio-sma-em.
It works ok for me
Do you see any new errors in HomeAssistant? (You might have to restart HASS/delete the persistent entry in MQTT and restart the addon)
If you use MQTTexplorer/something similar do you see anything posted for the value? SMA-EM/status/300xxxxx/pconsume
?
from hassio-sma-em.
I tried to copy all the connection settings from the ‘legacy’ to the current version
if you still not see values I’ll post some instructions to help debug this
from hassio-sma-em.
@northalpha have you tried the normal version recently?
from hassio-sma-em.
Let me know if you still have an issue
from hassio-sma-em.
Related Issues (20)
- not showing current right HOT 1
- Home Assistant auto-discovery | Can't get it to work HOT 14
- consume and consumecounter have wrong device_class HOT 5
- Resolution of counter Variables HOT 3
- My SMA-meter is not being found HOT 15
- SMA and METER problem solved!!!!! HOT 2
- CPU usage raise up to (100% of one Core of the Host) 50% of HA CPUs and stays until restart this Addon HOT 1
- Can't edit fields HOT 4
- No sensors in the MQTT HOT 5
- Tripower X and SMA-EM HOT 1
- Bekomme plötzlich keine Daten mehr. HOT 3
- How much energy is feed to grid? HOT 1
- Wrong device class for Current. HOT 2
- Add-On suddenly stopped working HOT 8
- Warning: is using native unit of measurement 'A' which is not a valid unit for the device class ('energy') HOT 3
- Could this add-on be used without an MQTT server? HOT 1
- Configure threshold below current minimum of 10 HOT 1
- Energy Meter in a subnet HOT 1
- Advice for manual installation HOT 1
- Fields Documentation HOT 1
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 hassio-sma-em.