Hey there. I am new to HA.
I am using ZHA integration. And I have a smart bulb and a smart switch. I wired three wire to the switch, which are L, N and L1 (wired to the bulb). And I add them to my HA via ZHA. Now I can control the smart light’s brightness and on/off from my HA dashboard. I can also trigger the smart switch from my HA dashboard or directly press the physics button. I can hear click sound when I trigger the smart switch, which I believe is the relay in the smart switch turing on and off. Here is my question:
Can I somehow config the smart switch, so that the switch’s relay keep connected, so that I can keep my smart bulb powered.
Sorry for my bad english, thank you all guys.
Connect whatever wire from you bulb is in L1 into L with the other wire, leaving L1 empty
The switch will now not affect the bulb and it will be permanently powered, you’ll still hear the relay clicking.
You can now write an automation to turn on the smart bulb from the switch
Hi,
I am not sure if I got your question 100% correct.
For me it seems you are controlling your bulb twice using zigbee:
- via the bulb itself
- using your switch
The latter is fine but your switch does not need to have a relais/L output at all. You would do that in case your bulb is not smart. So your switch controls the L of the (dumb) bulb. Your bulb is smart so you dont have to switch its power.
What you probably want is having the bulb permanently powered. This is also useful since it serves as a zigbee repeater and thus enhances your zigbee mesh.
You should look for a simple zigbee switch. You could even start with a battery powered one and put it on your table / attach it to the wall. Then, as it was already mentioned in the previous answer, you need to setup an “automation” in HA. This automation will have the logic:
- if switch toggles from off to on: turn bulb on
- if switch toggles from on to off: turn bulb off
So the automation defines what’s really happening when the switch is pressed. Note: this will always require HA to be online to toggle your bulb but offers you unlimited possibilities to interact with your devices.
Hope this helps…
Dan
Thanks, I’ll try that later, I think that will work.
But I have another smart switch, which have L, N, L1, L2, L3 ( it can control 3 bulb). I doubt if I can squeeze 4 wire (1 for L and 3 for 3 bulb) in to L. I found that my smart switch have a function that can be set to “wireless mode” using there own phone app. Can I set the smart switch to “wireless mode” using HA?
My switch is a E1 smart switch from Aqara.
Thanks Dan! Your automation logic is really helpful, I’ll try that out tonight. I have some further confuse
Do you have any idea?
If you had mentioned that in your first post, that would have made the answer much simpler.
Like you discovered, most Aqara switches have a wireless mode to be used with smart bulbs. This mode is exposed in Z2MQTT but for ZHA you might have to send a cluster command.
Search around here for “decoupled mode”. I’m pretty sure I’ve seen threads which mention how to set it in ZHA, but can’t find them at the moment.
Edit: here you go, I might have found the instructions for you Aqara wall switch - Trying to setup on / off functionality AND changing scenes - #10 by Temmy
Even if you can make the switch run in decoupled mode, you will need to make the bulbs permanently connected to line. You can use a wago connector or similar to join all the L1, L2, etc to permanent line
I agree with the others. In case you want to
- switch the bulb with your aqara
And - switch the bulb with some automations
You should:
- connect the bulb to permanent power (no l1,2, just L, does not have to be routed via the aqara at all)
- either leave l1 and l2 outputs open, and use an automation to toggle your bulb - you will still here the click of the relay
- or, as already proposed by ShadowFist, decouple the switch. Decoupling means the switch does not switch l1/l2 anymore. It is just a device with two switches you can use for whatever purpose using an automation.
As I already suspected, I guess you do not need a switch which actually switches power. I think all you need is a switch which informs HA in case a button is pressed. Your aqara e1 can be configured to exactly do that by the aforementioned decoupling. You can do that for both switches or just one, depending on your needs.
Dan
Thanks. Especially thanks for the word “decoupled” lol. Althought I haven’t found any similar option in e1’s clusters or clusters’ attributes, I can still do a further search in the community using the word “decoupled” and “aqara”.
No he doesn’t. He can still leave the bulb wires connected to L1/L2 etc. He just has to remember to turn on the switch relay (and leave it on permanently), either before sending the decouple command, or else direct from HA after decoupling.
You’re very welcome. Check my edit - the post I linked has a step by step with pictures and the cluster you should be looking for is OppleSwitchCluster
I read the post you linked. I was stuck at step 4, I cannot find “OppleSwitchCluster” entries. I think that’s because we are using different model (in the post is a H1 without neutral, mine is a E1 with neutral) . I go through all cluster entries, with no luck, I cannot find any entry related to “Coupled” or “Decoupled” ( there are “Scene” cluster, but I don’t think it is related to the function I need).
I am now keep searching solution for Aqara E1(with neutral), there is few post in the commnity related to E1. And I am also trying to install z2m, I stuck at install mosquitto add-on last night ( I’m in China, we have a very tricky network environment). Trying to get my VPN work for my HAOS (I am using a Pi4). Hope I can get z2m installed tonight.
Edit: I just found a instruction for my model here: Aqara QBKG40LM control via MQTT | Zigbee2MQTT. I will try that out.