DeCONZ, ZHA and Zigbee components and compatible hardware

I guess i have to put appdeamon on my to-do-list. :rofl:

1 Like

I’m trying to use deconz with home assistant, not hassio. I have the docker image from marthoc but I need to change the HTTP ports, since 80/443 are already in use by home assistant. Anyone have some advice on what is missing below - I see I always get a config.ini file with port 80 after docker start…

docker-compose.yaml:

deconz:
container_name: deconz
image: marthoc/deconz
network_mode: “host”
restart: always
volumes:
- /opt/deconz:/root/.local/share/dresden-elektronik/deCONZ
devices:
- /dev/ttyUSB0
environment:
- DECONZ_WEB_PORT=8100
- DECONZ_WS_PORT=8103
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0

Never mind the config ini for a moment - is deconz running on the proper ports with those options?

No - the docker startup log is showing port 80/443.

15:43:24:352 GW firmware version: 0x26210500
15:43:24:352 GW firmware version is up to date: 0x26210500
15:43:29:276 Daylight now: goldenHour1, status: 160, daylight: 1, dark: 0
15:43:39:276 Daylight now: goldenHour1, status: 160, daylight: 1, dark: 0
15:43:49:279 [marthoc/deconz] Starting deCONZ…
[marthoc/deconz] Current deCONZ version: 2.05.28
[marthoc/deconz] Web UI port: 80
[marthoc/deconz] Websockets port: 443
libpng warning: iCCP: known incorrect sRGB profile

You can let deconz use the default ports in the container. It does not matter since they are not automatically exposed. You need to specify a port mapping in your docker compose file for the ports you want to be able to access from outside of the container. So just map e.g. 8080 to Port 80 of the deconz container and all is well.

@jo-me This won’t work with the current HA integration - the component queries the API for the ws port and then tries to connect. So deconz needs to be running on the proper ports. Also the docker compose file as pasted uses host networking so no need to map individual ports.

@e8link I just tested and it’s working as it should for me - maybe your syntax/formatting is wrong? Also your log output seems incorrect, since the [marthoc/deconz] lines should come first…

Oh, I see.
So only the web interface port can currently be configured in HA.
What is that one used for?

The REST API (which the component uses to control/modify devices) is available over the web port, the websockets interface (which the component uses to get real-time updates re: device status) is on the ws port.

I’d prefer not to allow configuration of the web port either. But unfortunately when wifi is available on device deconz might tell hass the wrong port… (Early issue for a couple of users)

Well got it working using the ports option in docker-compose. Here is what I’m currently using in my docker-compose.yaml file:

deconz:
image: marthoc/deconz
container_name: deconz
network_mode: host
restart: always
ports:
- “8103:443”
- “8100:80”
volumes:
- /opt/deconz:/root/.local/share/dresden-elektronik/deCONZ
devices:
- /dev/ttyUSB0
environment:
- DECONZ_WEB_PORT=8100
- DECONZ_WS_PORT=8103
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=0

Guys,

I bought one of those Xiaomi Smart Switch ( https://pt.gearbest.com/access-control/pp_626695.html?wid=1433363&currency=EUR&vip=14577034&gclid=EAIaIQobChMIkZWki--H3AIVQWYbCh34CA7FEAQYAyABEgLo4fD_BwE), added it to Phoscon App as a Switch:

But it’s showing on Hassio only as Battery Sensor, not as Switch or Binary.

Any Help? Thanks

Check out the dimmer example in the deconz doc. The switch emit events when the button is pressed.

1 Like

Just wondering if anyone seen any issues with DeCONZ after upgrading to 0.73?

I am getting the following after starting HASS:

2018-07-07 20:28:50 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2018-07-07 20:28:50 ERROR (MainThread) [pydeconz.websocket] Unexpected error None
2018-07-07 20:28:50 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2018-07-07 20:28:50 DEBUG (MainThread) [pydeconz.websocket] Reconnecting to deCONZ in 15.

Only way to get it working is downgrading to 0.72.1, very weird.

The websocket implementation has changed. Are you running deconz standalone or in a container?

Oh, ok, I am running standalone.
I couldn’t find anything about it, anything I can do?
Nevermind, just saw https://github.com/home-assistant/home-assistant/issues/15310

1 Like

The simplest solution is to go over to using the deConz docker container. If you do that on the same machine you can keep your configuration so you shouldn’t really notice anything

Hello hello!
Just wondering if you guys have seen something like that. I got a circular Xiaomi switch and I it’s fine to add it on DeCONZ (even though it doesn’t show up on the WebUI), it does show up in the DB (a GET on the sensors show them up).
Only thing is that I can’t see them on my HA at all meaning that even though when I push the buttons, they show up on the HA logs as events, HA doesn’t do anything and I believe it’s because they haven’t been added as sensors.
I do have 2 Water Leak sensors and they do not show up on the WebApp on Deconz but they are fine with HA.
Any ideas on what could be happening? ( I could be missing something as well :slight_smile: ).

Thanks!

Buttons like the Xiaomi switch you have are stateless sensors, so they will only be represented by events. There are examples in component documentation for how to write automations for them.

Yes, I have others like that and they do work as expected, it’s just these ones that I can see the event showing up running HA in debug (pydeconz) but nothing happens.
An example is like this:

- alias: Single Bedroom double click
  trigger:
   platform: event
   event_type: deconz_event
   event_data:
     id: lumi.sensor_switch
     event: 1004
  action:
    service: switch.toggle
    entity_id: switch.kitchen_lamp

So I see a 1004 event something from deconz but HA doesn’t do anything.

Is that the proper id? If hass isn’t doing anything then it might be the wrong id