ebaauw / homebridge-p1

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

Eve - at a glance - L1 and Total Delivered linked? #33

Closed stannie closed 3 years ago

stannie commented 3 years ago

Might very well be an Eve (-only) issue - but I saw that whenever I turn off "Electricity Delivered" (yes, I have solar panels) it also turns off "Electricity Delivered L1" and vice versa. Same with sorting, they seem to be glued together. Reporting it here as it might be an issue with (unique) IDs of the parameters as reported to Homebridge. Saw something similar with the electricity consumption parameters.

If you think is just the Eve app - sorry to waste anyone's time!

ebaauw commented 3 years ago

I’m not sure I follow. What do you mean by “turn off”? Homebridge P1 doesn’t expose any On characteristic.

Do you have 3-phase electricity in combination with solar panels? I don't think I've seen that before, could you please run homebridge -D can capture the debug messages that log the telegram on startup?

For 3-phase electricity, Homebridge P1 exposes Electricity (and Electricity Delivered) as a single HomeKit accessory, with four services, one main and and per phase. I think Eve should show a line per service in the room view, but when detailing one of those lines, it shows the characteristics from all services. Sometimes it shows headers for the various services, but sometimes it doesn't (I suspect this to be related to exposing history). In that case, Eve usually won't let you sort the characteristics.

ebaauw commented 3 years ago

Or do you mean by "turn" off setting the Log Level to 0? Yes, that's implemented on the accessory level, so the setting works for all four services, even though it's exposed through the main service.

stannie commented 3 years ago

Ah yes, should have said "starred" or made visible in "At a Glance" instead of "turn on". I added a screen recording to illustrate here.

Here you first see that if at 0:13 I move L1 above L3 it moves the Total as well. Also at 0:20 I move L2 above L3 (wanting to put them in order) but it flips back to below it. Finally at 0:40 if I "unstar" the Total Delivered, touch Done and then Edit again, you see that L1 is off too.

Could it be related to the way the "cooked object" is created here? https://github.com/ebaauw/homebridge-p1/blob/2403c790e751c2a350625e1d743d08ccb1eaadd2/lib/P1Client.js#L465

But it's most probably an issue in the Eve app. I noticed similar behavior with the consumed electricity when I first used Eve together with Homebridge and this plugin.

I indeed have 3-phase electricity in combination with solar panels, installed them last week, and the panels (and their micro-inverters) are distributed over the 3 phases, and indeed show up as separate lines in the room view, see below.

photo_2020-08-10 09 28 49

The -D log:

[10/08/2020, 08:14:02] [P1] telegram:
ISK5\2M550T-1012

1-3:0.2.8(50)
0-0:1.0.0(200810091404S)
0-0:96.1.1(4530303434303036393635343739353137)
1-0:1.8.1(009010.200*kWh)
1-0:1.8.2(010835.254*kWh)
1-0:2.8.1(000035.610*kWh)
1-0:2.8.2(000041.138*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.000*kW)
1-0:2.7.0(00.951*kW)
0-0:96.7.21(00005)
0-0:96.7.9(00004)
1-0:99.97.0(1)(0-0:96.7.19)(170915042113S)(0000000196*s)
1-0:32.32.0(00002)
1-0:52.32.0(00004)
1-0:72.32.0(00003)
1-0:32.36.0(00001)
1-0:52.36.0(00001)
1-0:72.36.0(00001)
0-0:96.13.0()
1-0:32.7.0(233.3*V)
1-0:52.7.0(233.2*V)
1-0:72.7.0(233.0*V)
1-0:31.7.0(001*A)
1-0:51.7.0(001*A)
1-0:71.7.0(001*A)
1-0:21.7.0(00.000*kW)
1-0:41.7.0(00.000*kW)
1-0:61.7.0(00.000*kW)
1-0:22.7.0(00.326*kW)
1-0:42.7.0(00.291*kW)
1-0:62.7.0(00.310*kW)
0-1:24.1.0(003)
0-1:96.1.0(4730303339303031373439383432373137)
0-1:24.2.1(200810091004S)(10671.680*m3)
!C18A

[10/08/2020, 08:14:02] [P1] raw data: {"type":"ISK5\\2M550T-1012","checksum":"C18A","version":"5.0","lastupdated":"2020-08-10T09:14:04","id":"E0044006965479517","consumption_low":9010.2,"consumption_normal":10835.254,"consumption_back_low":35.61,"consumption_back_normal":41.138,"tariff":"normal","power":0,"power_back":951,"failures_short":5,"failures_long":4,"log":{"2017-09-15T04:21:13":196},"l1_sags":2,"l2_sags":4,"l3_sags":3,"l1_swells":1,"l2_swells":1,"l3_swells":1,"msg_text":"","l1_voltage":233.3,"l2_voltage":233.2,"l3_voltage":233,"l1_current":1,"l2_current":1,"l3_current":1,"l1_power":0,"l2_power":0,"l3_power":0,"l1_power_back":326,"l2_power_back":291,"l3_power_back":310,"d1_type":"gas","d1_id":"G0039001749842717","d1_lastupdated":"2020-08-10T09:10:04","d1_consumption":10671.68}
[10/08/2020, 08:14:02] [P1] data: {"type":"ISK5\\2M550T-1012","version":"5.0","msg_text":"","electricity":{"id":"E0044006965479517","lastupdated":"2020-08-10T09:14:04","tariff":"normal","consumption":{"low":9010.2,"normal":10835.254},"power":0,"failures":{"short":5,"long":4,"log":{"2017-09-15T04:21:13":196}},"l1":{"voltage":233.3,"sags":2,"swells":1,"current":1,"power":0},"l2":{"voltage":233.2,"sags":4,"swells":1,"current":1,"power":0},"l3":{"voltage":233,"sags":3,"swells":1,"current":1,"power":0}},"electricityBack":{"id":"E0044006965479517B","lastupdated":"2020-08-10T09:14:04","tariff":"normal","consumption":{"low":35.61,"normal":41.138},"power":951,"l1":{"power":326},"l2":{"power":291},"l3":{"power":310}},"gas":{"id":"G0039001749842717","lastupdated":"2020-08-10T09:10:04","consumption":10671.68}}
[10/08/2020, 08:14:02] [P1] ISK5\2M550T-1012 v5.0
[10/08/2020, 08:14:02] [P1] Electricity: set Last Updated from "Mon Aug 10 2020 09:13:39" to "Mon Aug 10 2020 09:14:04"
[10/08/2020, 08:14:02] [P1] Electricity L1: set Electric Current from 2 A to 1 A
[10/08/2020, 08:14:02] [P1] Electricity L1: set Voltage from 233.6 V to 233.3 V
[10/08/2020, 08:14:02] [P1] Electricity L2: set Voltage from 233.4 V to 233.2 V
[10/08/2020, 08:14:02] [P1] Electricity L3: set Voltage from 233.3 V to 233 V
[10/08/2020, 08:14:02] [P1] Electricity History: restored 4032 history entries
[10/08/2020, 08:14:02] [P1] Electricity Delivered: set Total Consumption from 76.742 kWh to 76.748 kWh
[10/08/2020, 08:14:02] [P1] Electricity Delivered: set Total Consumption Normal from 41.132 kWh to 41.138 kWh
[10/08/2020, 08:14:02] [P1] Electricity Delivered: set Current Consumption from 983 W to 951 W
[10/08/2020, 08:14:02] [P1] Electricity Delivered: set Last Updated from "Mon Aug 10 2020 09:13:39" to "Mon Aug 10 2020 09:14:04"
[10/08/2020, 08:14:02] [P1] Electricity Delivered L1: set Current Consumption from 406 W to 326 W
[10/08/2020, 08:14:02] [P1] Electricity Delivered L2: set Current Consumption from 281 W to 291 W
[10/08/2020, 08:14:02] [P1] Electricity Delivered L3: set Current Consumption from 295 W to 310 W
[10/08/2020, 08:14:02] [P1] Electricity Delivered History: restored 536 history entries
[10/08/2020, 08:14:02] [P1] Gas History: restored 4032 history entries
[10/08/2020, 08:14:02] [P1] initialised
[10/08/2020, 08:14:03] [P1] Electricity: set Last Updated from "Mon Aug 10 2020 09:14:04" to "Mon Aug 10 2020 09:14:05"
[10/08/2020, 08:14:03] [P1] Electricity L2: set Voltage from 233.2 V to 233.3 V
[10/08/2020, 08:14:03] [P1] Electricity Delivered: set Total Consumption from 76.748 kWh to 76.749 kWh
[10/08/2020, 08:14:03] [P1] Electricity Delivered: set Total Consumption Normal from 41.138 kWh to 41.139 kWh
[10/08/2020, 08:14:03] [P1] Electricity Delivered: set Current Consumption from 951 W to 948 W
[10/08/2020, 08:14:03] [P1] Electricity Delivered: set Last Updated from "Mon Aug 10 2020 09:14:04" to "Mon Aug 10 2020 09:14:05"
[10/08/2020, 08:14:03] [P1] Electricity Delivered L1: set Current Consumption from 326 W to 347 W
[10/08/2020, 08:14:03] [P1] Electricity Delivered L2: set Current Consumption from 291 W to 290 W
[10/08/2020, 08:14:03] [P1] Electricity Delivered L3: set Current Consumption from 310 W to 333 W
[10/08/2020, 08:14:03] [OpenZWave] onNotification { nodeId: 3, notification: 4, help: 'Notification - Node Asleep' }
[10/08/2020, 08:14:03] [OpenZWave] onNodeReady ZME_UZB1 USB Stick
[10/08/2020, 08:14:03] [OpenZWave] Node Available: ZME_UZB1 USB Stick
[10/08/2020, 08:14:04] [P1] Electricity: set Last Updated from "Mon Aug 10 2020 09:14:05" to "Mon Aug 10 2020 09:14:06"
[10/08/2020, 08:14:04] [P1] Electricity L1: set Electric Current from 1 A to 2 A
[10/08/2020, 08:14:04] [P1] Electricity L2: set Voltage from 233.3 V to 233.1 V
[10/08/2020, 08:14:04] [P1] Electricity L3: set Voltage from 233 V to 232.9 V
[10/08/2020, 08:14:04] [P1] Electricity Delivered: set Current Consumption from 948 W to 980 W
[10/08/2020, 08:14:04] [P1] Electricity Delivered: set Last Updated from "Mon Aug 10 2020 09:14:05" to "Mon Aug 10 2020 09:14:06"
[10/08/2020, 08:14:04] [P1] Electricity Delivered L1: set Current Consumption from 347 W to 404 W
[10/08/2020, 08:14:04] [P1] Electricity Delivered L2: set Current Consumption from 290 W to 282 W
[10/08/2020, 08:14:04] [P1] Electricity Delivered L3: set Current Consumption from 333 W to 308 W
[10/08/2020, 08:14:04] [OpenZWave] onNodeAvailable Pump 0x0258/0x1027
[10/08/2020, 08:14:04] [Sonos] upnp: search done
[10/08/2020, 08:14:05] [P1] Electricity: set Last Updated from "Mon Aug 10 2020 09:14:06" to "Mon Aug 10 2020 09:14:07"
[10/08/2020, 08:14:05] [P1] Electricity L1: set Electric Current from 2 A to 1 A
[10/08/2020, 08:14:05] [P1] Electricity L1: set Voltage from 233.3 V to 233.4 V
[10/08/2020, 08:14:05] [P1] Electricity L2: set Voltage from 233.1 V to 233.3 V
[10/08/2020, 08:14:05] [P1] Electricity L3: set Voltage from 232.9 V to 233.1 V
[10/08/2020, 08:14:05] [P1] Electricity Delivered: set Current Consumption from 980 W to 946 W
[10/08/2020, 08:14:05] [P1] Electricity Delivered: set Last Updated from "Mon Aug 10 2020 09:14:06" to "Mon Aug 10 2020 09:14:07"
[10/08/2020, 08:14:05] [P1] Electricity Delivered L1: set Current Consumption from 404 W to 352 W
[10/08/2020, 08:14:05] [P1] Electricity Delivered L2: set Current Consumption from 282 W to 291 W
[10/08/2020, 08:14:05] [P1] Electricity Delivered L3: set Current Consumption from 308 W to 321 W
ebaauw commented 3 years ago

Ah yes, should have said "starred" or made visible in "At a Glance" instead of "turn on". I added a screen recording to illustrate here. Here you first see that if at 0:13 I move L1 above L3 it moves the Total as well. Also at 0:20 I move L2 above L3 (wanting to put them in order) but it flips back to below it. Finally at 0:40 if I "unstar" the Total Delivered, touch Done and then Edit again, you see that L1 is off too

Thanks. I'm afraid this is all peculiarities of Eve. You might try and set the order in the room view first.

But it's most probably an issue in the Eve app. I noticed similar behavior with the consumed electricity when I first used Eve together with Homebridge and this plugin.

Electricity Delivered is exposed to HomeKit similar to Electricity. I don't understand why Eve seems to handle these accessories differently. Or it must be the absence of Current and Voltage.

Could it be related to the way the "cooked object" is created here?

No, that's just between Homebridge P1 and the P1 interface.

As I've said above, it's how Eve handles a HomeKit accessory with multiple HomeKit services (and, I suspect, with also a History service). https://github.com/ebaauw/homebridge-p1/blob/2403c790e751c2a350625e1d743d08ccb1eaadd2/lib/P1Accessory.js#L42-L56 I suppose Eve would behave "normally" if I would expose the three Phase services in a separate accessory. This is kind of a dilemma. HomeKit only supports 149 accessories per HomeKit bridge (i.c. Homebridge), so I'm trying to minimise the number of accessories. Also, a separate accessory would result in an additional Not Supported tile in Apple's Home app.

The -D log:

Thanks. I don't see anything in there that I didn't anticipate, and from your screenshot and video, Homebridge P1 seems to handle this just fine (other than the Eve peculiarities).

stannie commented 3 years ago

Thanks for looking into it, makes sense. By the way, did I mention the P1 plugin is awesome?