Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data from sml smartmeter to nodered #50

Open
Reiseradler opened this issue Feb 3, 2023 · 13 comments
Open

No data from sml smartmeter to nodered #50

Reiseradler opened this issue Feb 3, 2023 · 13 comments

Comments

@Reiseradler
Copy link

Hello,

I am running noderd on a raspberry pi 4 as docker container (as well as mosquitto, timescaledb and grafana). But I fail to get data from a smartmeter (sml) into nodered. The raspi is connected to an optical sensor via usb cable and I get data on the raspi (sudo cat /dev/ttyUSB0 | od -tx1).

I do not find any parameter configuration for the smartmeter node to get any data into nodered. Below you see the 2 nodes flow as well as the properties of the smartmeter node (connection details: 9600 Baud rate, 8N1 - should be fine since it is from the manual and already worked before).

Thank you very much in advance!

nodered_smartmeter
smartmeter-node_properties
smartmeter-node_connection-properties

@coolchip
Copy link
Owner

coolchip commented Feb 8, 2023

I've never done this but you have to give the docker container access to your serial device (/dev/ttyUSB0). Without this, the docker container isn't able to use it. I've found this with a google search:
https://www.losant.com/blog/how-to-access-serial-devices-in-docker

@Reiseradler
Copy link
Author

Thank you very much for your help! Due to your hint I am already one step further.

To check the serial device connection with the docker container I have installed serialport in nodered. After some adjustments (I am not anymore sure which were the important ones) the serialport node in nodered could connect to /dev/ttyUSB0. Now, I get values - strang ones - from my serial device into nodered.

But for the smartmeter node I still get no values even though the parameters are the same than from the serialport node. Do you have any idea?
picture_nodered_smartmeter_serialport

@Reiseradler Reiseradler changed the title Do data from sml smartmeter to nodered No data from sml smartmeter to nodered Feb 12, 2023
@coolchip
Copy link
Owner

Did you completely disable or remove the serial node before using the smartmeter-node? Only one can access a serial port at a time.

@Reiseradler
Copy link
Author

Thank you so much!!!
Since deleting the test node "serialport", everything works perfect.

@ToboCop81
Copy link

ToboCop81 commented Feb 20, 2023

I have the exact same problem - at first I used the wrong serial port - but I was able to fix it. Then I tested it using the serial node and recieved encoded SML data.
But when use the smartmeter node it only shows the following debug message after a view minutes:

"smartmeter-obis error: Error: No or too long answer from Serial Device after last request."

And yes I did delete the serial node and its config node before I used the smartmeter node. - But this did not fix my problem
I have an SGM-C4 Meter:
https://www.efr.de/en/products/smart-energy-devices/electronic-electricity-meters/mme-en/sgm-c4/

I run node-red on a SmartManager Basic from STV:
https://www.stv-electronic.de/produkt/smart-manager-basic/

I use the UART SmartMeterReader from bitShake (directly connected to the second UART port of the SmartManager:
https://amzn.eu/d/cYfLvwk

@ToboCop81
Copy link

Here are some scrrenshots of my configuration of the serial node and the payload which is returned in this case:

grafik

grafik

@coolchip
Copy link
Owner

Thank you so much!!! Since deleting the test node "serialport", everything works perfect.

That's fine. Enjoy it.

@coolchip
Copy link
Owner

Here are some scrrenshots of my configuration of the serial node and the payload which is returned in this case:

What is your configuration of the smartmeter-node?

@ToboCop81
Copy link

ToboCop81 commented Feb 20, 2023

It is the same configuration which @Reiseradler uses:
grafik

grafik

@coolchip
Copy link
Owner

The manual of your smartmeter says, that it is using the D0 protocol on the optical interface. You have selected "sml".
Screenshot_20230220-210208

@ToboCop81
Copy link

Ok that's interesting - because I found a hint to SML in this product manual:
FR-SGM-C4-Produkthandbuch.pdf

Can you provide a link to this manual you found please?
I will try the D0 protocol settings and let you know.

@ToboCop81
Copy link

Hi - ich schreibe jetzt auch mal auf Deutsch weiter... Habe die Angabe in dem Datenblatt gefunden - da steht tatsächlich D0 Protokoll. - Im Produkthandbuch steht aber, dass die optische Schnittstelle mit SML arbeitet.. da gibt es wohl einen Widerspruch in der Doku...

Habe mal auf D0 umgestellt - das ist das Ergebnis:
grafik

@ToboCop81
Copy link

Dieser Forums-Thread könnte evtl auch hilfreich sein (ich selbst steige da noch nicht ganz durch):
https://www.photovoltaikforum.com/thread/158054-libsml-error-unrecognized-sequence-beim-smartmeter-efr-sgm-c4/

Wäre für noch einen Tipp Dankbar :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants