ConBee ZigBee Stick and HA, will this work together?

@simonporter007 i don’t have any issues and i have over 40 IKEA lights paired with deConz, which version are you running ? I ask the obvious, do you open the network and then power on the light ? Have you tried to reset the light e.g power cycle 10 times then open network and power on the light ?

I’ve tried upgrading deconz to the .78 version. I am running the beta ubuntu version, don’t know if that matters. I open the network for 10 minutes, just in case I was missing my window, hold the light ridiculously close to the USB with it turned on. I didn’t cycle it 10 times actually, only 6 - where it gives a sort of flash and then stays on. I will try with 10, maybe thats the ticket. You also sound like you open the network and then turn the light on, I’ve been just opening the network with the light already on and holding it close. I’ll try your suggestions, thanks.

Yeah it’s 6 times, that is correct, as long as the light flashes then you are good. It’s crucial that you open the network then turn on the light.

Thanks @donnib I got it working as you said, the key was to open the network and then switch the bulbs on (I totally misunderstood that part) and also my systemd service was incorrect, it was running as my user rather than root. Sorted those two out and I now have the dimmer and bulb connected in deconz. Let the tinkering begin! thanks again.

FYI; All developers from the Home Assistant community (as well as developers from other open source home automation projects too) can request to the documentation for the native serial UART protocol for ConBee and RaspBee adapters here:

After you request the docummentation @manupu will then simply be given access to their private repository that so far only contains a link to the documentation serial UART protocol for ConBee and RaspBee adapters (“deCONZ Serial Protocol”):

This in turn only contain a link to a PDF-documentation on www.dresden-elektronik.de website containing the written documentation. Reason why this documentation is only provided upon request and not posted in public is that they don’t want to have to offer support to non serious developers.

Do you have any more info on that zigbee sniffer? Seems awesome and I want to build one!

  • google translate (unless you can read french of course :slight_smile: )

Hi,

I use a usb deconz and it works great with only installing the deb packages for raspbian. For the moment it’s not connected to my HA, but with the web interface it’s working very well. As there’s an api for the moment I will use this. But it will be very interesting to use the uart directly for HA.

If needed I have osram lights, and I can test a future component for HA and deconz.

I’ve just gotten my conbee and installed decent rest-api. It doesn’t seem to find any devices, any steps I should make sure to make to get this going?

/R

Hi Robban,

From what I know you’ll just have to install the deb file for deconz. No need to compile rest api as it’s already done in the deb package.

For discovering light, in my case osram, you’ll have to to switch off all the devices , then open your network from your web deconz interface and switch on the lights. When the lights blinks a short time they are in the zigbee network.

For the moment I decide to make a shell_command to control zigbee lights over deconz api by HA. Then I use in HA a template light.
Everything is ok but I have to get the status of the light and don’t know how to do. I can get the status by deconz API but HOw in template send the status.

If someone know ?

Thanks @Sellig28!

I haven’t debugged it any more but I’m pretty certain it is because of the ftdi driver being loaded

Has anyone been able to get it to work in a docker container?

deCONZ just does not find my ConBee stick even though the device itself is available in the container…

Just in case it’s a little bit ugly but I succeed using osram lights with deconz with:

  • HA (home assistant) mqtt json light

  • a bash script used as service

  • mosquitto client or equivalent

  • last deconz packqge with rest/api included.

  • json query bash package

#!/bin/bash

#variables
DEBUG=$1
mqtt_state_topic='ha/lights/state'
mqtt_cmd_topic='ha/lights/cmd/#'

GATEWAY='XX.XX.XX.XX'
API='XXXXXXXXXXXXXX'


mqtt_subscribe()
{
while read MSG;
do
if [[ "$MSG" != "" ]]
then
TOPIC=$(echo "$MSG" | awk '{print $1 }')
DEVICE=$(echo "$TOPIC" | awk -F '/' '{print $4 }')
BRIGHTNESS=$(echo "$MSG" | awk -F "\ " '{$1="";print $0}' | jq -r '.brightness')
WHITE_VALUE=$(echo "$MSG" | awk -F "\ " '{$1="";print $0}' | jq -r '.white_value')
STATE=$(echo "$MSG" | awk -F "\ " '{$1="";print $0}' | jq -r '.state')
mosquitto_pub -r -t "$mqtt_state_topic/$DEVICE" -m '{ "state": '"\"$STATE\" }"
light_cmd $DEVICE $STATE

if [[ $DEBUG == "debug" ]]
then
echo "$MSG"
echo "TOPIC: $TOPIC"
echo "DEVICE: $DEVICE" 
echo "state: $STATE"
echo "bright: $BRIGHTNESS"
echo "white: $WHITE_VALUE"
fi
fi

done < <(mosquitto_sub -v -t "$mqtt_cmd_topic" -q 1)
}


light_cmd()
{
local DEVICE=$1
local CMD=$2
if [ "$DEVICE" == "salon" ]
then
DEVICE=1
fi
if [ "$DEVICE" == "sejour" ]
then
DEVICE=2
fi

if [ $CMD == "ON" ]
then
if [[ ( "$BRIGHTNESS" != '' && $STATE == "ON" ) ]]
then 
if [[ "$BRIGHTNESS" != 'null' ]]
then 
curl -s --request PUT -H "Content-Type: application/json" -d '{"on":true,"bri":'"$BRIGHTNESS"'}' "http://$GATEWAY:8080/api/$API/groups/$DEVICE/action" > /dev/null
else
curl -s --request PUT -H "Content-Type: application/json" -d '{"on":true}' "http://$GATEWAY:8080/api/$API/groups/$DEVICE/action" > /dev/null
fi
fi
fi

if [ $CMD == "OFF" ]
then
curl -s --request PUT -H "Content-Type: application/json" -d '{"on":false}' "http://$GATEWAY:8080/api/$API/groups/$DEVICE/action" > /dev/null
fi

}

mqtt_subscribe


example of light:

- platform: mqtt_json
  name: "Salon"
  state_topic: "ha/lights/state/salon"
  command_topic: "ha/lights/cmd/salon"
  brightness: true
  retain: true
  qos: 1
  white_value: true

Some remarks:

  • The light_cmd function need manual action to be functional (same name and numbers as your groups)
  • I don’t have any rgb zigbee so if you need you can add it
  • the state works well until no physical switch (perhaps need to poll regularly to know the pysical state, possible with deconz api)
  • white value are not sent for the moment.

I know it’s not the best, it’s better to have a serial interface directly, but I don’t know doing that.

Sellig28

Hi, I’ve been offline for some time.
I can see that is has been a lot of good response, so I’ll have some reading to do.
Thanks every one for posting.

Paul

Hi guys!

I’ve put up a PR for a Deconz component, still a work in progress though. Would love for some feedback.

https://github.com/home-assistant/home-assistant/pull/10321

/R

1 Like

@Robban So i have seen your PR, it doesn’t seem you used any parts from my component. Right ? I am not sure how much is supported, i think you should be more specific, what works and what doesn’t work and how things are supposed to work. I suggest to document something like i did on my component which you know the link to.

Another user has taken my component and also did what i wished i had done, he has a Py library here : https://github.com/HerrHofrat/deconz_py and the component here : https://bitbucket.org/romanski/deconz-custom-module/branch/feature/rewrite_with_deconz_py

Essentially it would be best to merge all together, not sure if that’s feasible. I will at least look at his changes and see if i can pull them into my module since it made the component better.

1 Like

Hi @donnib

Just as with the Axis component, I do this to learn so I chose not to use any parts directly from your implementation so far. But since I don’t have all light hardware, I might look at how you’ve supported specific brands and devices.

I will create component documentation for the hass homepage as is required for all new components. In the end it is not much to configure for the component so it will be quite short, possibly with an example or two.

Supported devices:

  • Lights, dimmable but able to set temperature or color right now. Exposed as a light.
  • Motion detectors. Exposed as binary sensor.
  • Remote controls. Exposed as sensor.

Haven’t decided if I should add support for groups and scenes yet.

Ok, thats great. What did HerrHofrat do?

Try the PR and have a look in the code and tell me what you’d like done different. Or works better with your implementation. Or a patch. We can talk on Discord or somewhere if you’d like.

/R

Hi there! I created a python library from donnib’s inital sources and built the home assistant sensors around it. I only have tested with xiaomi sensors at the moment. Buttons, PIR & Light and Door Sensors are working fine with it. I just did not open a PR because I want to wait for someone to test the light implementation and for the temperature sensors to arrive.

Seems like your library only supports ZHAPresence and ZHASwitch. Would be good if it supports all sensor types.

Agree all sensors type are required at least for me. My module albeit simple supports all of those that i need. Also without groups i can’t use the components since turning on 10 lights thru REST is really bad practice so groups are a must for me. Scenes has not been a priority for me since i use scenes in HA.

I can make you the groups available in my custom component - they should already get loaded over deconz_py, but are not yet used in the light component. Would be awesome if we could collaborate on that!