[Abandoned] deCONZ

That’s a good workaround! Thanks!

Understood. Thanks for the explanation!

Just wondering how this would differ from doing the same from the likes of the Hue (hub) app, or even when using my Fibaro dimmer switches, where I am currently doing it and it works flawlessly. In the case of the Hue lights, is Homey doing something different (eg. sending the command to the hub for it to work out the “duration” magic rather than scheduling the commands internally?) If that’s the case, then, and the Phoscon API cannot support this kind of behaviour, completely agree with you.

However, if the Hue app is doing the duration within Homey, I would not see how implementing it in the app, and keeping it consistent with the other apps I mentioned above (I appreciate these are Athom-created apps, so they might be using calls not available to 3rd party apps, so happy to get this done elsewhere if this is the case :slight_smile: )

Thanks again to both you and the rest of the forum for the super helpful explanations and workarounds :D.

Homey sends the Hue bridge a command “change the state of light X to so-and-so with a duration of 5 seconds” and the bridge will handle the transition. I think the Fibaro devices have a configurable transition time.

Now that I’m looking at the Phoscon API, it does seem that supports transition timing: https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/lights/#set-light-state

In which case it does make sense to implement it in the deCONZ app (because it’s part of the Phoscon API) and you can disregard everything I said :woozy_face:

2 Likes

LOL, I did have a look at the Phoscon API and checked that, hence the request. Thanks a bunch for double-checking on my initial assumption (I was about to write a REST call directly on the API to implement this via a standard Logic “Then…” card , but then thought: wouldn’t it be nicer to have it as just a toggle in the app?)

BTW, I have a few things I’d like to pick your and MadMonkey’s brains on about abstracting buttons (either via the deCONZ app, or suggesting a platform change to Athome). Would this post be the best place to discuss it? Or should I move this to Slack?

Thanks again!
AGV

I think here is the best place.

Awesome. I’d really love to know what you think of this.

I’ve been thinking about this for quite some time after thinking it would already have been solved (and it kind of has, but just not as efficiently as I would have loved). I’ve searched a fair bit in this Forum, and have gone far and long to see how other platforms have solved it, so I think I have a fair understanding of the key issue. However, I would love to hear your thoughts about the potential solution I’m proposing, or even additional workarounds. It’s a fairly long read, so do bear with me.

The Issues
Just like you, Robert, I have a chunk load of super cheap buttons (in my case, I managed to score a big shipment of Xiaomi Smart Switches from Aliexpress of which I have installed quite a few already, currently working directly with the fantastic Aqara & Xiaomi ZigBee by @TedTolboom. I also have a few IKEA buttons that I’m already using through the deCONZ app, so this would bring the best of all worlds.

Current Setup
I installed at least 2 buttons in a few rooms already (eg. one on each side of the bed for me and my missus to be able to do specific things) but the jist is always the same for all rooms:

  1. Single-Click toggles between the ceiling lights and a secondary light (Philips Hue Go), and all off
    Note: dim levels at different times of the day come from a different flow and are out of scope
  2. Double-Click toggles between all lights to 100% and off
  3. Some rooms have specific triple-click scenes, but that’s out of scope for this

Problem 1: Too Many Flows!!!
Now the issue is, as you know, for each one of those things I need not only a chunk-load of flows (one per button, per scene type, per room) and even if I decouple with your incredible Flow-Event-Bus app (which has the right idea but I think is kind of hampered by the current state of the platform), I still don’t get the level of “decoupling” that I would like to have.

Problem 2: What if a button breaks?
I have kids. They break things. They’ve already broken a couple of these flimsy little buttons, and this means that I have had to edit the flows associated for the triggers. Not too bad, but this can get messy once I install 2x buttons per each room.

Problem 3: What if I want to change the behaviours or personalise them?
If I want to change what a double-click does, that means I have to change all of the behaviour flows. In my case at the moment, this means 6 different flows need to be updated. If the missus wants a different behaviour on double-click to mine, that means I need to maintain different flows for different buttons. Not fun!

Problem 4: What if I want to add another button to a room?
If I’m not using HomeyScript, that means I have to duplicate every single flow that has the logic per scene, AND duplicate the trigger flows, if I’m using the Flow-Event-Bus app.

Possible Solution?
My requirements (and I believe anyone wanting to implement similar logic for several buttons on different or even in the same room) would be the following:

  • Ability to create a single flow that can be leveraged by multiple buttons, abstracting all events, button types, and other useful things, and putting them in tags
    Maybe 1 per button type, but preferably one for all buttons supporting the same type of scene
  • Ability to abstract the Room, so that all I need to do is assign the button to a room in the Devices screen
  • Ability to consume this in the “Then…” cards
    This is more of a Homey platform request as at the moment, there is no way to consume a Room/Zone tag in say a “Turn Lights Off in Room [insert tag here]”, but I’m doing this already successfully via HomeyScript, so this is not as critical.

How would this look in a Flow
Trigger Flow with current Homey platform functionality
Can be done in single flow with one HomeyScript.

  • When - deCONZ app - “A button is clicked” (abstracted to all events)
    –Available tags: [Scene Type], [Room], [Button Name?], [Button Type?]
    –Button name and button type could give you additional flexibility, but Scene Type and Room are the most important bits
  • Then - Run Homeyscript - “Rooms button logic”

Trigger Flow with possible enhanced Homey platform functionality:
Allows for easier GUI management without scripting, but with more flows.

  • When - deCONZ app - “A button is clicked” (abstracted to all events)
    –Available tags: [Scene Type], [Room], [Button Name]
  • And > Logic-Scene Type == “Single Click”
  • Then > Devices > “Turn off specific Devices” > “Lights” > “In Zone” consume [Room]
    (at the moment the “In Zone” section only allows hardcoded zones, and can’t consume local tags)

What benefits would this get you, dear average Homey user?

  • Massively reduce the number of flows needed to implement buttons
  • Reduce the time and repetition needed if a change to behaviour is required
  • Decouple triggers from actions in a more flexible way, with much fewer flows
  • Have multiple buttons trigger the same behaviour groups with a single flow
  • If a button breaks and you need to replace it, or you need to add an extra one, there is no need to edit a bunch of flows, just add the new button to the room where the broken one was located

What about grouping?
The other option would be to have the ability to group Buttons, and allow for any trigger from such group to start a specific flow. The problem is that I haven’t seen a single app that implements the capability of “button” for scene activation devices like these Xiaomi/Aqara/IKEA or any other. This also only reduces the flows per room, as there is still no abstraction on the scene side of things.

What about Flow Events
The Flow Event app is incredible, and it does solve a few problems. However, to solve these problems, you still have to create EVEN MORE FLOWS. The app does allow you to abstract your triggers from your behaviours, meaning that if you want a double click for button 1 to do a full house off, rather than a full brightness in room, you only have to edit a single flow (or script).

However, you still need one flow per button per scene as the trigger, so all in all, the reduction of flows and subsequent maintenance is still a problem.

Why not just use Siri/Alexa/Google Home or ask the missus to turn the right light
Because the whole point of having buttons (and several in a single room) is so that neither I nor the missus need to talk to anyone to make these things happen. These buttons are mostly in the bedrooms, and mostly used when it’s time for bed. If you’ve used a smart home assistant at night, you know that even when some can even whisper, they are damn annoying! And they can always get things wrong, making you ask the same thing again and waking up people.

What about any other workaround
I’m really curious to hear your thoughts, and I’m really open to workarounds as long as they reduce the amount of flows I have, and allow me to replace buttons easily, without editing multiple flows.

Thanks for reading and happy to answer any questions.
AGV

It sounds like most of your requested features work around limitation of Homey itself, apart from a generic “a button is clicked” trigger for deCONZ devices. Although there’s also a Homey limitation there, because I don’t think apps are aware of, or can access, the room/zone a device is located in.

As for flow events specifically: yes, do you need more flows, but most of them should be set-and-forget. Only when a device breaks will have you to update them.

I don’t use my Homey anymore, having moved to Home Assistant, where automations are much more powerful and it’s much easier to create “generic” automations for multiple devices at once (especially with the upcoming “blueprints” feature).

@MadMonkey is there a way to let the flashing be in the color last set by the bulb. Now it always flashes in white. I mean at a group of lights.


Different question, is there a way to create something like Fibaro does. Continuously press one button to dim from 0 to 100 or the other way around. How does one create something like that with a flow? I’m using Opple switches.

I tried doing it like this, see picture, but doesn’t do what I thought it would, it doesn’t loop through the brightness

I am not sure if this is supported by DeConz, I’ll need to investigate on that. What you could try is to first set the color, then set the flashing. If this works I could create a card that combines the two, but if it does not work I cannot really help you there.

Regarding your flow: this one looks good to me, the question is if the “hold” event gets emitted multiple times. For example I do exactly this with my hue dimmer switches and it works pretty fine. Can you confirm that the hold event gets emitted multiple times while you’re holding the button?

@MadMonkey I’ve added the Lidl christmas lights, in deConz / Phoscon I can change color, when added into Homey I cannot change anything. Did I add it wrong? I’m using a generic bulb.

I am not sure if this is supported by DeConz, I’ll need to investigate on that. What you could try is to first set the color, then set the flashing. If this works I could create a card that combines the two, but if it does not work I cannot really help you there.

Unfortunately doesn’t work. Everytime I set flashing it turns back to the white color.

Regarding your flow: this one looks good to me, the question is if the “hold” event gets emitted multiple times. For example I do exactly this with my hue dimmer switches and it works pretty fine. Can you confirm that the hold event gets emitted multiple times while you’re holding the button?

I have to look at this for a while. I have some other issues with the Opple as well. Turning off / on a room seems to turn on / off ALL zigbee lights. I’m not getting it. What is wrong with this flow:

What is button 1 on the opple. I thought it would number from left up = 1, right up = 2, left down = 3 and 4 = right bottom. When I enable the flow above it turns on ALL lights on the right upper button. Are these hardcoded? Because the left upper button turns them all off when not having a flow attached.

In regards to the previous flow, holding the button doesn’t increase the lights, it does when I re-hold it…

Last question; I recently bought 6 GU10 spots. I never used the ‘groups’ function before, but it works a lot better than the groups app on homey itself. What I do experience sometimes is when I turn on the group or turn off the group, this doesn’t get reflected in the homey app for the individual lights. So one group has 3 lights, turnin on the group turns on all 3, and off turns off all 3, every time. But the individual light status in the homey app stays on or off. Is there something what can be done with that?

@MadMonkey I’m getting a little bit insane at the moment. Is it normal if I’m adding the Mi Magic Cube I get an overview of all sensors to be added? I can’t recall if I had this the last time too, but don’t think so.

Not sure if I understand you correctly, you add a new device, choose the cube driver and in the selection you then get devices that are all kind of sensors but not only cubes?

Yes , correct I’ve created a video but am not allowed to add it to the forum…

Video: (let me know if you can or can’t see it, somehow it doesn’t really work)

@MadMonkey in regards to the opple I think i’m running into a bug. I de-paired the opples with deconz and paired with homey. They work as expected. Paired one back to deconz and got the same issue again. button 1 turns everything off and button 2 turns everything on. With everything I mean every zigbee related device paired to deconz (powerplugs and lights).

That’s what the Opple switches seem to be doing, see also this comment. There’s also a workaround: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061#issuecomment-579528341

And it’s being suggested here that repeated pairing may fix it.

Wow, lot’s of problems there, didn’t experience this in my previous install with the Opples going strong… some of the solutions aren’t working … i’ll read through the thread, tnx!

So… no solution for me. It keeps only showing the following:

Where it, according to the github threads, should be showing a lot more. Some suggested to keep the C button pressed for at least 13 seconds during pairing. Others suggest to keep resetting the node if the other clusters don’t show up, nothing works. I think i’ve tried resetting the node hundred times now. Nothing seems to work.

Is er niet een manier om hem handmatig aan te melden bij een extra cluster? @robertklep volgens mij gaf jij aan dit ook gedaan te hebben bij de deur/window sensor van de Lidl, toch?

I’ve got it working now. Together with the update to support the Opple events and the pressing of the C button after pairing. The latter seems to do the trick.

Thanks guys. Great work!

I had the same problem, see one of the first posts. I have Ubuntu and dockers. I got it working again by.

1. Updating to 2.7.1.
2. Udating to latest firmware of Conbee II 26680700
3. Pairing the switch in Phoscon by holding the C till connected
4. All lights and power plugs turned off by pressing one button (same problem since deCONZ version: 2.05.88)
5. Give the C button a short press. Lights stopt reacting to pressing a button.
6. Restart deCONZ docker
7. Home Assistant (118.5) integrations reload Phoscon
8. Aqara switch worked like before and is following my Home Assistant settings again

I think the short press C helped me to change a modus of the switch, which is needed after pairing.
1 Like

Help! I’ve just updated to version 1.17.0 and the following happens…

When I turn of a light in the app, it goes back on (in the app) and it keeps thinking that the light is still on. But it isn’t.

So when a next flow is executed to turn the light on, nothing happened, because the app still thinks that the light is on.

Same issue here☝️

I wil wait for a while before update