Noob needs help getting a automation to work

Moderator: leecollings

Post Reply
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Noob needs help getting a automation to work

Post 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
Turn on lights.jpg (20.97 KiB) Viewed 1070 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.
mrf68

Re: Noob needs help getting a automation to work

Post 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?
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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?
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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.
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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
Turn lights on and off.jpg (40.53 KiB) Viewed 1005 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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
Blockly.png (24.88 KiB) Viewed 979 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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.
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: Noob needs help getting a automation to work

Post by Treve »

Good to hear that the problem has been found, but I am surprised that my HUE hub has hardly any noticeable delay.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Noob needs help getting a automation to work

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: Noob needs help getting a automation to work

Post 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.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest