NorthernMan54 / homebridge-mcuiot

Homebridge platform plugin that support's a network of nodemcu's running nodemcu-dht-yl69-mdns to display Temperature and Humidity.
30 stars 12 forks source link

Red LED blinking when device is queried, LED state = 2 #6

Closed Techno-Babble closed 6 years ago

Techno-Babble commented 6 years ago

Setting the LED state to 2 in config.lua seems like it should result in LED activity only when the device is booting or an error has occurred. However, while the blue LED remains off, the red LED blinks whenever the device is queried.

-- LED state
module.ledState = 2 -- 0: fully disabled, 1: LEDs on, 2: Connected off (Boot/Error only)

Configured for DHT with DHT22 attached. Curl output:

{ "Hostname": "NODE-XXXXXX", "Model": "DHT", "Version": "1.5", "Firmware": "2.2.0", "Data": {"Temperature": 19.8, "Humidity": 48.6, "Moisture": 0, "Status": 0, "Barometer": -999, "Dew": -999 }}
NorthernMan54 commented 6 years ago

@awein I think this was from your pull request, could you look into it?

awein commented 6 years ago

@NorthernMan54 I'll have an other look within the next few days. I had a quick look and I think I missed to disable flashRed() for ledState 2.

@Techno-Babble you could give ledState = 0 a try until this is fixed if you want to get rid of the flash on access.

NorthernMan54 commented 6 years ago

@Techno-Babble If you can let @awein know if this fixes the issue, much appreciated.

Techno-Babble commented 6 years ago

@awein Confirmed this has fixed it! Thanks