zigbee2mqtt & zigbee USB for Hue bulbs

Posted on
Fri Jul 03, 2020 8:41 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

siclark wrote:
I am finally getting back to these. Looking at the Aqara wireless switches to control the light bulbs. They work great for on/off, and dimming zwave bulbs, but the MQTT color device which is the bulb doesnt appear to support Brighten/Dim By or Start Brightening/Dimming. which I would love be able to use with the hold / release commands from the Aqara wireless switches.

Is that an easy change?


Not sure. I'll take a look.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 03, 2020 9:18 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Try 0.3.2: https://github.com/FlyingDiver/Indigo-S ... /tag/0.3.2

This has both the brightness/onOffState change requested, and also implements BrightenBy and DimBy. The start/stop commands would require additional templates for the MQTT commands and would be a lot more work.

0.3.X is still pre-release. Let me know if these are stable enough to be released on the Plugin Store.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 03, 2020 10:07 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Thanks will do.

Brighten by would normally be fine but the hold doesn’t seem to change anything in the mqtt message, ie no time or counter so nothing for the indigo trigger to react to so holding would just trigger once rather than multiple times.

I need to spend a a little more time on these switches.

I can use double click to activate brighten by set amount and that will work. Its much better than what I have today it had with the hue hub

Posted on
Fri Jul 03, 2020 10:13 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

siclark wrote:
Brighten by would normally be fine but the hold doesn’t seem to change anything in the mqtt message, ie no time or counter so nothing for the indigo trigger to react to so holding would just trigger once rather than multiple times.


So does it send a message when you start to hold (press down) and another when you release? If so, there's probably something you could do with repeating timers and a stop timer on the release.
Or maybe a pester device.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 03, 2020 10:25 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Exactly. Yes I was thinking same. Just a bit more complicated.

Posted on
Fri Jul 03, 2020 12:31 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Hi,

I am getting this error now

Code: Select all
   MQTT Shims Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 107, in runConcurrentThread
  File "plugin.py", line 131, in processMessages
  File "plugin.py", line 453, in update
NameError: global name 'state_list' is not defined

   MQTT Shims Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Fri Jul 03, 2020 12:52 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jul 03, 2020 12:58 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Thbanks..

On and off work without error now, but get this on Brighten by

Code: Select all
   MQTT Shims Error                Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 904, in actionControlDevice
NameError: global name 'dev' is not defined

Posted on
Fri Jul 03, 2020 1:30 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Jul 09, 2020 5:01 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Hi,

Had some issues with the Hue Remote and its taken me a few days to get this working again, so not been playing with the latest version.

Brighten by and dim by are working well now.

I have turned off my hue hub and deleted all the old Hue devices from Indigo as well as my previous devices that used the node-red solution.

I am sure there will be a few more tweaks that could be made but I am happy with how this is working now.

Thanks for your work on this, and its great we can have zigbee devices of all sorts working with Indigo without an expensive hub.

Simon

Posted on
Mon Dec 14, 2020 4:38 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

Hi Joe,

Apologies, life and work got the better of me over the last few months.

My system is working well generally, but I am still not seeing the on/off state update in Indigo. This applies whether I turn the device on or off with indigo, or set the brightness (to 0 for example) even though mqtt reports the state change.

The full mqtt message is
Code: Select all
{"brightness":254,"color":{"x":0.339715260382228,"y":0.347215989076895},"color_temp":192,"linkquality":94,"state":"OFF","update_available":false}

and I have tried setting teh status request payload to this
Code: Select all
{"brightness":"","color":{"x":"","y":""},"color_temp":"","linkquality":"","state":"","update_available":""}.  from just having the state

This is from debug turning it on, from off. The bulb responds correctly, but the indigo doesnt change,
Code: Select all
 MQTT Shims Debug                Kitchen Pendant 1: processMessages: '##HueBulb##' zigbee2mqtt/HueBulb/Kitchen1 -> {"brightness":254,"color":{"x":0.339715260382228,"y":0.347215989076895},"color_temp":192,"linkquality":94,"state":"OFF","update_available":false}
   MQTT Shims Debug                Kitchen Pendant 1: state = OFF
   MQTT Shims Debug                Kitchen Pendant 1: shimColor, state_key = state, value_key = brightness, data = {u'color_temp': 192, u'linkquality': 94, u'update_available': False, u'brightness': 254, u'color': {u'y': 0.347215989076895, u'x': 0.339715260382228}, u'state': u'OFF'}, state = OFF, value = 254
   MQTT Shims Debug                Kitchen Pendant 1: No brightnessLevel, setting onOffState to False
   MQTT Shims Debug                Kitchen Pendant 1: Updating brightnessLevel to 100
   MQTT Shims Debug                Kitchen Pendant 1: convert_color_space_import input: {u'y': 0.347215989076895, u'x': 0.339715260382228}
   MQTT Shims Debug                Kitchen Pendant 1: xy_to_rgb output: 255 250 232
   MQTT Shims Debug                Kitchen Pendant 1: convert_color_space_import output: {'greenLevel': 98.03921568627452, 'redLevel': 100.0, 'blueLevel': 90.98039215686275}
   MQTT Shims Debug                Kitchen Pendant 1: Updating color values to {'greenLevel': 98.03921568627452, 'redLevel': 100.0, 'blueLevel': 90.98039215686275}
   MQTT Shims Debug                Kitchen Pendant 1: Updating states: [{'value': False, 'key': 'onOffState'}, {'value': 100, 'key': 'brightnessLevel'}, {'value': 100.0, 'key': 'redLevel'}, {'value': 98.03921568627452, 'key': 'greenLevel'}, {'value': 90.98039215686275, 'key': 'blueLevel'}]
   MQTT Shims Debug                Kitchen Pendant 1: Updating color temperature to 5208





However when on and I Set brightness to zero in ingido, the icon does go to off
Code: Select all
MQTT Shims Debug                Kitchen Pendant 1: processMessages: '##HueBulb##' zigbee2mqtt/HueBulb/Kitchen1 -> {"brightness":0,"color":{"x":0.339715260382228,"y":0.347215989076895},"color_temp":192,"linkquality":94,"state":"OFF","update_available":false}
   MQTT Shims Debug                Kitchen Pendant 1: state = OFF
   MQTT Shims Debug                Kitchen Pendant 1: shimColor, state_key = state, value_key = brightness, data = {u'color_temp': 192, u'linkquality': 94, u'update_available': False, u'brightness': 0, u'color': {u'y': 0.347215989076895, u'x': 0.339715260382228}, u'state': u'OFF'}, state = OFF, value = 0
   MQTT Shims Debug                Kitchen Pendant 1: No brightnessLevel, setting onOffState to False
   MQTT Shims Debug                Kitchen Pendant 1: Updating brightnessLevel to 0
   MQTT Shims Debug                Kitchen Pendant 1: convert_color_space_import input: {u'y': 0.347215989076895, u'x': 0.339715260382228}
   MQTT Shims Debug                Kitchen Pendant 1: xy_to_rgb output: 255 250 232
   MQTT Shims Debug                Kitchen Pendant 1: convert_color_space_import output: {'greenLevel': 98.03921568627452, 'redLevel': 100.0, 'blueLevel': 90.98039215686275}
   MQTT Shims Debug                Kitchen Pendant 1: Updating color values to {'greenLevel': 98.03921568627452, 'redLevel': 100.0, 'blueLevel': 90.98039215686275}
   MQTT Shims Debug                Kitchen Pendant 1: Updating states: [{'value': False, 'key': 'onOffState'}, {'value': 0, 'key': 'brightnessLevel'}, {'value': 100.0, 'key': 'redLevel'}, {'value': 98.03921568627452, 'key': 'greenLevel'}, {'value': 90.98039215686275, 'key': 'blueLevel'}]
   MQTT Shims Debug                Kitchen Pendant 1: Updating color temperature to 5208



Any ideas? is this an issue in my setup?
Thanks
Simon

Posted on
Mon Dec 14, 2020 7:33 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

I need to see the Shim device definitions again. Best is probably to use the "write device template to log" menu command.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Dec 14, 2020 7:36 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

My simple guess at this, but does the state_location_topic_field need changing from 0?

Code: Select all
message_type: '##HueBulb##'
props:
    SupportsColor: true
    SupportsRGB: true
    SupportsStatusRequest: true
    SupportsWhite: true
    SupportsWhiteTemperature: true
    action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    brightness_scale: '255'
    color_space: HueC
    color_temp_payload_key: color_temp
    color_temp_scale: Mirek
    color_value_payload_key: color
    dimmer_action_payload: '{"state": "ON", "brightness": {{brightness}} }'
    dimmer_action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    off_action_payload: 'OFF'
    on_action_payload: 'ON'
    rgb_scale: '255'
    set_rgb_template: '{"state":"ON","brightness":{{brightness}},"color":{"x":{{x}},"y":{{y}}}}'
    set_rgb_topic: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    set_temp_template: '{"state":"ON","brightness":{{brightness}},"color_temp":{{color_temp}}}'
    set_temp_topic: zigbee2mqtt/HueBulb/{{uniqueID}}/set
    state_location: payload
    state_location_payload_key: state
    state_location_payload_type: json
    state_location_topic_field: '0'
    status_action_payload: '{"brightness":"","color":{"x":"","y":""},"color_temp":"","linkquality":"","state":"","update_available":""}'
    status_action_template: zigbee2mqtt/HueBulb/{{uniqueID}}/get
    uid_location: topic
    uid_location_topic_field: '2'
    value_location_payload_key: brightness
trigger:
    match_list: '["Match: zigbee2mqtt", "Match: HueBulb", "Any: ", "End: "]'
    queueMessage: true
type: shimColor

Posted on
Mon Dec 14, 2020 7:44 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: zigbee2mqtt & zigbee USB for Hue bulbs

siclark wrote:
My simple guess at this, but does the state_location_topic_field need changing from 0?


No, because 'state_location' is 'payload' (not topic).

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Dec 14, 2020 7:49 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: zigbee2mqtt & zigbee USB for Hue bulbs

haha.. ok I will stop my novice debugging then :lol:

Page 6 of 8 1 ... 3, 4, 5, 6, 7, 8

Who is online

Users browsing this forum: No registered users and 2 guests