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

Keep getting log messages despite log level 0 #75

Closed
jeroen020 opened this issue Mar 31, 2023 · 9 comments
Closed

Keep getting log messages despite log level 0 #75

jeroen020 opened this issue Mar 31, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@jeroen020
Copy link

It's been a while since I check my Pi running Homebridge and I was updating my plugins today. On the Status page I'm getting continuous (multiple per second) log messages from the P1 plugin. I've set the Log Level of the Electricity accessory to 0 in the Eve app, but no change. The log does state
[31/03/2023, 14:23:06] [P1] Electricity: Log Level: changed to 0 (from 1)
Maybe something caused by the latest Apple updates?

@ebaauw
Copy link
Owner

ebaauw commented Mar 31, 2023

No, this is Homebridge stuff, nothing to do with iOS, etc. versions. What messages do you get after that "Log Level: changed to 0" message?

@jeroen020
Copy link
Author

It looks like this:

[31/03/2023, 18:12:20] [P1] Electricity: Log Level: changed to 0 (from 1)
2023-03-31T16:12:21.029Z ciao:Responder Sending response via unicast to {"address":"192.168.2.140","port":5353,"interface":"eth0"} (took 6 ms): [PTR,PTR,PTR,PTR] answers and [TXT,SRV,A,AAAA,AAAA,NSEC,NSEC,TXT,SRV,A,AAAA,AAAA,NSEC,NSEC,TXT,SRV,A,AAAA,AAAA,NSEC,NSEC,TXT,SRV,A,AAAA,AAAA,NSEC,NSEC] additionals with size 1398B (UPS: 1440)
2023-03-31T16:12:21.030Z ciao:Responder Sending response via unicast to {"address":"192.168.2.140","port":5353,"interface":"eth0"} (took 7 ms): [PTR,PTR,PTR,PTR] answers and [TXT,SRV,A,AAAA,AAAA,NSEC,NSEC,TXT,SRV,A,AAAA,AAAA,NSEC,NSEC,TXT,SRV,A,AAAA,AAAA,NSEC,NSEC,TXT,SRV,A,AAAA,AAAA,NSEC,NSEC] additionals with size 1316B (UPS: 1440)
[31/03/2023, 18:12:21] [P1] Electricity Phase 1: Consumption: set to 1254 W (from 1247 W)
[31/03/2023, 18:12:21] [P1] Electricity Phase 1: Voltage: set to 227.9 V (from 228 V)
[31/03/2023, 18:12:21] [P1] Electricity Phase 2: Voltage: set to 228.8 V (from 229 V)
[31/03/2023, 18:12:21] [P1] Electricity Phase 3: Voltage: set to 228.5 V (from 228.6 V)
[31/03/2023, 18:12:21] [P1] Electricity Delivered Phase 3: Consumption: set to 70 W (from 78 W)
[31/03/2023, 18:12:22] [P1] Electricity Phase 1: Consumption: set to 1245 W (from 1254 W)
[31/03/2023, 18:12:22] [P1] Electricity Phase 1: Voltage: set to 228.1 V (from 227.9 V)
[31/03/2023, 18:12:22] [P1] Electricity Phase 2: Consumption: set to 78 W (from 79 W)
[31/03/2023, 18:12:22] [P1] Electricity Phase 2: Voltage: set to 229.1 V (from 228.8 V)
[31/03/2023, 18:12:22] [P1] Electricity Phase 3: Voltage: set to 228.7 V (from 228.5 V)
[31/03/2023, 18:12:22] [P1] Electricity Delivered Phase 3: Consumption: set to 79 W (from 70 W)

@ebaauw ebaauw added the bug Something isn't working label Mar 31, 2023
@ebaauw
Copy link
Owner

ebaauw commented Mar 31, 2023

Thanks. Looks like the accessory for the phases doesn’t sync the log level to the electricity accessory.

ebaauw added a commit that referenced this issue Mar 31, 2023
Sync log level of Electricity Details accessory, see #75.
@ebaauw
Copy link
Owner

ebaauw commented Apr 9, 2023

In v1.3.5.

@jeroen020
Copy link
Author

jeroen020 commented Apr 9, 2023

Just installed but now P1 throws errors (so fast I can’t even copy & paste from the status screen in HB) and I need to disable the plugin for HomeBridge to work. I got the lines below from a screenshot I took:

EDIT : reverted to 1.3.4 and then I no longer get the issue.

[09/04/2023, 10:35:43] [P1] ISK5\2M550T-1012 v5.0
[09/04/2023,
10:35:431
[P11 Electricity: Configured Name: warning: 7 listeners
Hostname
homebridge
[09/04/2023,
10:35:43] [P1] Electricity: On: warning: 7 listeners
[09/04/2023, 10:35:43] (P1] Electricity: Log Level: warning: 7 listeners
IPv4 (eth0)
192.168.2.235
[09/04/2023, 10:35:43] (P1] Electricity History: Configured Name: warning:
7 listeners
[09/04/2023, 10:35:43] (P] Electricity History: History Request: warning: 7 listeners
IPv6 (eth0)
fabd:3f06:28d:4369:81c:9a77:c
[09/04/2023,
10:35:431
[P11 Electricity History: SetTime: warning: 7 listeners
[09/04/2023,
10:35:431 P11 warning: TypeError: delegate: not an AccessoryDelegate
Node.is Version v18.15.0
ElectricityDetails.inheritLogLevel
Lib/node modules /homebridge-pl/node modules /homebridge
-lib/lib/AccessoryDelegate.is:288:13)
User
pi
at new ElectricityDetails (/usr/local/lib/node modules /homebridge-pl/lib/PlAccessory.is:69:10 ) at Electricity.check (/usr/local/lib/node modules /homebridge-pl/lib/PlAccessory. is:29:24)
Storage Path /var/lib/homebridge
at new Electricity (/usr/local/lib/node modules /homebridge-pl/lib/PlAccessory.is:56:10 ) at PIPlatform.onData (/usr/local/lib/node modules /homebridge-pl/lib/PIPlatform. is: 181:26)
Config Path /var/lib/homebridge/config.son
at PIClient.<anonymous> (/usr/local/lib/node modules /homebridge-pl/lib/PIPlatform.is: 117:40)
Service Mode
Yes
at PIClient.emit (node:events: 513:28 ) at PIClient.emit (node: domain: 489: 12)
at PiClient.parseTelegram (/usr/local/lib/node_ modules /homebridge-pl/lib/PIClient.js:682:12)
ReadlineParser.
<anonymous> (/usr/local/lib/node modules /homebridge-pl/lib/PiClient. is:424:51)

@ebaauw
Copy link
Owner

ebaauw commented Apr 9, 2023

Hm, looks like the inheritLogLevel() is called a bit too early, before the main Electricity accessory has initialised.

ebaauw added a commit that referenced this issue Apr 9, 2023
Delay call to `inheritLogLevel()` until after main _Electricity_ accessory has initialed, see #75.
@ebaauw
Copy link
Owner

ebaauw commented Apr 9, 2023

Could you try beta v1.3.6-0? I don't have 3-phase electricity, so it's hard for me to test.

@jeroen020
Copy link
Author

Just tried and the beta fixes the issue, and now the log level = 0 command stops the continuous logging as expected. So this is the one I think! Thanks a lot of the rapid fix during Easter, much appreciated.

@ebaauw
Copy link
Owner

ebaauw commented Apr 9, 2023

Published v1.3.6, and removed v1.3.5 and the beta.

@ebaauw ebaauw closed this as completed Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants