amlinger / homebridge-telldus-tdtool

A Homebridge plugin for Tellstick without Live, interfaced with the CLI tool tdtool.
21 stars 11 forks source link

Some sensors are not appearing in HomeKit #48

Open pkempe opened 7 years ago

pkempe commented 7 years ago

Some sensors are not appearing in HomeKit/the Home app even though they are listed as output from tdtool -l (see below). Specifically, the sensors with ID 22, 238 are missing. It seems that the ones not showing up are different over time also, changing with each reboot of the raspberry I use for the setup. I just rebooted after keeping the raspberry running for about two weeks, and during that entire time the sensor ID13 was missing (despite consistently showing up in the tdtool output).

It's important to note that ID 238 never has showed up, so that is probably not related. The other sensors are of the same make/model, and the omission is rotating among these.

PROTOCOL                MODEL                   ID      TEMP    HUMIDITY    RAIN                    WIND                    LAST UPDATED        
mandolyn                temperaturehumidity     13      15.2°   82%                                                         2017-08-24 20:27:06 
mandolyn                temperaturehumidity     21      23.3°   57%                                                         2017-08-24 20:27:14 
oregon                  1A2D                    238     22.1°   43%                                                         2017-08-24 20:27:47 
mandolyn                temperaturehumidity     12      21.9°   51%                                                         2017-08-24 20:27:19 
mandolyn                temperaturehumidity     11      22.2°   53%                                                         2017-08-24 20:27:23 
mandolyn                temperaturehumidity     22      23.0°   51%                                                         2017-08-24 20:27:24 
mandolyn                temperaturehumidity     14      18.1°   61%                                                         2017-08-24 20:27:31 
mandolyn                temperaturehumidity     23      17.7°   54%                                                         2017-08-24 20:27:50 
amlinger commented 7 years ago

Hi @pkempe,

Thanks for the detailed report!

That's interesting, I suspect that that sensor was added after Homebridge was started, in which case it would not be picked up. Could you try to restart Homebridge to verify? Otherwise we'll have to dig a bit deeper :)

As for 238, support for that model is not implemented, as this map is used for lookup to a Model: https://github.com/amlinger/homebridge-telldus-tdtool/blob/master/src/index.js#L12-L19

pkempe commented 7 years ago

You are correct in your assumption, restarting Homebridge indeed makes the sensor appear, so it seems it is really an issue about not starting homebridge until tdtool has picked up a sensor value from each sensor.

Not sure if this is an issue to pursue further, I'm happy with the workaround. It's up to you to close it!