ebaauw / homebridge-p1 Goto Github PK
View Code? Open in Web Editor NEWHomebridge plugin for DSMR end-consumer (P1) interface
License: Apache License 2.0
Homebridge plugin for DSMR end-consumer (P1) interface
License: Apache License 2.0
Currently, homebridge-p1 keeps a permanent, exclusive connection to the serial port connected to the P1 port. While this works great for HomeKit-only scenarios, you cannot use another data logger or run multiple instances of homebridge-p1 in parallel (e.g. testing a new version).
I might need to split off the P1 client from homebridge-p1 into a separate interfacing service. This service would provide a web socket server. It would connect to the serial port and simply re-broadcast every telegram over the web socket. homebridge-p1 (and other clients) would then read the telegrams from the web socket instead of form the serial port.
Of course doing this would complicate the installation of homebridge-p1.
I've got the Landis & Gyr ZCF120ABd which doesn't have a P1 port. Instead it uses infrared to communicate. I can translate this signal via to a P1-usb cable. Is this kind of communication supported?
Hello,
I can't add any accessories within my Eve app, homebridge normally starts but I got this error:
[2/28/2019, 4:15:54 PM] [P1] Initializing P1 platform...
[2/28/2019, 4:15:54 PM] [P1] homebridge-p1 v0.2.7, node v10.15.1, homebridge v0.4.46
[2/28/2019, 4:15:54 PM] Loading 0 accessories...
Greets from the Netherlands
Vaoske
The smart meter reports the electricity delivered back to the network in case you have solar panels. I don't and homebridge-p1 currently ignored this information. Technically, it would be possible to expose this to HomeKit, but I'm not sure how best to do this. Would you want to net the energy consumed vs delivered, or would you want separate accessories for consumption vs delivery?
Please let me know your views.
When trying to install homebridge-p1, I get the following error:
npm ERR! path /usr/lib/node_modules/homebridge-p1/node_modules/serialport/bin/list.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/lib/node_modules/homebridge-p1/node_modules/serialport/bin/list.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/wouter/.npm/_logs/2018-11-30T12_11_58_541Z-debug.log
This is using up-to-date NodeJS, homebridge etc:
[11/30/2018, 1:10:49 PM] Loading 1 platforms...
[11/30/2018, 1:10:49 PM] [Hue] Initializing Hue platform...
[11/30/2018, 1:10:49 PM] [Hue] homebridge-hue v0.11.1, node v10.14.0, homebridge v0.4.45
[11/30/2018, 1:10:49 PM] [Hue] warning: not using recommended node version v10.13.0 LTS
I've tried to remove all globally installed node modules and re-installing, manually installing serialport, etc, but installation still fails. The same error presents itself when installing e.g. homebridge-p1 0.10.1.
-Wouter
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!
Hi Erik, would it be possible to change the log level of homebridge-p1 without requiring the use of Eve? I'm only using HB, Home.app and Homebridge-Config-UI-X, and I cannot seem to change the level of logging. While it is very helpful to see how frequently my power usage changes, the number of log messages is clogging up the rest of my /var/lib/homebridge/homebridge.log file. As I understand from a closed issue, this is possible to adjust via Eve, but as mentioned before I do not run that app. Thanks so much for this plugin!
Have been struggling a bit with my brand new Sagemcom T211 (with the P1 interface activated). Don't know if it's the meter that is not supported or anything else (I'm not a programmer).
lsusb reports: Bus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Set to default /dev/ttyUSB0 on my Pi W.
So it seems to start fine, but the only thing that comes out of the Raspberry is "Ignoring invalid telegram". Tried 2.2, tried different timeout. At 9 it stops after 9 seconds stating "no data", at 10 it just continues delivering "invalid data". Any ideas to proceed?
Log as follows:
25/03/2021, 10:13:37 Initializing HAP-NodeJS v0.9.3...
25/03/2021, 10:13:43 Loaded plugin 'homebridge-p1'
25/03/2021, 10:13:43 [3/25/2021, 3:13:43 AM] Registering platform 'homebridge-p1.Lib'
25/03/2021, 10:13:43 [3/25/2021, 3:13:43 AM] Registering platform 'homebridge-p1.P1'
25/03/2021, 10:13:44 Loading 1 platforms...
25/03/2021, 10:13:44 [P1] Initializing P1 platform...
25/03/2021, 10:13:44 [P1] homebridge-p1 v1.2.0, node v14.16.0, homebridge v1.3.3, homebridge-lib v5.1.0
25/03/2021, 10:13:44 [P1] warning: config.json: plugin_map: invalid key
25/03/2021, 10:13:44 Preparing Advertiser for 'HOOBS 9F12' using bonjour-hap backend!
25/03/2021, 10:13:44 Starting to advertise 'HOOBS 9F12' using bonjour-hap backend!
25/03/2021, 10:13:44 Bridge is running on port 51826.
25/03/2021, 10:13:46 [P1] warning: heartbeat 1, drift 261
25/03/2021, 10:13:47 [P1] warning: heartbeat 2, drift 701
25/03/2021, 10:13:47 [P1] connected to /dev/ttyUSB0
25/03/2021, 10:13:53 [P1] warning: ignoring invalid telegram
... and so on ...
Hi Ebaauw,
Thanks for all you efforts to make this Plugin, i'm really happy with it and it works perfectly overhere. I using it mainly in the ave app. placed in room together with my solaragde plugin to see all my energy going in and out.
I have only one question, is it possible to show here the current consumption information instead of the total consumption information?
Best regards,
Ronald
I want to install this plugin, but before a purchase the cable, can somebody send some screenshots how this plugin is expose in the Apple HomeKit app and the Eve app?
this is what the log says after installing Homebridge-p1 and using with /dev/ttyUSB0 with I can see from docker
(node:202) UnhandledPromiseRejectionWarning: Error: spawn udevadm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:202) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecti
ng a promise which was not handled with .catch(). (rejection id: 1)
(node:202) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process wit
h a non-zero exit code.
Hi,
Thanks for this plugin! Yesterday’s eve app updated resulted in missing graphs for the p1 accessory. Other accessories, native eve ones and others using elgato-history still work (although they seem to have removed some graph ui functions.
Does the same happen on you setup?
Thanks
Roy
Hello, would it be possible to use ser2net?
My Homebridge RPi is somewhere else in my home.
I use a dedicated RPi as ser2net for DSMR.
Since a couple of days I can no longer access the P1 in HomeBridge running on my Raspberry Pi 4 - the log shows the following error:
[P1] warning: Error Resource temporarily unavailable Cannot lock port
I've checked and it's configured correctly in config.js (on /dev/ttyUSB1). Also my Youless, when connected to the smart meter, works as expected. I've got a Enocean stick on USB0.
Any idea what else I can try to access the P1 again?
Hi,
The plugin is logging every 10 seconds the total and current consumption. Can this be suppressed by setting a logging option or so?
My Homebridge log is flooded by these messages.
Thanks,
Rien
Hi,
I've just updated to the latest version of homebridge-p1. I had to update nodejs, npm and then the plugin.
P1 used to work fine, but now it does not receive data. When homebridge starts I receive the following data below. I'm using a Paspberry Pi B / Raspbian. Do you have any idea what could be wrong?
Thanks,
Roy
[2020-4-7 20:44:22] [P1] homebridge-p1 v0.2.37, node v12.16.1, homebridge v0.4.53
[2020-4-7 20:32:28] [P1] warning: ignoring invalid telegram
[2020-4-7 20:32:28] [P1] telegram:
XMX5LGBBLA4415603207
1-3:0.2.8(50)
0-0:1.0.0(200407203139S)
0-0:96.1.1(4530303435303034323337303331313138)
1-0:1.8.1(003443.800kWh)
1-0:1.8.2(003724.052kWh)
1-0:2.8.1(000000.000kWh)
1-0:2.8.2(000000.000kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.751kW)
1-0:2.7.0(00.000kW)
0-0:96.7.21(00002)
0-0:96.7.9(00000)
1-0:99.97.0(0)(0-0:96.7.19)
1-0:32.32.0(00000)
1-0:32.36.0(00000)
0-0:96.13.0()
1-0:32.7.0(228.0V)
1-0:31.7.0(003A)
1-0:21.7.0(00.751kW)
1-0:22.7.0(00.000kW)
0-1:24.1.0(003)
0-1:96.1.0(4730303339303031383038333330363138)
0-1:24.2.1(200407203008S)(03377.431*m3)
!9EE7
[2020-4-7 20:32:28] [P1] raw data: {"type":"XMX5LGBBLA4415603207","checksum":"9EE7","version":"5.0","lastupdated":"2020-04-07T20:31:39","id":"E0045004237031118","consumption_low":3443.8,"consumption_normal":3724.052,"consumption_back_low":0,"consumption_back_normal":0,"tariff":"normal","power":751,"power_back":0,"failures_short":2,"failures_long":0,"log":{},"l1_sags":0,"l1_swells":0,"msg_text":"","l1_voltage":228,"l1_current":3,"l1_power":751,"l1_power_back":0,"d1_type":"gas","d1_id":"G0039001808330618","d1_lastupdated":"2020-04-07T20:30:08","d1_consumption":3377.431}
[2020-4-7 20:32:28] [P1] data: {"type":"XMX5LGBBLA4415603207","version":"5.0","msg_text":"","electricity":{"id":"E0045004237031118","lastupdated":"2020-04-07T20:31:39","tariff":"normal","consumption":{"low":3443.8,"normal":3724.052},"power":751,"failures":{"short":2,"long":0,"log":{}},"l1":{"voltage":228,"sags":0,"swells":0,"current":3,"power":751}},"electricityBack":{"id":"E0045004237031118B","lastupdated":"2020-04-07T20:31:39","tariff":"normal","consumption":{"low":0,"normal":0},"power":0,"l1":{"power":0}},"gas":{"id":"G0039001808330618","lastupdated":"2020-04-07T20:30:08","consumption":3377.431}}
[2020-4-7 20:32:28] [P1] XMX5LGBBLA4415603207 v5.0
After updating to the new version 0.1.10 the plugin is not working anymore. Plugin is loading but after homebridge is started P1 stopped and the HomeKit accessories is not visible.
This is a past of the log:
[9/13/2018, 8:21:46 PM] Homebridge is running on port 51826.
[9/13/2018, 8:21:51 PM] [Yeelight] all known devices found, stopping proactive search.
[9/13/2018, 8:21:58 PM] [P1] XMX5LGBBFFB231110695 v4.2
[9/13/2018, 8:21:58 PM] [P1] Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:12:13
at P1Client.p1.on (/usr/local/lib/node_modules/homebridge-p1/lib/P1Platform.js:132:11)
at P1Client.emit (events.js:182:13)
at P1Client.parseData (/usr/local/lib/node_modules/homebridge-p1/lib/P1Client.js:402:12)
at ReadLineParser.parser.on (/usr/local/lib/node_modules/homebridge-p1/lib/P1Client.js:280:46)
at ReadLineParser.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:260:13)
at ReadLineParser.Readable.push (_stream_readable.js:219:10)
at ReadLineParser.Transform.push (_stream_transform.js:151:32)
[9/13/2018, 8:22:08 PM] [P1] Electricity: set homekit total consumption from 21692.46 kWh to 21692.467 kWh
[9/13/2018, 8:22:08 PM] [P1] Electricity: set homekit current consumption from 2262 W to 2241 W
[9/13/2018, 8:22:18 PM] [P1] Electricity: set homekit total consumption from 21692.467 kWh to 21692.473 kWh
[9/13/2018, 8:22:18 PM] [P1] Electricity: set homekit current consumption from 2241 W to 2247 W
[9/13/2018, 8:22:28 PM] [P1] Electricity: set homekit total consumption from 21692.473 kWh to 21692.479 kWh
In Homekit on IOS 14 (maybe also earlier versions; never tested it there) the Electricity and gas say "Niet geschikt" i.e. "Not Suitable"... is that correct? In eve it gives the electricity and gas; and the log shows constant updates; so the info is there....
Hi Erik, another beautiful project. Keep up the good work!
Would it be nice that this P1 sensor is also a sensor in Homekit? Now it is indicated as an unsupported accessory. Then you are able to indicate the consumption under the sensor icon (like temperature, lux or humidity. If you show 2 x 2 sensors (gas and electricity) with the current consumption and the total consumption, then it is also usable without the Eve App.
Greetings!
Currently, homebridge-p1 only reports voltage and electric current for phase 1 and (current) consumption for all phases combined. This suffices for most consumers, like me, who have a single-phase electricity installation.
The smart meter actually supports 3-phase installations as well, reporting separate (current) consumption, voltage and electric current per phase. Technically it would be possible to expose these to HomeKit. It would have to be through a separate accessory, not in interfere with the history in Eve. Alternatively, homebridge-p1 could report the average voltage and total electric current for the combined phases.
Please let me know your views on this.
Hi,
Node: 10.15.2, latest homebridge on PI
Thanks for creating this module, I tried to install it, but I do get this error. I tested separately that I do receive the telegrams on my usb1 port, so I added that one in the config.
"platforms": [
{
"platform": "P1",
"serialport": "/dev/ttyUSB1"
},
{
"platform": "Hue",
"host": [
"192.168.1.115:8080",
"192.168.1.122"
],
"users": {```
```[4/12/2019, 11:01:04 AM] [Hue] homebridge-hue v0.11.20, node v10.15.3, homebridge v0.4.48
[4/12/2019, 11:01:04 AM] Loading 0 accessories...
(node:4676) UnhandledPromiseRejectionWarning: Error: spawn udevadm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:4676) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4676) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[4/12/2019, 11:01:04 AM] [Hue] GateWayRaspBee: dresden elektronik deCONZ gateway v2.5.23, api v1.0.9
[4/12/2019, 11:01:04 AM] [Hue] GateWayRaspBee: warning: not using recommended deCONZ gateway version 2.5.60```
I just received my P1 cable and connected it to my homebridge server.
When I start it, it says it is connected successfully to /dev/ttyUSB0 but after that throws an error that there is no usable data found.
I have the Landis & Gyr E350. Is there any additional configuration that I'm missing?
Thanks
Hi
I can't seem to get this to work. Homebridge keeps logging that /dev/ttyUSB0: port not found
I have homebridge running as a system service with user homebridge
and I have enabled the -D
flag. Here's my log:
[11/11/2019, 9:46:55 PM] [P1] Initializing P1 platform...
[11/11/2019, 9:46:56 PM] [P1] homebridge-p1 v0.2.27, node v10.16.3, homebridge v0.4.50
[11/11/2019, 9:46:56 PM] [P1] warning: not using recommended node version v12.13.0 LTS
[11/11/2019, 9:46:56 PM] [P1] config.json: {"platform":"P1","serialport":"/dev/ttyUSB0"}
[11/11/2019, 9:47:02 PM] [P1] ports: []
[11/11/2019, 9:47:02 PM] [P1] /dev/ttyUSB0: port not found
I have tried several things in the config, dsmr22 doesn't seem to work. Excluding the serialport
from the config doesn't seem to work either.
I can't seem to install serialport-list
but I can see /dev/ttyUSB0 appearing and disappearing when I plug/unplug the P1 cable. And lsusb
reports
Bus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I've also added the homebridge
user to the dialout
group, which I think is the owner of ttyUSB0
.
Earlier when I did cat /dev/ttyUSB0
I saw binary data getting logged every second. So it seemed like it was working correctly, but I can now no longer reproduce this.
Hello Eric,
It would be nice to setup the labels in the config.json file for:
Electricity and Electricity Delivered.
Then it would be possible to make it: "Verbruikt" and "Geleverd" or something like that.
Technically the smart meter is capable of reporting water consumption and heat consumption (e.g. for city heating). I'm not sure if this is actually being deployed anywhere in the Netherlands, but if it is, homebridge-p1 could expose these to HomeKit as well, very much like the gas meter.
If you have a smart water or heat meter and would like to expose these to HomeKit, please let me know here.
In have a p1 exposes using ser2net http which is connected to domoticz. I want to use the same connection to expose it to homekit so insteas of serial use http. Would that be possible. As my p1 smartmeter is on a remote system not close to domoticz nor to homebridge hencd tty is not an option.
Cheers
Hi,
I bought this exact cable, and a Pi4 (4GB), hooked up to ethernet, installed Homebridge, the Config UI X plugin and this P1 plugin.
I've tested the readouts from the cable, with the RPI using the following command, which works fine.
screen /dev/ttyUSB0 115200
But when I fill the config.json file with the standard as below it comes up with log message [homebridge-p1] /dev/ttyUSB0: port not found.
"platforms": [
{
"name": "Config UI",
"port": 8080,
"auth": "form",
"theme": "dark-mode",
"restart": "sudo -n systemctl restart homebridge",
"tempUnits": "c",
"sudo": true,
"log": {
"method": "systemd"
},
"accessoryControl": {
"debug": true
},
"platform": "config"
},
{
"name": "homebridge-p1",
"serialport": "/dev/ttyUSB0",
"platform": "P1"
}
]
Is there any obvious reason why it wouldn't work?
Hi Erik,
Small questions: I have p1 running on the RaspberryPi and it's working fine. I see the graphs in the Eve app. The only thing is that interacting with these graphs is very limited in the Eve app.
I have installed https://github.com/psy0rz/p1_dsmr_to_influxdb. This python script gets the data from the p1 port and insert them in an Influx DB so I can use Grafana to make nice dashboard to interact with the data.
As you mentioned your plugin keeps a permanent, exclusive connection to the serial port which means that the Python script can not access the P1 port when Homebridge is running. If I stop Homebridge the script is filling up the Influx DB.
It is an option that, besides sending the data to the Eve app, you also can send the data to an Influx Database?
If that is not an option do you think that this splitter kan work?
https://www.iungo.nl/nl/bestellen/i/453-p1-poort-splitter
Thanks for you response in advance.
I have bought a P1 cable, attached it to the RaspberryPi and installed the software. After the software successfully is installed I rebooted the RaspberryPi. During the boot of Homebridge I see that the P1 software is loaded, with 2 warnings about the node version and the Homebridge version.
[2018-5-7 20:59:58] [P1] Initializing P1 platform...
[2018-5-7 20:59:58] [P1] homebridge-p1 v0.0.2, node v10.0.0, homebridge v0.4.42
[2018-5-7 20:59:58] [P1] warning: not using recommended node version v8.9.4 LTS
[2018-5-7 20:59:58] [P1] warning: not using recommended homebridge version v0.4.38
After this I get the error that the usb cable is not found.
[2018-5-7 21:00:00] [P1] P1 USB cable not found
I checked the usb devices with lsusb and I see the usb device
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
All other plugins are working properly (also the Philips Hue plugin of ebaauw 😇)
Any ideas how to solve this?
Since the last 2 days the P1 accessory keeps disappearing in the Eve app. After a fresh restart the accessory is visible but disappears within a few hours. The log shows that P1 is recording the values. Any idea wha5 goes wrong?
Hi! When I installed the plugin into Homebridge, and do the settings like:
{
"name": "P1",
"serialport": "/dev/ttyUSB0",
"dsmr22": true,
"platform": "P1"
}
and I restart Homebridge, it wont start the service again. When I delete above rules then it will start again. Is there anything to repair this?
Im using a raspberry 3+ and running the homebridge in docker
Hi,
After configuring the plugin by adding:
{
"platform": "P1"
},
to the config.json the HomeBridge does not fully start anymore
I see this in the log, so I thought this is okay, but the Homebridge process is not loading
Aug 31 16:58:45 homebridge homebridge[20966]: [2018-8-31 16:58:45] [P1] Initializing P1 platform...
Aug 31 16:58:45 homebridge homebridge[20966]: [2018-8-31 16:58:45] [P1] homebridge-p1 v0.1.8, node v8.11.4, homebridge v0.4.44
If I remove the
{
"platform": "P1"
},
from the config.json and leave the plugin installed, everything is working again.
So there must be something with the P1 plugin :-(
Any help is appreciated
Thanks,
Rien
I love this plugin and am very happy with the development! I do, however, wish to disable the continuous logging because it's pretty hard to troubleshoot other plugins when the log files are completely filled with lines like these:
[9/7/2021, 4:25:22 PM] [P1] Electricity: set Total Consumption from 36128.027 kWh to 36128.028 kWh
[9/7/2021, 4:25:22 PM] [P1] Electricity: set Total Consumption Normal from 16578.191 kWh to 16578.192 kWh
[9/7/2021, 4:25:22 PM] [P1] Electricity: set Current Consumption from 340 W to 330 W
Due to a crash i had to reinstall homebridge. But after the install of de P1 plugin i get the following error. I did not change anything on the USB part, only installed homebridge (and the plugins).
Jan 19 15:29:26 RaspberryPi homebridge[19977]: [1/19/2020, 3:29:26 PM] [P1] error: Error: Permission denied, cannot open /dev/ttyUSB0
Hi Erik,
I run your plugin on a meter which sends data every 5 sec and it seems to be stable. Also the graphs work fine.
But for some reason I can not find the cost per kwh setting in the EVE app.
Any idea why this setting is not visible??
Grt
Maykel
v0.2.42 and earlier, at least when installed via the Homebridge UI, log all meter readings / telegrams which push logs from other plugins off screen quite quickly.
Would be convenient if the regular / expected messages could be suppressed, possibly even have this off by default.
The smart meter actually reports consumption under Normal and Low tariff separately. Technically, it would be possible to expose different accessories for these, so the cost in Eve would make more sense if you have a dual tariff contract. Of course, you would have to change the Energy Cost under Settings in Eve, depending on which consumption you want to analyse. You would need to do that for Gas anyways.
Alternatively, homebridge-p1 could simply expose different Total Consumption
characteristics for total, Normal tariff, and Low tariff under the current Electricity accessory. Eve wouldn't show separate history for the latter two, but homebridge-p1 would have a smaller impact against the HomeKit limit of 99 accessories per (HomeKit) bridge.
Please let me know your views on this.
Hello,
This is the situation:
What's going wrong and how can I fix it? Any help is appreciated!
Hi there!
My electricity connection, so also 'Smart Meter' supports three phases.
Have you considered the possibility to specify if you've got L1 L2 L3 etc?
Thanks!
Marc
Hi,
I use homebridge-p1 v0.2.28 and for several days no history available within the Eve app.
Any solution?
greets,
Vaoske
Hello,
I tried to install the plugin in Homebridge on Docker, but installation failed.
This is the error I received:
@serialport/[email protected] install /homebridge/node_modules/@serialport/bindings
prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=8.11.3 runtime=node arch=arm platform=linux)
make: Entering directory '/homebridge/node_modules/@serialport/bindings/build'
CXX(target) Release/obj.target/bindings/src/serialport.o
CXX(target) Release/obj.target/bindings/src/serialport_unix.o
../src/serialport_unix.cpp:24:26: fatal error: linux/serial.h: No such file or directory
^
compilation terminated.
make: *** [bindings.target.mk:96: Release/obj.target/bindings/src/serialport_unix.o] Error 1
make: Leaving directory '/homebridge/node_modules/@serialport/bindings/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.50-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /homebridge/node_modules/@serialport/bindings
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN homebridge No description
npm WARN homebridge No repository field.
npm WARN homebridge No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/[email protected] install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @serialport/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-17T20_26_55_446Z-debug.log
I hope, someone can help me with this?
Changing the log level on ‘electricity’ works fine (and the changes are also applied for ‘gas’ and ‘electricity delivered’ logs)
But if you change it on ‘electricity delivered’ it causes a crash.
imo it shouldn’t be exposed on ‘electricity delivered’ (like it is for gas)
[21/3/2021 15:40:52] [P1] Electricity Delivered: error: TypeError: Cannot set property logLevel of #<Electricity> which has only a getter
at CharacteristicDelegate.<anonymous> (/usr/lib/node_modules/homebridge-p1/lib/P1Service.js:72:28)
at CharacteristicDelegate.emit (events.js:315:20)
at CharacteristicDelegate.emit (/usr/lib/node_modules/homebridge-p1/node_modules/homebridge-lib/lib/Delegate.js:172:13)
at CharacteristicDelegate._onSet (/usr/lib/node_modules/homebridge-p1/node_modules/homebridge-lib/lib/CharacteristicDelegate.js:391:10)
at Characteristic.emit (events.js:315:20)
at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1632:16
at new Promise (<anonymous>)
at Characteristic.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1630:14)
at step (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
at Object.next (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
Below the debug info for a Belgian DSMR meter.
For some reason the plugin crashes on the received telegrams.
[20/3/2021 21:46:26] [P1] telegram:
FLU5\253770234_A
0-0:96.1.4(50215)
0-0:96.1.1(3153414731313030303736363136)
0-0:1.0.0(210320214636W)
1-0:1.8.1(001311.025*kWh)
1-0:1.8.2(001651.825*kWh)
1-0:2.8.1(001885.818*kWh)
1-0:2.8.2(000750.923*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.433*kW)
1-0:2.7.0(00.000*kW)
1-0:21.7.0(00.438*kW)
1-0:22.7.0(00.000*kW)
1-0:32.7.0(240.9*V)
1-0:31.7.0(002.22*A)
0-0:96.3.10(1)
0-0:17.0.0(999.9*kW)
1-0:31.4.0(999*A)
0-0:96.13.0()
0-1:24.1.0(003)
0-1:96.1.1(37464C4F32313139303331393634)
0-1:24.4.0(1)
0-1:24.2.3(210320214626W)(02559.077*m3)
!85AF
[20/3/2021 21:46:26] [P1] warning: 0-0:96.1.4: ignoring unknown key
[20/3/2021 21:46:26] [P1] warning: 0-0:96.3.10: ignoring unknown key
[20/3/2021 21:46:26] [P1] warning: 0-0:17.0.0: ignoring unknown key
[20/3/2021 21:46:26] [P1] warning: 1-0:31.4.0: ignoring unknown key
[20/3/2021 21:46:26] [P1] warning: 0-1:96.1.1: ignoring unknown key
[20/3/2021 21:46:26] [P1] warning: 0-1:24.4.0: ignoring unknown key
[20/3/2021 21:46:26] [P1] warning: 0-1:24.2.3: ignoring unknown key
[20/3/2021 21:46:26] [P1] raw data: {"type":"FLU5\\253770234_A","checksum":"85AF","id":"1SAG1100076616","lastupdated":"2021-03-20T21:46:36","consumption_low":1311.025,"consumption_normal":1651.825,"consumption_back_low":1885.818,"consumption_back_normal":750.923,"tariff":"normal","power":433,"power_back":0,"l1_power":438,"l1_power_back":0,"l1_voltage":240.9,"l1_current":2.22,"msg_text":"","d1_type":"gas"}
[20/3/2021 21:46:26] [P1] warning: TypeError: Cannot read property 'trim' of undefined
at P1Client.parseTelegram (/usr/lib/node_modules/homebridge-p1/lib/P1Client.js:527:25)
at ReadLineParser.<anonymous> (/usr/lib/node_modules/homebridge-p1/lib/P1Client.js:291:49)
at ReadLineParser.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:280:11)
at ReadLineParser.Readable.push (internal/streams/readable.js:223:10)
at ReadLineParser.Transform.push (internal/streams/transform.js:166:32)
at ReadLineParser._transform (/usr/lib/node_modules/homebridge-p1/node_modules/@serialport/parser-delimiter/lib/index.js:35:12)
at ReadLineParser.Transform._read (internal/streams/transform.js:205:10)
at ReadLineParser.Transform._write (internal/streams/transform.js:193:12)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.