Closed pilorain closed 5 months ago
The journal log output shows that the serial device cannot be opened. However I cannot see the reason.
Can you provide the config file for the datacollector after you generated it with the web interface? It is stored on the RPi here: /var/lib/smartmeter-datacollector/datacollector.ini
Here you have datacollector.ini.txt - I did add .txt to attach.
Meanwhile I made a change
sudo nano /boot/config.txt
and add (at the end of the file):
dtoverlay=pi3-miniuart-bt
sudo reboot
thanks to https://www.circuits.dk/setup-raspberry-pi-3-gpio-uart/
journalctl_output.txt
datacollector.ini.txt
BUT in http://192.168.1.116:8000/ "Restart Demo" gives "Request failed." and
in http://192.168.1.116:3000/d/bcf35a89-ef0d-45e4-9359-cdcbf526ab43/l-g-e450?orgId=1&refresh=1m
there is still NO DATA in Grafana.
Since you see the blue bar chart "Zählerstand Tarife" there must be data received by Grafana. Did you check other time spans like "last 2 days" for samples? Maybe it is a timestamp issue.
You can also enable the DEBUG log in the smartmeter-datacollector. This lets you inspect the received data from the meter including the timestamps. You may do this with the web interface or by manually modifying the config file /var/lib/smartmeter-datacollector/datacollector.ini
, see https://github.com/scs/smartmeter-datacollector/wiki/Configuration#logging-settings.
Thanks, I did enable the DEBUG log and I got this kind of data: Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:smartmeter:DLMS packet complete and ready for parsing. Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:smartmeter:40 0.9.25.9.0.255 1: 0.9.25.9.0.255 Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:smartmeter:3 1.1.1.8.1.255 2: 1207297 Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:smartmeter:3 1.1.1.8.2.255 2: 939710 Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:smartmeter:3 1.1.2.8.1.255 2: 556720 Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:smartmeter:3 1.1.2.8.2.255 2: 337098 Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:sink:{"value": 1207297.0, "timestamp": 1706985480} sent to MQTT broker. Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:sink:{"value": 939710.0, "timestamp": 1706985480} sent to MQTT broker. Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:sink:{"value": 556720.0, "timestamp": 1706985480} sent to MQTT broker. Feb 03 19:37:59 rpi-lge450 smartmeter-datacollector[1493]: DEBUG:sink:{"value": 337098.0, "timestamp": 1706985480} sent to MQTT broker.
I do not want to struggle with Grafana because next step will be to send smartmeter-datacollector's data to my Home Assistant platform.
The four above values matches the four indexes I can manually read on the LG-E450. So issue as stated in title is fixed. It was not a bug but the way to config serial and UART on Raspberry Pi 3.
In that case your meter only sends these 4 values about the energy meter readings ("Zählerstand") and no actual power information. 1.1.1.8.1 is imported energy until now in tariff 1 (high-tariff?), 1.1.1.8.2 is same for tariff2 (low-tariff?), 1.1.2.8.1 is exported energy up to now in tariff 1, 1.1.2.8.1 is same for tariff2 If you let HomeAssistant compute the derivative you get a rough estimation of the current power you consume/produce.
Check https://github.com/scs/smartmeter-datacollector/discussions/57 where someone has successfully integrated this project into their HA system.
LG-E450 was installed in Switzerland by Romande-Energie who gives "Spécifications techniques Landis.pdf" telling data are pushed every 5 seconds on RJ12.
I have bought a TTL to MBUS slave module (1) which is wired from RJ12 to Raspberry Pi 3B+ on GPIO pins 14 & 15 (UART).
A small "serial_read.py" (b) prints a salve of data (c) every 5 seconds according to above specs, so hardware should be OK. Note that Rpi MUST be configure with sudo raspi-config on "3 Interface Options", "I6 Serial Port..." No, Yes to get : "The serial login shell is disabled" & "The serial interface is enabled".
Now I was confident to try the "Demo (Raspberry Pi Image)" but unfortunately it gives NO DATA on Grafana Webinterface.
Thanks in advance for your help.
Steps to reproduce :