HommiePeter / homebridge-toon-platform

Homebridge Platform to disclose Toon Thermostat and its connected devices (Smoke Detectors, Wallplugs, Huelights) to homekit
GNU General Public License v3.0
5 stars 4 forks source link

Not a valid UUID #5

Closed gielk closed 2 years ago

gielk commented 2 years ago

Homebridge crashed and start every 5 or so minutes because of this plugin. Can someone help me and tell me how to resolve this problem?

I get the following message when starting Homebridge.

[03/01/2022, 14:39:24] [@hommiepeter/homebridge-toon-platform] This plugin generated a warning from the characteristic 'Serial Number': [Serial Number] characteristic must have a length of more than 1 character otherwise HomeKit will reject this accessory, ignoring new value. See https://git.io/JtMGR for more info.
[03/01/2022, 14:39:24] [@hommiepeter/homebridge-toon-platform] Error: 
    at SerialNumber.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2074:105)
    at SerialNumber.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2027:16)
    at SerialNumber.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1334:20)
    at AccessoryInformation.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:475:35)
    at new ToonThermostat (/usr/local/lib/node_modules/@hommiepeter/homebridge-toon-platform/src/ToonThermostat.ts:23:14)
    at new ToonAccessory (/usr/local/lib/node_modules/@hommiepeter/homebridge-toon-platform/src/ToonAccessorry.ts:33:9)
    at ToonHomebridgePlatform.configureAccessory (/usr/local/lib/node_modules/@hommiepeter/homebridge-toon-platform/src/ToonPlatform.ts:110:9)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)

After 6 minutes, homebridge crashes. With the following error

[03/01/2022, 14:44:24] AssertionError [ERR_ASSERTION]: UUID 'co-001-355102:happ_eventmgr_65129DCD436' is not a valid UUID. Try using the provided 'generateUUID' function to create a valid UUID from any arbitrary string, like a serial number.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:419:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at ToonHomebridgePlatform.discoverDevices (/usr/local/lib/node_modules/@hommiepeter/homebridge-toon-platform/src/ToonPlatform.ts:156:27)
    at Timeout._onTimeout (/usr/local/lib/node_modules/@hommiepeter/homebridge-toon-platform/src/ToonPlatform.ts:83:36)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
[03/01/2022, 14:44:24] Got SIGTERM, shutting down Homebridge...
gielk commented 2 years ago

I have now isolated this plugin in a child bridge, it still works if it is not restarting. And now not the whole homebridge is restating.

MikeFumbler commented 2 years ago

To me it seems like HomeBridge (and in my case Hoobs) updates in code or dependencies have crippled the Toon-Platform plugin.

I switched from HomeBridge to Hoobs (more or less a UI around HomeBridge) and found it more stable and intuitive to work with. I run it on a RPi 3B+ and do not know if it runs on other platforms or virtual machines. The biggest benefit of Hoobs is that a plugin can have its own bridge. If one plugin fails, the others keep working.

Hopefully the dev wil have some time to look into it.

HommiePeter commented 2 years ago

Dear Gielk,

i have released a new version of the plugin the is working on the latest version of HomeBridge. I have not tested the plugin on Hoobs because is was primarily developed Homebridge. I will look into Hoobs but cannot promise a fast solution. Maybe using Homebridge in the meantime is a good solution

HommiePeter commented 2 years ago

Dear Gielk,

Problem looks like a cache loading issue. Could you provide me with some more logging information. So I can try to recreate the situation. This issue with the serial nummer not loading correctly from cache is a know issue (looking into it) but the UUID issue is strange and new.

PS: I created a new release (0.9.6) under a new user account at NMPJS HommiePeter73.

gielk commented 2 years ago

@HommiePeter

Hi, there are not any other logging information i can help u with.

[24/01/2022, 16:25:05] [homebridge-toon-platform] This plugin generated a warning from the characteristic 'Serial Number': [Serial Number] characteristic must have a length of more than 1 character otherwise         HomeKit will reject this accessory, ignoring new value. See https://git.io/JtMGR for more info.
[24/01/2022, 16:25:05] [homebridge-toon-platform] Error: 
    at SerialNumber.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105)
    at SerialNumber.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2094:14)
    at SerialNumber.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1376:20)
    at AccessoryInformation.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:475:35)
    at new ToonThermostat (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonThermostat.ts:23:14)
    at new ToonAccessory (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonAccessorry.ts:33:9)
    at ToonHomebridgePlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:110:9)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
AssertionError [ERR_ASSERTION]: UUID 'co-001-355102:happ_eventmgr_65129DCD436' is not a valid UUID. Try using the provided 'generateUUID' function to create a valid UUID from any arbitrary string, like a serial number.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:423:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at ToonHomebridgePlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:156:27)
    at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:83:36)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
[24/01/2022, 16:25:05] [Toon-Platform] Executed didFinishLaunching callback
[24/01/2022, 16:25:05] [Toon-Platform] Using default valies to set Toon status RefreshRate to undefined milli secconds
[24/01/2022, 16:25:05] Homebridge v1.4.0 (HAP v0.10.0) (Toon-Platform) is running on port 56847.
[24/01/2022, 16:25:05] [Toon-Platform] Currently selected agreementIndex: 0
[24/01/2022, 16:25:05] [Toon-Platform] Agreement selected for: *******************************
[24/01/2022, 16:25:05] [Toon-Platform] getToonStatus: Toon status data is retrieved
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: Number of connected Smoke Detectors found is: 4
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: No Hue Lights imported from ToonStatus
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: No Wall plugs imported from ToonStatus
[24/01/2022, 16:25:07] [Toon-Platform] Current Temperature:  20
[24/01/2022, 16:25:07] [Toon-Platform] Current Target Temperature:  20
HommiePeter commented 2 years ago

@HommiePeter

Hi, there are not any other logging information i can help u with.

[24/01/2022, 16:25:05] [homebridge-toon-platform] This plugin generated a warning from the characteristic 'Serial Number': [Serial Number] characteristic must have a length of more than 1 character otherwise         HomeKit will reject this accessory, ignoring new value. See https://git.io/JtMGR for more info.
[24/01/2022, 16:25:05] [homebridge-toon-platform] Error: 
    at SerialNumber.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105)
    at SerialNumber.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2094:14)
    at SerialNumber.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1376:20)
    at AccessoryInformation.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:475:35)
    at new ToonThermostat (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonThermostat.ts:23:14)
    at new ToonAccessory (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonAccessorry.ts:33:9)
    at ToonHomebridgePlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:110:9)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
AssertionError [ERR_ASSERTION]: UUID 'co-001-355102:happ_eventmgr_65129DCD436' is not a valid UUID. Try using the provided 'generateUUID' function to create a valid UUID from any arbitrary string, like a serial number.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:423:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at ToonHomebridgePlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:156:27)
    at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:83:36)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
[24/01/2022, 16:25:05] [Toon-Platform] Executed didFinishLaunching callback
[24/01/2022, 16:25:05] [Toon-Platform] Using default valies to set Toon status RefreshRate to undefined milli secconds
[24/01/2022, 16:25:05] Homebridge v1.4.0 (HAP v0.10.0) (Toon-Platform) is running on port 56847.
[24/01/2022, 16:25:05] [Toon-Platform] Currently selected agreementIndex: 0
[24/01/2022, 16:25:05] [Toon-Platform] Agreement selected for: *******************************
[24/01/2022, 16:25:05] [Toon-Platform] getToonStatus: Toon status data is retrieved
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: Number of connected Smoke Detectors found is: 4
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: No Hue Lights imported from ToonStatus
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: No Wall plugs imported from ToonStatus
[24/01/2022, 16:25:07] [Toon-Platform] Current Temperature:  20
[24/01/2022, 16:25:07] [Toon-Platform] Current Target Temperature:  20

Dear gielk, thanks for your response I will try to look into it this weekend. I have seen some beauty errors on my personal installation as well and they require some repairing as well. I will try to fix your issue in the same release.

HommiePeter commented 2 years ago

@HommiePeter Hi, there are not any other logging information i can help u with.

[24/01/2022, 16:25:05] [homebridge-toon-platform] This plugin generated a warning from the characteristic 'Serial Number': [Serial Number] characteristic must have a length of more than 1 character otherwise         HomeKit will reject this accessory, ignoring new value. See https://git.io/JtMGR for more info.
[24/01/2022, 16:25:05] [homebridge-toon-platform] Error: 
    at SerialNumber.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105)
    at SerialNumber.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2094:14)
    at SerialNumber.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1376:20)
    at AccessoryInformation.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:475:35)
    at new ToonThermostat (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonThermostat.ts:23:14)
    at new ToonAccessory (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonAccessorry.ts:33:9)
    at ToonHomebridgePlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:110:9)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
AssertionError [ERR_ASSERTION]: UUID 'co-001-355102:happ_eventmgr_65129DCD436' is not a valid UUID. Try using the provided 'generateUUID' function to create a valid UUID from any arbitrary string, like a serial number.
   at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:423:11)
   at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
   at ToonHomebridgePlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:156:27)
   at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-toon-platform/src/ToonPlatform.ts:83:36)
   at listOnTimeout (node:internal/timers:557:17)
   at processTimers (node:internal/timers:500:7)
[24/01/2022, 16:25:05] [Toon-Platform] Executed didFinishLaunching callback
[24/01/2022, 16:25:05] [Toon-Platform] Using default valies to set Toon status RefreshRate to undefined milli secconds
[24/01/2022, 16:25:05] Homebridge v1.4.0 (HAP v0.10.0) (Toon-Platform) is running on port 56847.
[24/01/2022, 16:25:05] [Toon-Platform] Currently selected agreementIndex: 0
[24/01/2022, 16:25:05] [Toon-Platform] Agreement selected for: *******************************
[24/01/2022, 16:25:05] [Toon-Platform] getToonStatus: Toon status data is retrieved
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: Number of connected Smoke Detectors found is: 4
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: No Hue Lights imported from ToonStatus
[24/01/2022, 16:25:05] [Toon-Platform] ToonConnection.initialize: No Wall plugs imported from ToonStatus
[24/01/2022, 16:25:07] [Toon-Platform] Current Temperature:  20
[24/01/2022, 16:25:07] [Toon-Platform] Current Target Temperature:  20

Dear gielk, thanks for your response I will try to look into it this weekend. I have seen some beauty errors on my personal installation as well and they require some repairing as well. I will try to fix your issue in the same release.

Dear Gielk,

today a released a new version the the plugin. To my knowledge the start up warning (Serial Number) should no longer occur and resolve the crashing as well. Could you please check if in the new version your issue still remains ? If not please close this issue. If the issue still remains could you please provide me with the start up logging .

With Kind regards,

Peter

gielk commented 2 years ago

@HommiePeter Thanks a lot, this issue has been fixed for me. BUT.... Now when I change the temperature nothing happens, it is not responding to change. When I change the temperature in HomeKit I don't see a log of any activities. The target temperature stays the same. It can read the current temperature and also the target temperature. I would love to provide a log, but there isn't any. I hope this makes sense?

gielk commented 2 years ago

@HommiePeter I have downgraded back to v0.9.6 because it is not working in the latest version.

gielk commented 2 years ago

"Remove Single Cached Accessory" worked for me.