Coder Social home page Coder Social logo

homebridge-p1's People

Contributors

ebaauw avatar rooi avatar wimleers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-p1's Issues

homebridge-p1 blocks P1 interface for other uses

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.

Infra red

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?

Support DSMR 4.2

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

Support for solar panel installations?

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.

Installation failed with ENOENT for serialport depency

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

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

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!

Manage log level without Eve (just Home.app and vanilla) Homebridge

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!

[P1] warning: Ignoring invalid telegram

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 ...

view option

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

Screenshots

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?

can't seem to get the plugin working on Synology Docker

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.

Eve app update and missing graphs

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

Ser2Net support

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.

Resource temporarly unvailable error

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?

Less logging

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

Invalid Telegram

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.052
kWh)
1-0:2.8.1(000000.000kWh)
1-0:2.8.2(000000.000
kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.751kW)
1-0:2.7.0(00.000
kW)
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(003
A)
1-0:21.7.0(00.751kW)
1-0:22.7.0(00.000
kW)
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

Timing issue causes p1 to stop working

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

Homekit accesorry not showing data

I can see data is comminig in the Homebridge status (main screen)
The plugin created two accessoires bus there is no data.
The accessoires only showing "Niet Geschikt" not compatible.

image

image

"Not suitable" in IOS14

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....

Not registered as sensor in Homekit

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!

Warning with two key's

Hello Eric,

Your plugin is working great. I only have 2 key's who are not supported. I assume this is the Gas....

Schermafbeelding 2019-06-10 om 12 14 13

Support for 3-phase electricity installations?

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.

Error: spawn udevadm ENOENT

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```

Wrong totals in Eve Home app

Firstly thanks for this great effort. I use this plugin and meter readings are correct in Eve Home app but somehow daily totals are way less than actual values. I spend 10kwh per day in average but in Eve home app I see around 2-3 at most. What can be the cause?

image

No usable data found

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

/dev/ttyUSB0: port not found

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.

Possibility labels to change the labels

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.

Support for Water and Heat meters?

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.

Support for `ser2net` connection to smart meter

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

Port not found

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?

Can not remove P1 accessory from favorites in Home app

After the iOS14 upgrade I discovered something weird. The P1 is added to the Home App as an unsupported accessory. So far nothing new. But is stays in my Favorites. There is no option on the accessory page to remove this.

Any idea how to solve this?

image

Exclusive connection and the use of a splitter

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.

USB cable not found

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?

No accessories in Eve for P1

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?

Homebridge stopped

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

HomeBridge does not fully start after configuring this plugin

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

Can we have a config option to disable the log output?

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

Permission denied, cannot open /dev/ttyUSB0

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

Price per kwh setting in eve app??

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

add option to suppress logging of meter readings

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.

please reopen #42

Erik,

could you reopen #42 ?
I explained the solution in that issue.

kind regards,
Thomas

Support Normal vs Low tariff consumption?

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.

Get no data from P1

Hello,

This is the situation:

What's going wrong and how can I fix it? Any help is appreciated!

No Data available within Eve

Hi,

I use homebridge-p1 v0.2.28 and for several days no history available within the Eve app.
Any solution?

greets,
Vaoske

Installation failed Homebridge plugin for DMSR end-consumer (P1) interface version 0.2.4

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?

Dynamic changing log level on ‘electricity delivered’ throws error

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)

Belgian smart meter telegram causes crash of plugin

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.