imcfarla2003 / domoticz-hive

Domoticz plugin for Hive
MIT License
4 stars 3 forks source link

Candle lamps not recognised #13

Closed dwhile closed 4 years ago

dwhile commented 4 years ago

I have 4 of the warm white candle lamps and they are not recognised by the plugin.

The log shows:

2019-11-24 14:00:51.979 (House - Hive) Light not found Warm White Light 1 2019-11-24 14:00:51.980 (House - Hive) Light not found Warm White Light 2 2019-11-24 14:00:51.980 (House - Hive) Light not found Warm White Light 3 2019-11-24 14:00:51.980 (House - Hive) Light not found Warm White Light 4

I have looked at the code and it appears that these lamps are marked as FWCLBulb01UK.

The code around line 541 which adds the device if not present checks the model attribute and as it is not there results in the lamp not being added.

dwhile commented 4 years ago

I have done some more debugging on this and now have them working. There are several issues. The main one being there is no targetvalue attribute so have to use the reportedvalue attribute when checking. However to turn the light on and set the brightness you do use the targetvalue attribute!

imcfarla2003 commented 4 years ago

Can you share a diff to add the model to the code please?

imcfarla2003 commented 4 years ago

I have just updated the code - can you try with the latest version please?

dwhile commented 4 years ago

Hi Sorry can't check it as I have made my own plugin now which does what I need it to.