Comments (7)
Hi, there is not much I can do with this level of info, but you could try:
- turn on the watchdog (if the energy meter extension crashes)
- set the debug flag in config (then the log should print readings)
- use mqtt explorer to see if something gets pushed to mqtt
from hassio-sma-em.
I have turned on Watchdog. I suppose that the extension actually doesn't crash.
As soon as I restart the extension, data gets populated, both for the extension itself and MQTT.. I see the values in both logs properly.
(then the log should print readings)
No errors printed, it just stops populating.
Here are a few lines of the log of MQTT. They won't help much but just wanted to show how it is.
1617791441: Client SMA-EM@6a2c1c7a-sma-em disconnected.
1617791447: New connection from 192.168.1.201 on port 1883.
1617791447: New client connected from 192.168.1.201 as SMA-EM@6a2c1c7a-sma-em (p2, c1, k60, u'mqtt').
1617791447: Client SMA-EM@6a2c1c7a-sma-em disconnected.
1617791452: New connection from 192.168.1.201 on port 1883.
1617791452: New client connected from 192.168.1.201 as SMA-EM@6a2c1c7a-sma-em (p2, c1, k60, u'mqtt').
1617791452: Client SMA-EM@6a2c1c7a-sma-em disconnected.
1617791457: New connection from 192.168.1.201 on port 1883.
1617791457: New client connected from 192.168.1.201 as SMA-EM@6a2c1c7a-sma-em (p2, c1, k60, u'mqtt').
1617791457: Client SMA-EM@6a2c1c7a-sma-em disconnected.
1617792818: Saving in-memory database to /data/mosquitto.db.
--- END OF LOG
And here the last logs of the extension
mqtt: sma-em topic SMA-EM/status/3009876046 data published 10:29:45:{"pconsume": 0.0, "pconsumecounter": 652.2551, "u1": 227.269, "timestamp": 1617791385.2000964}
mqtt: publishing SMA-EM/status/3009876046/pconsume:0.0
mqtt: publishing SMA-EM/status/3009876046/pconsumecounter:652.2551
mqtt: publishing SMA-EM/status/3009876046/u1:227.269
mqtt: publishing SMA-EM/status/3009876046/timestamp:1617791385.2000964
mqtt: ssl disabled
mqtt: sma-em topic SMA-EM/status/3009876046 data published 10:29:50:{"pconsume": 0.0, "pconsumecounter": 652.2551, "u1": 227.371, "timestamp": 1617791390.4012456}
mqtt: publishing SMA-EM/status/3009876046/pconsume:0.0
mqtt: publishing SMA-EM/status/3009876046/pconsumecounter:652.2551
mqtt: publishing SMA-EM/status/3009876046/u1:227.371
mqtt: publishing SMA-EM/status/3009876046/timestamp:1617791390.4012456
mqtt: ssl disabled
--- END OF LOG
You can see that time kinda matches up.. and there is no error telling why it's not populating anymore. Are there other places where I could debug errors?
The expected behaviour of this extension is to run endlessly, polling data constantly, correct?
from hassio-sma-em.
I believe I need to get into coding myself. I had a look at your run.py
and it actually looks ok. I need to check if the Docker maybe crashes or if there is any issue with the code itself locally.
If you have any insights from your side, still let me know ;-)
from hassio-sma-em.
I wrote my own client in Node to listen to the SMA-EM multicast in my local environment and figured out that the connection drops after several minutes (around 3-6) as well, just like I described above. I am unsure whether this is related to my local network or the SMA-EM in general. I am closing this since I am sure this problem is not related to your code.
from hassio-sma-em.
@pabera you could maybe try the dev version. It is on the same repo
It now uses an asynchronous way to read the data from the socket and it might give better results… it should also allow the addition of a timeout for the read (in which case we can restart the multicast group subscription)
from hassio-sma-em.
Thanks for this updated work. I like the fact that you have introduced a threshold.
Unfortunately, my original issue persists. The software reports for 4-5 minutes and then stops. I will check you code and check if I can make PR to have an optional reconnect similar to I have solved the problem in my Node test.
from hassio-sma-em.
No idea what could cause that.
Works well on my pi4, wired with a static IP, but also worked for longer on my laptop, on wifi, with DHCP.
Even if you simply exit the app when you dont get an update the watchdog should restart and allow it to continue.
from hassio-sma-em.
Related Issues (20)
- 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
- High CPU Usage
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.