dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 503 forks source link

deconz binding - how to use switch when deconz is offline, but keeping some automations #1744

Closed sr-1989 closed 4 years ago

sr-1989 commented 5 years ago

Hi everyone ! i'm discovering deconz a little bit more every day! :) i'm using deconz (with a conbee 2) with hassio. i succeed to make some automations, but now i'm asking me if it's possbile to bind my switchs with lights when deconz is off ? (and keep my deconz events for my other automations with hassio). I've read the doc, looked for examples, i tried to bind but with a lot of difficulties, each time i got a timeout error... few time i succeed was when i reset the unit or did a ping... maybe do you have a better way to do this ?

When i had a success message to bind my switch and light or plug,, nothing worked... i try to bind IEEE and try to bind group. But when i disconnect deconz it's not working... any idea ? i don't see the black wire like in the doc to show the binding...

any ideas?

Thanks in advance for your help!

Seb

Smanar commented 5 years ago

Hello, I have only done that with ikea remote, never suceed with switch, perhaps a cluster story problem, but you have some tips here > https://github.com/dresden-elektronik/deconz-rest-plugin/issues/431

sr-1989 commented 5 years ago

Hi! thanks for you help ! if i correctly understand the other post i can only bind in deconz the switch which are shown in the phoscon app in the menu... (only ikea and philips hue switch are shown...) i've done the test with my ikea switch and it's working when conbee is off. This is exactly what i want. (and i can keep some automation with hassio when it's on) but a little disappointed to can't do this with the xiaomi switch :-s ... i've 3 switch "transmitter 2 gang" and i'd like to do the same thing... maybe there is a way ?

thanks !

Seb

ebaauw commented 5 years ago

if i correctly understand the other post i can only bind in deconz the switch which are shown in the phoscon app in the menu

Whether you can bind a switch depends on the switch itself. Some switches (IKEA, iCasa, innr, ...) send commands directly to (a group of) lights. You use bindings to configure which groups and/or lights. deCONZ eavesdrops on these commands to reverse-engineer the button events. For these kind of switches, the API exposes config.group in the /sensors resource. Other switches (notably Xiaomi) use attribute reporting to report button events to the gateway. These switches cannot control (a group of) lights directly. Afaik the Hue dimmer is the only switch that does both.

We should probably mark in the Wiki how each switch works - it should be a major consideration when deciding what switches to get.

zladukas commented 5 years ago

Erik, could You clarify, if IKEA Tradfri on/off has config.group pointing to group "X" and I will include some lights into group "X" "lights", eg "lights": [ "1", "2", "3" ], switch will control these lights, even gateway down?

ebaauw commented 5 years ago

Yes. Same as for any switch which includes config.group. Make sure any automations don't contradict the group commands, or you'll get funny behaviour.

thedannymullen commented 5 years ago

Is the ikea on/off discussed here the square one? I am having trouble making it function when off like my 5 button remote.
I copied the setting in the rest api from the 5 button but it did not work.
I will look at the config.group is it in the deconz directory on my pi?

Smanar commented 5 years ago

Response here > https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1137#issuecomment-525588380

zladukas commented 5 years ago

I'm successfully using config.group on several remotes.

Is it possible to setup this group, that one button remote, Ikea TRADFRI remote control center button, (using scenes, rules, clip, etc.) would switch light 100% brightness or off, since other sensors, e.g. motion sensor, are using different same lamp brightness settings?

If yes, what is best way to achieve this?

EDIT: simple as that

  1. create desired scene
  2. create rule using buttonevent, action "scenes->recall" and address "groups->state->any/all_on" :)
dakipro commented 5 years ago

Hi, I am planing to buy deconz stick to use it with homeseer and ikea (and some xiaomi sensors). I would like to confirm that I understand how this all is done :) I have 5 non-color bulbs and 3 round switches from Ikea. I want three lights on one switch, and other two lights on their own switch. Do I need to pair all these 8 devices with decons, and then assign their grouping from UI and they will just work the way I assign them even if I unplug deconz stick from the server? Or do I need to manually pair each switch to each light, and then include only switches into deconz plugin for homeseer? Or something else entirely?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.