"Ghost" events Blockly? Topic is solved
Moderator: leecollings
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
"Ghost" events Blockly?
Hi all,
I moved my Domoticz setup/installation from Synology to Raspberry Pi 3B. (Both Stable release)
Everything went ok on 1 strange thing....
I hope somebody knows how to fix this because it's driving me crazy.
In the new installation I created 4 new events:
1. Event to show doorcam on my Toon Thermostat
2. Event for my Sonos
3. Event for Toon to update switches in Domoticz
4. Event to set Toon setpoint (temperature)
Event 1 I created with the export function in Domoticz on my Synology and used Import in Domoticz on my Rpi3B.
Event 2,3 and 4 I just copied the LUA code and pasted into the new events on Rpi3B.
Event 2,3 and 4 are just working fine, event 1 is also working but there is something strange.
Event 1 seems to be triggered by a "Ghost" event:
2019-12-12 22:21:31.519 EventSystem: Event triggered: ShowDoorCamToon_1
This Event(name) doesn't exist in my created events.
My created event is called "ShowDoorCamToon" (without the _1).
When disabling the event, there is no issue/no trigger of the event ShowDoorCamToon_1.
I already deleted this event and recreated it manually in blockly, when saving this manually created event the "ghost" event comes up again.
I monitored the logging and I can see that the "ghost" event is triggered every 5 minutes.
Renaming the event from "ShowDoorCamToon" to "ShowDoorCamToon_1" results in the ghost event:
2019-12-12 22:26:32.303 EventSystem: Event triggered: ShowDoorCamToon_1_1
As seen an extra "_1" has been added.
I hope somebody can explain me why this happens and what to do to fix this issue.
Thanks!
Kind Regards,
Xavier
I moved my Domoticz setup/installation from Synology to Raspberry Pi 3B. (Both Stable release)
Everything went ok on 1 strange thing....
I hope somebody knows how to fix this because it's driving me crazy.
In the new installation I created 4 new events:
1. Event to show doorcam on my Toon Thermostat
2. Event for my Sonos
3. Event for Toon to update switches in Domoticz
4. Event to set Toon setpoint (temperature)
Event 1 I created with the export function in Domoticz on my Synology and used Import in Domoticz on my Rpi3B.
Event 2,3 and 4 I just copied the LUA code and pasted into the new events on Rpi3B.
Event 2,3 and 4 are just working fine, event 1 is also working but there is something strange.
Event 1 seems to be triggered by a "Ghost" event:
2019-12-12 22:21:31.519 EventSystem: Event triggered: ShowDoorCamToon_1
This Event(name) doesn't exist in my created events.
My created event is called "ShowDoorCamToon" (without the _1).
When disabling the event, there is no issue/no trigger of the event ShowDoorCamToon_1.
I already deleted this event and recreated it manually in blockly, when saving this manually created event the "ghost" event comes up again.
I monitored the logging and I can see that the "ghost" event is triggered every 5 minutes.
Renaming the event from "ShowDoorCamToon" to "ShowDoorCamToon_1" results in the ghost event:
2019-12-12 22:26:32.303 EventSystem: Event triggered: ShowDoorCamToon_1_1
As seen an extra "_1" has been added.
I hope somebody can explain me why this happens and what to do to fix this issue.
Thanks!
Kind Regards,
Xavier
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Can you give below command from the CLI and inspect the file /tmp/events.sql when you have done that ?Xavier82 wrote: Thursday 12 December 2019 22:43 Event 1 seems to be triggered by a "Ghost" event:
This Event(name) doesn't exist in my created events.
Maybe something will show up there.
Code: Select all
sudo sqlite3 /home/pi/domoticz/domoticz.db ".out /tmp/events.sql" ".dump eventMaster" ".dump eventRules"
# change path if your domoticz is installed in a none default locationCode: Select all
sudo apt install sqlite3Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Hi Waaren,
I did that, but also in this dump I can't find any clues why the Blobky script is triggered
I did that, but also in this dump I can't find any clues why the Blobky script is triggered
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
So when dumping domoticz log and collecting the data I see this:
2019-12-13 13:58:08.071 EventSystem: Event triggered: ShowDoorCamToon_1
2019-12-13 13:58:09.224 Status: dzVents: Debug: Event triggers:
2019-12-13 13:58:09.224 Status: dzVents: Debug: - Variable: ShowDoorCamToon
2019-12-13 13:58:38.087 Status: Set UserVariable ShowDoorCamToon = 100
2019-12-13 13:58:38.087 Status: Set UserVariable SendtoToon = 0
So this "EventSystem: Event triggered: ShowDoorCamToon_1" I can't figure out.
Something is triggering the blockly script and this each 5 minutes
2019-12-13 13:58:08.071 EventSystem: Event triggered: ShowDoorCamToon_1
2019-12-13 13:58:09.224 Status: dzVents: Debug: Event triggers:
2019-12-13 13:58:09.224 Status: dzVents: Debug: - Variable: ShowDoorCamToon
2019-12-13 13:58:38.087 Status: Set UserVariable ShowDoorCamToon = 100
2019-12-13 13:58:38.087 Status: Set UserVariable SendtoToon = 0
So this "EventSystem: Event triggered: ShowDoorCamToon_1" I can't figure out.
Something is triggering the blockly script and this each 5 minutes
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
mmm, after some more investigation….
When in hardware tab disabling Darksky Waether lookup the ghost trigger for the event is not coming.
So seems a relation between Darksy and the Blockly…..
When in hardware tab disabling Darksky Waether lookup the ghost trigger for the event is not coming.
So seems a relation between Darksy and the Blockly…..
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Assuming there are no "left behind" scripts in <domoticz dir>/scripts/ subdirectories.Xavier82 wrote: Saturday 14 December 2019 10:16 mmm, after some more investigation….
When in hardware tab disabling Darksky Waether lookup the ghost trigger for the event is not coming.
So seems a relation between Darksy and the Blockly…..
If you share the sqldump from one of the previous posts and the devicenames / id's from devices in Darksky 'hardware' we might be able to help.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Hi Waaren,Assuming there are no "left behind" scripts in <domoticz dir>/scripts/ subdirectories.
If you share the sqldump from one of the previous posts and the devicenames / id's from devices in Darksky 'hardware' we might be able to help.
Nop no other left behind scripts, directory only contains these scripts.
Output of sql dump:
Code: Select all
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE [EventMaster] ([ID] INTEGER PRIMARY KEY, [Name] VARCHAR(200) NOT NULL, [Interpreter] VARCHAR(10) DEFAULT 'Blockly', [Type] VARCHAR(10) DEFAULT 'All', [XMLStatement] TEXT NOT NULL, [Status] INTEGER DEFAULT 0);
INSERT INTO EventMaster VALUES(1,'Sonos','Lua','Device',replace('json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")()\n\nlocal sonos=assert(io.popen(''curl http://192.168.0.30:5005/Sonos/state''))\nlocal status = sonos:read(''*all'')\nsonos:close()\nlocal jsonStatus = json:decode(status)\nlocal sonos = ''Sonos''\n\n--print("Eerste JSON stappen met LUA")\n--print(status)\nprint(jsonStatus)\n\nplaybackState = jsonStatus[''playbackState'']\nartist = jsonStatus[''currentTrack''][''artist'']\ntitle = jsonStatus[''currentTrack''][''title'']\nalbum = jsonStatus[''currentTrack''][''album'']\ntype = jsonStatus[''currentTrack''][''type'']\n--streaminfo = jsonStatus[''currentTrack''][''streamInfo'']\n \ncommandArray = {}\n\nif (playbackState == "STOPPED" or playbackState == "PAUSED_PLAYBACK" or playbackState == "PLAYING") then\n if (playbackState == "PLAYING") then\n if type == "radio" then\n print(''Sonos status: '' ..playbackState.. '' '' ..type.. '' Titel: ''..title)\n else\n if artist ~= nil then\n print(''Sonos status: '' ..playbackState.. '' Artiest: '' ..artist.. '' Titel: ''..title)\n else\n print(''Sonos status: '' ..playbackState.. '' Titel: ''..title)\n end \n end\n if (uservariables["Sonos"] == "PAUSED") then\n commandArray[''Variable:SonosStatus'']=''PLAYING''\n print("Uservar Sonos updated to PLAYING")\n end\n end\n if (playbackState == "STOPPED" or playbackState == "PAUSED_PLAYBACK") then\n print(''Sonos Status: '' ..playbackState)\n if (uservariables["SonosStatus"] == "PLAYING") then\n commandArray[''Variable:SonosStatus'']=''PAUSED''\n print("Uservar Sonos updated to PAUSED")\n end \n end\nelse\n --print("2")\n print(''<font color="red">Sonos: SONOS-HTTP-API is off-line</font>'')\nend \n\nif (playbackState == "STOPPED" or playbackState == "PAUSED_PLAYBACK") then\n switch_status_sonos = otherdevices["Sonos"]\n print(''Sonos Switch Status: '' ..switch_status_sonos)\n if otherdevices["Sonos"] == ''Pause'' then\n print(''Sonos Switch Status is correct, should be PAUSE: '' ..switch_status_sonos)\n else\n print(''Sonos Switch Status not correct, should be PAUSE: '' ..switch_status_sonos)\n commandArray[''UpdateDevice''] = ''16|10|10''\n end\nend \n\nif (playbackState == "PLAYING") then\n switch_status_sonos = otherdevices["Sonos"]\n print(''Sonos Switch Status: '' ..switch_status_sonos)\n if otherdevices["Sonos"] == ''Play'' then\n print(''Sonos Switch Status is correct, should be PLAY: '' ..switch_status_sonos)\n else\n print(''Sonos Switch Status not correct, should be PLAY: '' ..switch_status_sonos)\n commandArray[''UpdateDevice''] = ''16|0|0''\n end\nend \n\n\nreturn commandArray\n','\n',char(10)),0);
INSERT INTO EventMaster VALUES(2,'Toon_setpoint','dzVents','Device',replace('return {\n on = {\n devices = {\n ''Toon Thermostaat''\n }\n },\n execute = function(domoticz, device)\n domoticz.openURL(string.format(''http://%s/happ_thermstat?action=setSetpoint&Setpoint=%s'', domoticz.variables(''UV_ToonIP'').value, device.setPoint*100))\n domoticz.log(''Setting Toon setpoint to ''.. device.setPoint)\n end\n}','\n',char(10)),1);
INSERT INTO EventMaster VALUES(3,'Toon_script','dzVents','Device',replace('\nreturn {\n logging = {\n level = domoticz.LOG_FORCE, -- Select one of LOG_INFO, LOG_DEBUG, LOG_ERROR, LOG_FORCE to override system log level\n marker = "-=# P1 Toon #=-"\n},\n on = {\n timer = {\n ''every minute''\n }\n },\n execute = function(domoticz)\n local ToonThermostat = domoticz.variables(''UV_ToonThermostat'').value -- Sensor showing current setpoint\n local ToonTemperature = domoticz.variables(''UV_ToonTemperature'').value -- Sensor showing current room temperature\n local ToonScenes = domoticz.variables(''UV_ToonScenes'').value -- Sensor showing current program\n local ToonAutoProgram = domoticz.variables(''UV_ToonAutoProgram'').value -- Sensor showing current auto program status\n local ToonProgramInformation = domoticz.variables(''UV_ToonProgramInformation'').value -- Sensor showing displaying program information status\n local ToonIP = domoticz.variables(''UV_ToonIP'').value\n local DomoticzIP = domoticz.variables(''UV_DomoticzIP'').value\n local ToonBurnerName = domoticz.variables(''UV_ToonBurnerName'').value\n\n-- Handle json\n local json = assert(loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")() -- For Linux\n \n local handle = assert(io.popen(string.format(''curl http://%s/happ_thermstat?action=getThermostatInfo'', ToonIP)))\n local ThermostatInfo = handle:read(''*all'')\n handle:close()\n \n local jsonThermostatInfo = json:decode(ThermostatInfo)\n \n if jsonThermostatInfo == nil then\n return\n end\n\n-- Update the current temperature setpoint\n local currentSetpoint = tonumber(jsonThermostatInfo.currentSetpoint) / 100\n local currentTemperature = tonumber(jsonThermostatInfo.currentTemp) / 100\n currentTemperature = tonumber(string.format("%.1f", currentTemperature)) -- 1 decimaal is voldoende [PdB]\n \n \n-- Update the current auto program\n local currentProgramState = tonumber(jsonThermostatInfo.programState)\n if currentProgramState == 0 then currentProgramState = 10 -- No\n elseif currentProgramState == 1 then currentProgramState = 20 -- Yes\n elseif currentProgramState == 2 then currentProgramState = 30 -- Temporary \n end\n \n-- Update the current scene by state\n local currentActiveState = tonumber(jsonThermostatInfo.activeState)\n if currentActiveState == -1 then currentActiveState = 50 -- Manual\n elseif currentActiveState == 0 then currentActiveState = 40 -- Comfort\n elseif currentActiveState == 1 then currentActiveState = 30 -- Home\n elseif currentActiveState == 2 then currentActiveState = 20 -- Sleep\n elseif currentActiveState == 3 then currentActiveState = 10 -- Away\n end \n \n-- Update the current scene by temperature\n local currentActiveTemp = tonumber(jsonThermostatInfo.currentSetpoint) / 100\n if currentActiveTemp == 20.5 then currentActiveState = 40 -- Comfort\n elseif currentActiveTemp == 19.5 then currentActiveState = 30 -- Home\n elseif currentActiveTemp == 17 then currentActiveState = 20 -- Sleep\n elseif currentActiveTemp == 18.5 then currentActiveState = 10 -- Away\n else currentActiveState = 50 -- Manual\n end \n \n\n-- Update the thermostat sensor to current setpoint\n if domoticz.devices(ToonThermostat).setPoint*100 ~= currentSetpoint*100 then\n domoticz.log(''Updating thermostat sensor to new set point: '' ..currentSetpoint)\n domoticz.devices(ToonThermostat).updateSetPoint(currentSetpoint).silent()\n end\n \n-- Update the temperature sensor to current room temperature\n if domoticz.utils.round(domoticz.devices(ToonTemperature).temperature, 1) ~= domoticz.utils.round(currentTemperature, 1) then \n domoticz.log(''Updating the temperature sensor to new value: '' ..currentTemperature)\n domoticz.devices(ToonTemperature).updateTemperature(currentTemperature)\n end\n \n-- Update the toon scene selector sensor to current program state\n if domoticz.devices(ToonScenes).level ~= currentActiveState then -- Update toon selector if it has changed\n domoticz.log(''Updating Toon Scenes selector to: ''..currentActiveState)\n domoticz.devices(ToonScenes).switchSelector(currentActiveState).silent()\n end\n \n-- Updates the toon auto program switch \n if domoticz.devices(ToonAutoProgram).level ~= currentProgramState then -- Update toon auto program selector if it has changed\n domoticz.log(''Updating Toon Auto Program selector to: ''..currentProgramState)\n domoticz.devices(ToonAutoProgram).switchSelector(currentProgramState).silent()\n end\n \n\n \n-- Updates the toon program information text box\n local currentNextTime = jsonThermostatInfo.nextTime\n local currentNextSetPoint = tonumber(jsonThermostatInfo.nextSetpoint) / 100\n \n if currentNextTime == 0 or currentNextSetPoint == 0 then\n ToonProgramInformationSensorValue = ''Op '' ..currentSetpoint.. ''°''\n else\n ToonProgramInformationSensorValue = ''Om '' ..os.date(''%H:%M'', currentNextTime).. '' op '' ..currentNextSetPoint.. ''°''\n end\n \n if domoticz.devices(ToonProgramInformation).text ~= ToonProgramInformationSensorValue then\n domoticz.log(''Updating Toon Program Information to: ''..ToonProgramInformationSensorValue)\n domoticz.devices(ToonProgramInformation).updateText(ToonProgramInformationSensorValue)\n end\n end\n}\n\n','\n',char(10)),1);
INSERT INTO EventMaster VALUES(4,'ShowDoorCamToon','Blockly','All','<xml xmlns="http://www.w3.org/1999/xhtml"><block type="domoticzcontrols_if" id="ol*8)E^20*A]`5TG*[Vc" x="2" y="3"><value name="IF0"><block type="logic_operation" id="b18|/#Y}Hh#O|;-^B=I^"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="0#2xR3s8i3G6ne:Mz~9P"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="2QcT|Q5h]rT3us/fWA7R"><field name="Switch">44</field></block></value><value name="B"><block type="logic_states" id=":JG$WZiDRr}kVy(g^4vt"><field name="State">On</field></block></value></block></value><value name="B"><block type="logic_compare" id="b(S1E5){=_!P`-xjd-,8"><field name="OP">EQ</field><value name="A"><block type="uservariablesSZ" id="n9HM1O64=1vQT{4?`ADb"><field name="Variable">11</field></block></value><value name="B"><block type="text" id="@9(zWF*7}p=3Htz^6V^~"><field name="TEXT">0</field></block></value></block></value></block></value><statement name="DO0"><block type="logic_set" id="T,c!!%sa?AO4*^5RNh6T"><value name="A"><block type="uservariablesSZ" id="?,{$S@cob0|KI;/svN-|"><field name="Variable">12</field></block></value><value name="B"><block type="text" id="[vQDULO:(,)vQ_l2Q}#O"><field name="TEXT">200</field></block></value><next><block type="logic_set" id="Dx}}!wY?z-,i5Y,:BVxz"><value name="A"><block type="uservariablesSZ" id="S!LiZ7V7V4(^@QfV7}-("><field name="Variable">11</field></block></value><value name="B"><block type="text" id="2mvPMQNS:rISdo9I,wnj"><field name="TEXT">1</field></block></value><next><block type="logic_setafter" id="!@~4#j-]+/dbZbvX:2[`"><value name="A"><block type="uservariablesSZ" id="?c}GpY=$`6Q#9(Z#wi=]"><field name="Variable">12</field></block></value><value name="B"><block type="text" id="T74{?e#;L[Le_yKZHn}Z"><field name="TEXT">100</field></block></value><value name="C"><block type="math_number" id="0Lvv,g2LpK806+u#dBe?"><field name="NUM">30</field></block></value><next><block type="logic_setafter" id="(5qD@n8^rKEvaq|5d|/t"><value name="A"><block type="uservariablesSZ" id="2v6d3~.y_pCkvh]diSwN"><field name="Variable">11</field></block></value><value name="B"><block type="text" id="V,94g~bhk,SkKCB,no4V"><field name="TEXT">0</field></block></value><value name="C"><block type="math_number" id="Sj]Z[l-t/Ztl`mT788oR"><field name="NUM">30</field></block></value></block></next></block></next></block></next></block></statement></block></xml>',1);
COMMIT;
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE [EventRules] ([ID] INTEGER PRIMARY KEY, [EMID] INTEGER, [Conditions] TEXT NOT NULL, [Actions] TEXT NOT NULL, [SequenceNo] INTEGER NOT NULL, FOREIGN KEY (EMID) REFERENCES EventMaster(ID));
INSERT INTO EventRules VALUES(1,4,'(device[44] == "On" and variable[11] == "0")','commandArray[Variable:12]="200",commandArray[Variable:11]="1",commandArray[Variable:12]="100" AFTER 30",commandArray[Variable:11]="0" AFTER 30"',1);
COMMIT;- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
The Blockly system adds a _1 to the scriptName in the log when the Blockly gets triggered by a device.Xavier82 wrote: Thursday 12 December 2019 22:43 Event 1 I created with the export function in Domoticz on my Synology and used Import in Domoticz on my Rpi3B.
2019-12-12 22:21:31.519 EventSystem: Event triggered: ShowDoorCamToon_1
This Event(name) doesn't exist in my created events.
My created event is called "ShowDoorCamToon" (without the _1).
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Is it an option to create Lua instead of Blockly script for this?
May I then get rid of this ghost trigger...
May I then get rid of this ghost trigger...
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Sure. Please let me know if you need helpXavier82 wrote: Sunday 15 December 2019 13:03 Is it an option to create Lua instead of Blockly script for this?
May I then get rid of this ghost trigger...
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
This is the Lua I got so far but I'm not a programmer:
So below the Blocky which I would like to have in lua.

I appriciate any help
Code: Select all
commandArray = {}
if (deviceName=='Deurbel') then
if deviceValue == "On" and (uservariables["SendtoToon"] == "0") then
set uservariables["ShowDoorCamToon"] == "200" ) then
set uservariables["SendtoToon"] == "1" then
set uservariables["ShowDoorCamToon"] == "100" "AFTER 30"
set uservariables["SendtoToon"] == "0" "AFTER 30"
end
return commandArray

I appriciate any help
- Attachments
-
- Naamloos.png (27.89 KiB) Viewed 1616 times
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
See below for the dzVents equivalentXavier82 wrote: Sunday 15 December 2019 13:22 So below the Blockly which I would like to have in Lua. I appreciate any help![]()
Code: Select all
return
{
on =
{
devices =
{
'Deurbel',
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'Deurbel',
},
execute = function(dz, item)
if item.active then
dz.log('Device ' .. item.name .. ' was pushed', dz.LOG_DEBUG)
local sendToToon = dz.variables('SendtoToon')
local showDoorCamToon = dz.variables('ShowDoorCamToon')
if sendToToon.value == '0' then
showDoorCamToon.set('200')
showDoorCamToon.set('100').afterSec(30)
sendToToon.set('1')
sendToToon.set('0').afterSec(30)
end
end
end
}Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Thanks a lot Waaren.
dzVents seems to be working fine.
Now at my work so can't see what happens at home when doorbell rings.
Will check tonight. I activated the dzVents script and I have no "Ghost" trigger anymore.
dzVents seems to be working fine.
Now at my work so can't see what happens at home when doorbell rings.
Will check tonight. I activated the dzVents script and I have no "Ghost" trigger anymore.
-
Xavier82
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: "Ghost" events Blockly?
Sorry for the late feedback.
Everything works like a charm now
Everything works like a charm now
Who is online
Users browsing this forum: Bing [Bot] and 1 guest