toto / homebridge-airrohr

HomeBridge module for the DIY luftdaten.info particulates sensor. See http://luftdaten.info how to build your own
http://luftdaten.info
MIT License
52 stars 12 forks source link

homebridge-airrohr crashes Homebridge #9

Closed honkmaster closed 6 years ago

honkmaster commented 6 years ago

I am running homebridge-airrohr since the last update (maybe you remember ;)). Since then, my homebridge instance is crashing every second day or so. The log gives the following information:

/usr/lib/node_modules/homebridge-airrohr/index.js:187
        callback(null);
        ^

TypeError: callback is not a function
    at AirRohrAccessory.updateCache (/usr/lib/node_modules/homebridge-airrohr/index.js:187:9)
    at Timeout.AirRohrAccessory.setInterval [as _onTimeout] (/usr/lib/node_modules/homebridge-airrohr/index.js:213:12)
    at ontimeout (timers.js:458:11)
    at tryOnTimeout (timers.js:296:5)
    at Timer.listOnTimeout (timers.js:259:5)

Can this issue be solved?

toto commented 6 years ago

This probably happens because there is only the public_airquality_json_data but not the public_temperature_json_data set. This case is not considered so far.

honkmaster commented 6 years ago

I have set both:

"public_temperature_json_data": "http://api.luftdaten.info/v1/sensor/3140/",
"public_airquality_json_data": "http://api.luftdaten.info/v1/sensor/3139/",
toto commented 6 years ago

This was a timing problem. Fixed I 1.1.5.

honkmaster commented 6 years ago

Thanks.