First DzVents doesn't work yet  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
wouterlet
Posts: 109
Joined: Tuesday 02 October 2018 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

First DzVents doesn't work yet

Post by wouterlet »

Hi Guys,

I started with my first DzVents since Blocky did unexpected actions. But I can't get it working yet.
Is there someone who can help?

I have a push button "Button Eettafel", that gives a state "Group off" when it's pushed
I want to switch on and off a FGD-212 "Light Eettafel"

Code: Select all

return {

   on = { devices = { "Button Eettafel" }},        -- Name of your button
               
   execute = function(dz, item )
        if item.state == "Group off" then
            dz.devices("Light Eettafel").toggleSwitch()    -- Name of your Yeelight
        end
   end
}
My log says:

2020-04-25 21:12:55.076 Status: dzVents: Info: Handling events for: "Button Eettafel", value: "Group Off"
2020-04-25 21:12:55.076 Status: dzVents: Info: ------ Start internal script: Script #1: Device: "Button Eettafel (RFXCom)", Index: 258
2020-04-25 21:12:55.076 Status: dzVents: Info: ------ Finished Script #1

But the light isn't working.
Hope you can help!

Best regards,

Wouter Lettinga
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: First DzVents doesn't work yet  [Solved]

Post by waaren »

wouterlet wrote: Saturday 25 April 2020 21:14 if item.state == "Group off" then
2020-04-25 21:12:55.076 Status: dzVents: Info: Handling events for: "Button Eettafel", value: "Group Off"
String comparison is case sensitive. Your button has state 'Group Off' but you check for 'Group off'.
That will not evaluate to true.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
wouterlet
Posts: 109
Joined: Tuesday 02 October 2018 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: First DzVents doesn't work yet

Post by wouterlet »

Wow thanks, that was all. I really have te be precise with this. It works now, Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest