ConBee ZigBee Stick and HA, will this work together?

For some reason they came up thrid time i did a restart of HASS docker container.

Regarding the group state, it still doesn’t work :

Here is what Hass says after turn on light that has lowered in brightness before turn off :

ight.kkken_spots	on	brightness: 255
color_temp: 500
min_mireds: 154
max_mireds: 500
friendly_name: Køkken spots
supported_features: 47

and here is the state in deconz

{
   "action": {
       "bri": 136,
       "colormode": "ct",
       "ct": 500,
       "effect": "none",
       "hue": 0,
       "on": true,
       "sat": 127,
       "xy": [
           0,
           0
       ]
   },
   "class": "Other",
   "devicemembership": [],
   "etag": "1da69cc1f40c4ea2e22243b61735b92d",
   "hidden": false,
   "id": "8",
   "lights": [
       "17",
       "21",
       "13",
       "19",
       "12",
       "20",
       "14",
       "15",
       "18",
       "16"
   ],
   "lightsequence": [
       "12",
       "13",
       "14",
       "15",
       "16",
       "17",
       "20",
       "18",
       "19",
       "21"
   ],
   "multideviceids": [],
   "name": "Køkken spots",
   "scenes": [],
   "state": {
       "any_on": true
   },
   "type": "LightGroup"
}

As you can see the bri is not consistent

And here is some more feedback :

  1. I think you should write ºC instead of Celsius
  2. It should be hPa instead of kPa for pressure
  3. Humidity should be divided by 100 at least for the Xiaomi sensor (see the json file i sent you earlier)
  4. I have a group where one OSRAM RGBW Gardenpole are added to. In HASS i can’t control the extended colors but only color temperature on this group. I think you need to enable both color temperature and XY color on groups because you can’t predict what kind of lights the users add to a group.

Here is the group in deconz

{
    "action": {
        "bri": 127,
        "colormode": "hs",
        "ct": 0,
        "effect": "none",
        "hue": 0,
        "on": false,
        "sat": 127,
        "xy": [
            0,
            0
        ]
    },
    "class": "Other",
    "devicemembership": [],
    "etag": "35e35c06a4d4d43fa8bb7c41c03d91d5",
    "hidden": false,
    "id": "10",
    "lights": [
        "22"
    ],
    "lightsequence": [],
    "multideviceids": [],
    "name": "Bedlampe",
    "scenes": [],
    "state": {
        "any_on": true
    },
    "type": "LightGroup"
}

I’m looking in to this with brightness and groups.

It seems that groups doesn’t keep any own state in deconz, which means I’d have to save them myself.

So the only behaviour with group will be statically set values from when groups have been changed by the user, is that what you’re expecting?

  1. Yes, my fault
  2. Thought I was smart here… Will fix
  3. Will fix!
  4. Great! First light of that type tested with component, will add what you suggested

These are now fixed. Try them out to see if it gets any better.

So the only behavior with group will be statically set values from when groups have been changed by the user, is that what you’re expecting?

I am not sure i understand what you mean but what i want is following (assuming the group is off and at 100% bri) :

  • Turn on the group/light
  • Light(s) brightness is on 100%
  • User sets the brightness of the group to 50%
  • Light(s) brightness is on 50%
  • User turns the group/light off
  • Light(s) turn off
  • User turns the group/light on
    => Lights are on on 50% brightness and HASS shows the same

I tried latest version and all units seems correct now but have you done any attempt to solve above ? I still can’t get it to work but i guess that’s the case if you haven’t done any attempt :wink:

Great description, this clarifies what you’re after.

It might be some issues with the group functionality, I will delve deeper into this tonight.

Great, look forward to that. I will move more that i have to the new component to test further…

I’d love to give this a try, what’s the easiest way to dig out all the bits needed? I’ve got HA in a virtualenv at the moment. I noticed talk above about pulling the deconz.py files and sticking them in a custom_component? Is there an easy way to do that and keep up to date with your ongoing changes?

Not at the moment unless you have access to components folder in site-packages which i don’t or it’s to big a hassle to do so i just pull changes, copy the files, change the from homeassistant.components.deconz import to from custom_components.deconz import in sensor/deconz.py , light/deconz.py and binary_sensor/deconz.py and leave custom_components/deconz.py without any changes. @Robban is ironing hopefully some of the last things before (hopefully) get’s into next release.

You could do symlinks to the files as well, then you won’t have to do the copy part.

@donnib suggestion is the easiest way since Im still fixing a last few things before official handover and if a few people can verify that all parts work as expected I can sleep better at night ;). So in your virtual-env find your site-packages/home-assistant/components and put the files in to that folder structure.

Yeah but now since this is only something i do rare i am ok, it takes few minutes and i have the latest changes :wink:

Interesting discussion on github btw :wink: :stuck_out_tongue:

1 Like

Yes. But it was based on a misunderstanding. Will leave it as it is until Balloob says otherwise

Yes i agree and it’s inline what we have spoken about. I am satisfied at least :wink:

So I’ve followed your description and feel satisfied in the behaviour now.

The issue is that deconz doesn’t send any state information about groups over websockets, else it would be seamless. So I’ve added a call in the set function for groups that will update the local variables from the set request, which means it might be cases where the will be small discrepancies between true values and what state you see on the group. It seems ok, but I won’t test it more right now.

Color temp seems to work to set aswell

leaving it here for posterity, in case any other wanna be testers come along. For virtualenv, I cloned your repo to another dir then used the following symlinks:

ln -s /path/to/home-assistant/homeassistant/components/sensor/deconz.py /home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/deconz.py
ln -s /path/to/home-assistant/homeassistant/components/light/deconz.py /home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/deconz.py
ln -s /path/to/home-assistant/homeassistant/components/binary_sensor/deconz.py /home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/binary_sensor/deconz.py
ln -s /path/to/home-assistant/homeassistant/components/deconz.py /home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/components/deconz.py
ln -s /path/to/home-assistant/homeassistant/util/json.py /home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/util/json.py
ln -s /path/to/home-assistant/homeassistant/helpers/icon.py /home/homeassistant/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/icon.py

Seemed to do the job, I can see the auto discovered light and remote battery sensor. I guess its automation time to actually use the remote properly!

1 Like

Great!

Don’t be shy with feedback, it will be harder to change stuff after it has gotten integrated.

@simonporter007 I’d be happy if you take 2 minutes to review the component documentation PR.