Page 1 of 1
Noob needs help getting a automation to work
Posted: Sunday 26 July 2020 8:53
by Jasper79
Hi,
I'm trying to get a home automation going, I tried Home Assistant for a week and did not like messing with the configuration.yaml file all the time and now my second go is Domoticz.
I have a few smart devices I'd like to get started with.
Tuya RGB lights and a LED strip (WIFI from Action store)
Ikea Tradfri lights
Tuya door and motion sensors (WIFI from Action store)
Solaredge inverter (2 pcs)
433mhz alarm system
Rooted Toon
First thing I added in HA was to turn on one Tuya light (B) if I turned on a specific Ikea bulb (A) with the remote, This was quite easy to setup in HA and worked fine.
Now I'm trying the same using Blockly though it won't work like expected.
It does work when I turn on light A from Domoticz and does not when using the Ikea remote.
Blockly looks like this:

- Turn on lights.jpg (20.97 KiB) Viewed 1062 times
Someone that can help me out?
My last option would be to buy Homey and I don't know if that's what I really want because as far as I can tell I cant get my 433mhz door sensors to work with that.
I do know I will have to buy a RFLink and probably some Zwave/Zigbee sticks to get on the same level eventually, Domoticz on a Pi was just a easy low cost option to get started.
Re: Noob needs help getting a automation to work
Posted: Sunday 26 July 2020 11:01
by mrf68
Hi,
Question: when you turn on the Ikea bulb with the remote, does Domoticz show that the light is On? In other words: does the status of the bulb in Domoticz change when you use the remote?
Re: Noob needs help getting a automation to work
Posted: Sunday 26 July 2020 11:04
by Jasper79
No it doesn't, I think the 2 way communication could be the problem indeed. Any chance you know how to fix this?
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 9:44
by Jasper79
I added the lights again and working on the script which is not as easy as I hoped so far.
I wanted to make one script with If on the on and else off though I can't get that to work so now I have 2 scrips.
After adding the lights again the remote still does not work within Domoticz, If I turn on the lights with the Ikea remote the bulb in Domoticz does not turn on.
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 9:58
by Jasper79
One step further, I forgot to add the remote as a switch in Domoticz. Now the light does react when turning on with the remote. when I turn them off with remote the bulb in domoticz stays ON. Something still not flawless
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 10:17
by Jasper79
Well it does work just not responding as fast as with Home Assistant unfortunately.
It takes about 20 seconds before Domoticz knows I pressed the Ikea remote button and the runs my script.
This was probably also my turn off script problem. Now I have on and off in one script and it works, Just wish it was a bit faster.

- Turn lights on and off.jpg (40.53 KiB) Viewed 997 times
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 10:45
by waaren
Jasper79 wrote: ↑Monday 27 July 2020 10:17
Well it does work just not responding as fast as with Home Assistant unfortunately.
Did yo save your Blockly as a time triggered script or as device triggered ? You should also add a check to see if the light does not already have the required state. It will now send the signal regardless.
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 11:01
by Jasper79
It was set to all, Now I set it to device and saved again. Still the same lag when switching. As noted above Home Assistant did not have this 20 second delay.
If you could explain how to check required state it would be nice so I can learn from it. The wife does not turn on the tuya light from her tablet because that's too much "new stuff" for her. That's why I want to use a real switch from Ikea she already uses.
The easiest way was to get another Ikea light though then I would have no excuses to start playing with a domotica system
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 11:19
by waaren
Jasper79 wrote: ↑Monday 27 July 2020 11:01It was set to all, Now I set it to device and saved again. Still the same lag when switching.
The lag is probably caused by the plugin. When domoticz receives the updated status, the Blockly will react instantly.
If you could explain how to check required state it would be nice so I can learn from it

- Blockly.png (24.88 KiB) Viewed 971 times
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 13:23
by Jasper79
Thanks, it worked.
The delay was set in the IKEA plugin. I tried setting it to 5 seconds and it probably broke my hub. The remote stopped working and needed reconnecting to the lights again and the IKEA app stopped working.
Guess I'll have to redo it all and accept the delay.
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 14:00
by Treve
Good to hear that the problem has been found, but I am surprised that my HUE hub has hardly any noticeable delay.
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 17:24
by waaren
Treve wrote: ↑Monday 27 July 2020 14:00
Good to hear that the problem has been found, but I am surprised that my HUE hub has hardly any noticeable delay.
The Hue hub is communicating directly to domoticz using a two way push mechanism. The Ikea hub is connected to domoticz using a Python plugin. Internally these two mechanisms are quite different.
Re: Noob needs help getting a automation to work
Posted: Monday 27 July 2020 19:52
by Treve
waaren wrote:Treve wrote: ↑Monday 27 July 2020 14:00
Good to hear that the problem has been found, but I am surprised that my HUE hub has hardly any noticeable delay.
The Hue hub is communicating directly to domoticz using a two way push mechanism. The Ikea hub is connected to domoticz using a Python plugin. Internally these two mechanisms are quite different.
Thanks for explaining the difference.