spatialdude / homebridge-ecowitt

A Homebridge plugin supporting a wide range of Ecowitt sensors
https://www.npmjs.com/package/homebridge-ecowitt
Apache License 2.0
12 stars 18 forks source link

Plug in Looses Room on restart #20

Open dxdr opened 2 years ago

dxdr commented 2 years ago

Whenever homebridge is restarted, the soil humidity sensors default back to "Default Room" when they had previously been set to a different room

cypherpork commented 1 year ago

I am having the same problem. Perhaps, it has something to do with an issue that also causes the home bridge to restart twice because the first restart causes the following: `[12/3/2022, 4:15:19 PM] [Ecowitt] Data source address: ::ffff:10.1.10.41 [12/3/2022, 4:15:19 PM] [Ecowitt] Request: POST /data/report HTTP/1.1 host: 10.1.10.11 connection: Close content-type: application/x-www-form-urlencoded content-length: 354

[12/3/2022, 4:15:19 PM] [Ecowitt] Data report: { "PASSKEY": "", "stationtype": "GW1100B_V2.2.0", "runtime": "1443881", "dateutc": "2022-12-04 00:15:19", "tempinf": "61.16", "humidityin": "57", "baromrelin": "29.961", "baromabsin": "29.961", "soilmoisture1": "32", "soilmoisture2": "34", "soilmoisture3": "44", "soilmoisture4": "59", "soilmoisture5": "34", "soilbatt1": "1.5", "soilbatt2": "1.6", "soilbatt3": "1.6", "soilbatt4": "1.6", "soilbatt5": "1.6", "freq": "915M", "model": "GW1100B" } [12/3/2022, 4:15:19 PM] [Ecowitt] stationTypeInfo: null [12/3/2022, 4:15:19 PM] [Ecowitt] modelInfo: null [12/3/2022, 4:15:19 PM] [Ecowitt] Discovering sensors [12/3/2022, 4:15:19 PM] [Ecowitt] Adding sensor: WH51 channel: 1 [12/3/2022, 4:15:19 PM] [Ecowitt] Adding sensor: WH51 channel: 2 [12/3/2022, 4:15:19 PM] [Ecowitt] Adding sensor: WH51 channel: 3 [12/3/2022, 4:15:19 PM] [Ecowitt] Adding sensor: WH51 channel: 4 [12/3/2022, 4:15:19 PM] [Ecowitt] Adding sensor: WH51 channel: 5 [12/3/2022, 4:15:19 PM] [Ecowitt] StationInfo: { "model": "GW1100B", "deviceName": "", "serialNumber": "", "hardwareRevision": "", "softwareRevision": "", "firmwareRevision": "", "frequency": "915M", "PASSKEY": "", "sensors": [ { "type": "WH51", "channel": 1 }, { "type": "WH51", "channel": 2 }, { "type": "WH51", "channel": 3 }, { "type": "WH51", "channel": 4 }, { "type": "WH51", "channel": 5 } ] } [12/3/2022, 4:15:19 PM] [Ecowitt] sensorId: -WH51-1 uuid: **** [12/3/2022, 4:15:19 PM] [Ecowitt] Restoring existing accessory from cache: WH51 [12/3/2022, 4:15:19 PM] Error: Cannot find the bridged Accessory to remove. at Bridge.Accessory.removeBridgedAccessory (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:717:13) at Bridge.Accessory.removeBridgedAccessories (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:733:12) at BridgeService.handleUnregisterPlatformAccessories (/homebridge/node_modules/homebridge/src/bridgeService.ts:404:17) at HomebridgeAPI.emit (node:events:527:28) at HomebridgeAPI.unregisterPlatformAccessories (/homebridge/node_modules/homebridge/src/api.ts:355:10) at EcowittPlatform.registerAccessories (/homebridge/node_modules/homebridge-ecowitt/src/EcowittPlatform.ts:267:18) at EcowittPlatform.onDataReport (/homebridge/node_modules/homebridge-ecowitt/src/EcowittPlatform.ts:136:12) at /homebridge/node_modules/homebridge-ecowitt/src/EcowittPlatform.ts:82:14 at nextTick (/homebridge/node_modules/homebridge-ecowitt/node_modules/restify/lib/chain.js:167:13) at processTicksAndRejections (node:internal/process/task_queues:78:11) [12/3/2022, 4:15:19 PM] Got SIGTERM, shutting down Homebridge...`

abrainwood commented 1 year ago

+1 @cypherpork I've got the same issue as you - that's issue #3

askseb commented 1 year ago

Was there ever a solution to fixing this? I am not able to rename the sensors either.

rhockenbury commented 6 days ago

Hi @dxdr, @abrainwood, @askseb. I have a new Ecowitt plugin available (v2), check out Homebridge Ecowitt Weather Sensors which can be installed through the Homebridge UI. Not sure what exactly is causing the issue you mentioned with the rooms, but I went ahead and tested for that case and didn't see that issue. Would appreciate any feedback if you have time to give this new version a try, and let me know if you hit any issues.

abrainwood commented 5 days ago

Thanks @rhockenbury . I’m not using home bridge at the moment but if I spin it up again I’ll give this a go. Cheers