ebaauw / homebridge-p1

Homebridge plugin for DSMR end-consumer (P1) interface
Apache License 2.0
53 stars 11 forks source link

No Homebridge Accessoires loaded for homebridge P1 after startup #67

Closed eronnes closed 1 year ago

eronnes commented 1 year ago

Who could help me, first I had an issue with the USB port. I managed to work around that. It looks like all error messages are gone in the log of the startup. But I see no Homebridge Accessoires coming up for the P1 results.

[31-12-2022 17:41:55] [P1] Initializing P1 platform... [31-12-2022 17:41:55] [P1] homebridge-p1 v1.2.28, node v18.12.1, homebridge v1.6.0, homebridge-lib v6.0.2 [31-12-2022 17:41:55] [P1] hardware: Raspberry Pi 4B 1.5 (8GB) [31-12-2022 17:41:55] [P1] os: Raspbian GNU/Linux 11 (bullseye) [31-12-2022 17:41:57] [P1] connected to /dev/ttyUSB0

When did set the timeout on 75 I did see a message: "[31-12-2022 17:35:27] [P1] warning: ignoring invalid telegram"

ebaauw commented 1 year ago

The accessories are created only after Homebridge P1 has received a valid telegram.

eronnes commented 1 year ago

Only this message shows up:

[1-1-2023 02:00:29] [P1] warning: ignoring invalid telegram [1-1-2023 02:00:29] [P1] warning: heartbeat 25529, drift 2875 [1-1-2023 02:00:29] [P1] warning: heartbeat 25530, drift 1878 [1-1-2023 02:00:29] [P1] warning: heartbeat 25531, drift 880 [1-1-2023 03:36:09] [P1] warning: ignoring invalid telegram [1-1-2023 03:36:09] [P1] warning: heartbeat 31271, drift 893 [1-1-2023 04:26:34] [P1] warning: ignoring invalid telegram [1-1-2023 04:26:34] [P1] warning: heartbeat 34297, drift 409 [1-1-2023 04:50:47] [P1] warning: ignoring invalid telegram [1-1-2023 05:02:18] [P1] warning: ignoring invalid telegram [1-1-2023 05:26:51] [P1] warning: ignoring invalid telegram [1-1-2023 05:26:51] [P1] warning: heartbeat 37914, drift 429 [1-1-2023 05:40:43] [P1] warning: ignoring invalid telegram

ebaauw commented 1 year ago

Homebridge P1 doesn’t receive any valid data from your smart meter. What version of DSMR does the meter provide? Did you try the dsmr22 setting?

Did you check your cable with another data logger? Are you sure the cable is on ttyUSB0? Did you specify that or is it discovered automatically? See http://gejanssen.com/howto/Slimme-meter-uitlezen/ for more info on the cable, and how to check that it works using cu.

if you run Homebridge in DEBUG mode and don’t specify serialPort, Homebridge P1 should log the discovered serial ports and received data.

eronnes commented 1 year ago

Homebridge P1 doesn’t receive any valid data from your smart meter. What version of DSMR does the meter provide? Did you try the dsmr22 setting?

YES, did try dsmr22, but also no result. By the way, my smart meter is the Landis E350, so it should not be a dsmr22 setting.

Did you check your cable with another data logger? Are you sure the cable is on ttyUSB0?

Yes, one of the four USB's on the raspberry PI, if I run the command it shows connected, but then it stops: cu -l /dev/ttyUSB0 -s 9600 --parity=none Connected.

Did you specify that or is it discovered automatically? -> BOTH !!!!

ebaauw commented 1 year ago

my smart meter is the Landis E350, so it should not be a dsmr22 setting.

Does the meter have a sticker with the DSMR version? I think DSMR is typically provided by a pluggable module, so I'm not sure the meter model determines the DSMR version in all cases.

cu -l /dev/ttyUSB0 -s 9600 --parity=none Connected.

"Connected" just means cu has opened the USB0 device. It will probably say the same for the other USB ports. Do you see any telegrams being reported? Note that 9600 baud is the DSMR 2.2 setting; if your meter indeed does DSMR 4 or 5, it should be 115200.

eronnes commented 1 year ago

Thank you for your (quick) response. I've checked for a sticker and found one. It's DSMR 4.0

eronnes commented 1 year ago

Could it be that the cable is not compatible with the Landis E350. I ordered this one: https://elektronicavoorjou.nl/product/p1-slimme-meter-kabel-iskra-am550/

It looks like this is specific for the AM550, I expect that this is the problem!

ebaauw commented 1 year ago

Seems plausible. The regular P1 cable crosses two of the wires with respect to a regular serial cable, and it needs a resistor to indicate that something is connected, so the DSMR meter starts sending data.

eronnes commented 1 year ago

Thank you, I've asked the supplier to change the cable against the correct one. He is willing to do this, so let's try it again as soon as I receive the correct cable to connect the P1 port.