Cannot get dzVents to trigger Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Cannot get dzVents to trigger

Post by Sjoko »

I cannot get an dzVents script to be triggered.
I want to handle status change of a dummy switch.
This is my script:

Code: Select all

-- eventTestSwich.lua 

return {
	on = {
		devices = {
			113
		}
	},
	logging =   {   level     =   domoticz.LOG_INFO,
                    marker    =   "I am eventTestSwich script....."    },
	execute = function(domoticz, device)
		domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_FORCE)
	end
}
Nothing appears in the log.

The following test script does work:
-- Alive.lua

Code: Select all

return {
    on      =   {   
        timer           = { "every minute" },
        devices         = {	74, 113 },
    },
                
    logging =   {   level     =   domoticz.LOG_INFO,
                    marker    =   "I am alive....."    },

    execute = function(dz)
        
        dz.log("You will see this every minute until you deactivate", dz.LOG_FORCE) 
    end
}
Settings->Setup->Other
dzVents: enabled
Log Level: Errros + minimal execution info + generic info

I'm using:
raspberryPi
Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 13:47:55
dzVents Version: 3.0.2
Python Version: None
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Sunday 11 April 2021 16:53 I cannot get an dzVents script to be triggered.
Only explanation I can think of is a wrong id.

Can you try again with below version?

Code: Select all

-- eventTestSwich.lua

return
{
    on =
    {
        devices =
        {
            '*',
        },
    },

    logging =
    {
        level = domoticz.LOG_INFO,
        marker = "I am eventTestSwich script.....",
    },

    execute = function(dz, item)
        dz.log('Device ' .. item.name .. ' (' .. item.id .. ') triggered this script', domoticz.LOG_FORCE)
    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

The wildcard '*'' results in the logging of one device with id 110 in the log.
When I flip the switch device 103, the event is not triggered.
Device 103 and 100 are of exactly the same type 'type Light/Switch, Switch, On/Off'

I read in some old posts that there might be a conflict with other scripts, if I understood correctly. I'm using multiple blockly scripts.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Sunday 11 April 2021 21:07 The wildcard '*'' results in the logging of one device with id 110 in the log.
When I flip the switch device 103, the event is not triggered.
Device 103 and 100 are of exactly the same type 'type Light/Switch, Switch, On/Off'
I read in some old posts that there might be a conflict with other scripts, if I understood correctly. I'm using multiple blockly scripts.
I have never experienced a conflict between Blockly and dzVents scripts.

Are device 103 and 100 set to active? (Are the arrows on devices tab blue?)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Piacco
Posts: 69
Joined: Friday 14 November 2014 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Cannot get dzVents to trigger

Post by Piacco »

In your first post you spreak about device 113 in the other post is it 103, could that be the problem?
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

The dummy (problem) switch has Idx 113.

I mistakenly mentioned 103, should have been 113.
Sorry about the confusion.
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

How can I debug this ?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote:How can I debug this ?
Can you share a screenshot of your devices tab?



Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

Are device 103 and 100 set to active? (Are the arrows on devices tab blue?)
Yes they are blue

As mentioned earlier, typos on the idx, should have been 113 and 110, scripts are fine.
Both are blue, only 110 appears in the log (due to wildcard)
Capture.JPG
Capture.JPG (56.02 KiB) Viewed 2058 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Monday 12 April 2021 23:14 Both are blue, only 110 appears in the log (due to wildcard)
Can you share the result of the following http calls from within your browser?

Code: Select all

http://<domoticz IP:domoticz port/json.htm?type=devices&rid=113
http://<domoticz IP:domoticz port/json.htm?type=hardware
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

Code: Select all

http://pi:8080/json.htm?type=devices&rid=113

Code: Select all

{
	"ActTime" : 1618431602,
	"AstrTwilightEnd" : "22:42",
	"AstrTwilightStart" : "04:29",
	"CivTwilightEnd" : "21:07",
	"CivTwilightStart" : "06:04",
	"DayLength" : "13:52",
	"NautTwilightEnd" : "21:52",
	"NautTwilightStart" : "05:19",
	"ServerTime" : "2021-04-14 22:20:02",
	"SunAtSouth" : "13:35",
	"Sunrise" : "06:39",
	"Sunset" : "20:31",
	"app_version" : "2020.2",
	"result" : 
	[
		{
			"AddjMulti" : 1.0,
			"AddjMulti2" : 1.0,
			"AddjValue" : 0.0,
			"AddjValue2" : 0.0,
			"BatteryLevel" : 255,
			"CustomImage" : 0,
			"Data" : "Off",
			"Description" : "",
			"DimmerType" : "none",
			"Favorite" : 0,
			"HardwareID" : 36,
			"HardwareName" : "eventTestSwich",
			"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
			"HardwareTypeVal" : 15,
			"HaveDimmer" : true,
			"HaveGroupCmd" : true,
			"HaveTimeout" : false,
			"ID" : "000140C1",
			"Image" : "Light",
			"IsSubDevice" : false,
			"LastUpdate" : "2021-04-12 23:01:15",
			"Level" : 0,
			"LevelInt" : 0,
			"MaxDimLevel" : 100,
			"Name" : "eventTestSwich",
			"Notifications" : "false",
			"PlanID" : "0",
			"PlanIDs" : 
			[
				0
			],
			"Protected" : false,
			"ShowNotifications" : true,
			"SignalLevel" : "-",
			"Status" : "Off",
			"StrParam1" : "",
			"StrParam2" : "",
			"SubType" : "Switch",
			"SwitchType" : "On/Off",
			"SwitchTypeVal" : 0,
			"Timers" : "false",
			"Type" : "Light/Switch",
			"TypeImg" : "lightbulb",
			"Unit" : 1,
			"Used" : 1,
			"UsedByCamera" : false,
			"XOffset" : "0",
			"YOffset" : "0",
			"idx" : "113"
		}
	],
	"status" : "OK",
	"title" : "Devices"
}
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

Code: Select all

http://pi:8080/json.htm?type=hardware

Code: Select all

{
	"result" : 
	[
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "slimmeMeter",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "/dev/ttyUSB1",
			"Type" : 4,
			"Username" : "",
			"idx" : "1"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Zutphen ForecastIO",
			"Password" : "52.114666,6.212721",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 25,
			"Username" : "7b463cedffd859f7b0d062053313007a",
			"idx" : "2"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Motherboard",
			"Password" : "",
			"Port" : 1,
			"SerialPort" : "",
			"Type" : 23,
			"Username" : "",
			"idx" : "3"
		},
		{
			"Address" : "pi-doeke.vk.guepin.com",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "pi-doeke",
			"Password" : "0772251107ef60d3971d2831939e529e",
			"Port" : 6144,
			"SerialPort" : "6144",
			"Type" : 3,
			"Username" : "admin",
			"idx" : "4"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "false",
			"Extra" : "",
			"Mode1" : 60,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "evohome",
			"Password" : "S,Q$8(X>`Mg;GoWtg",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 75,
			"Username" : "[email protected]",
			"idx" : "5"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Zutphen ForecastIO",
			"Password" : "52.114666,6.212721",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 25,
			"Username" : "7b463cedffd859f7b0d062053313007a",
			"idx" : "6"
		},
		{
			"Address" : "cheap.vk.guepin.com",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 30,
			"Mode2" : 1000,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "LMS Cheap",
			"Password" : "",
			"Port" : 9000,
			"SerialPort" : "9000",
			"Type" : 60,
			"Username" : "",
			"idx" : "7"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "GemBird2",
			"Password" : "",
			"Port" : 1,
			"SerialPort" : "1",
			"Type" : 15,
			"Username" : "",
			"idx" : "9"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "kerstboomLaterUit",
			"Password" : "",
			"Port" : 1,
			"SerialPort" : "1",
			"Type" : 15,
			"Username" : "",
			"idx" : "10"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 83,
			"Mode2" : 25,
			"Mode3" : 2,
			"Mode4" : 0,
			"Mode5" : 4,
			"Mode6" : 0,
			"Name" : "RFXtrx433",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "/dev/ttyUSB0",
			"Type" : 1,
			"Username" : "",
			"idx" : "11",
			"noiselvl" : 0,
			"version" : "Ext2/1025"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "isBuitenLichtAan",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "12"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "doTonyKomtThuis",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "13"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "isTonyThuis",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "14"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "doTonyGaatWeg",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "15"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "doBuitenlichtAanIndienNodig",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "16"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "doBuitentlichtUit",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "17"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "MySunIsUpBinnen",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "18"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Zutphen ForecastIO",
			"Password" : "52.114666,6.212721",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 25,
			"Username" : "562a99a62bf2df0455cf222297eb47b4",
			"idx" : "19"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "schemeringBinnen",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "20"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "BuitenlichAanLaten",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "21"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "GarageLichtAuto",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "22"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Scene Binnen Lichten Auto",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "23"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "isTonyThuis",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "24"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "ping-dummies",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "25"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "GarageLichtAutoContinues",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "26"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "TonyGeoIPThuis",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "27"
		},
		{
			"Address" : "localhost",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 1,
			"Mode2" : 0,
			"Mode3" : 1,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "MQTT_vonderkamp",
			"Password" : "",
			"Port" : 1883,
			"SerialPort" : "1883",
			"Type" : 43,
			"Username" : "",
			"idx" : "28"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Sonoff-1",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "30"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Sonoff-2",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "31"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Sonoff-3",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "32"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "Sonoff-4",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "33"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "TonyInDeBuurt",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "34"
		},
		{
			"Address" : "",
			"DataTimeout" : 0,
			"Enabled" : "true",
			"Extra" : "",
			"Mode1" : 0,
			"Mode2" : 0,
			"Mode3" : 0,
			"Mode4" : 0,
			"Mode5" : 0,
			"Mode6" : 0,
			"Name" : "eventTestSwich",
			"Password" : "",
			"Port" : 0,
			"SerialPort" : "",
			"Type" : 15,
			"Username" : "",
			"idx" : "36"
		}
	],
	"status" : "OK",
	"title" : "Hardware"
}
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Wednesday 14 April 2021 22:22

Code: Select all

http://pi:8080/json.htm?type=devices&rid=113
http://pi:8080/json.htm?type=hardware
Result does look as expected.
Can you temporary switch on debug log for dzVents and inspect the file after a minute or a device change?

Code: Select all

<domoticz dir>/scripts/dzVents/domoticzData.lua
All active devices in domoticz should be listed in this file.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

I have attached the generated file.
After activating the debug, I hit the switch 'eventTestSwich'from off to on to off to on to off.
I peeked in the file, but dunno what to look for.
Hope this helps
Attachments
domoticzData.zip
(3.92 KiB) Downloaded 102 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Saturday 17 April 2021 21:12 I peeked in the file, but dunno what to look for.
Hope this helps
All looks normal. No clue why an update to device 113 does not trigger the script. II tested the exact setup on 2020.2 but cannot replicate the issue. It might be worthwhile the create another virtual switch with a different name or to upgrade to 2021.1
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

Really appreciate your help.

I figured to do an update earlier, but when I hit the 'check for update' I get 'No Update Available !...'
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Thursday 22 April 2021 21:26 I figured to do an update earlier, but when I hit the 'check for update' I get 'No Update Available !...'
What do you see when (from the command line) you try

Code: Select all

cd <domoticz dir>
sudo service domoticz stop
sudo mkdir -p backups
timestamp=$(date +%Y%m%d_%H%M%S)
sudo tar --exclude backups -czf backups/domoticz_backup_$timestamp.tar.gz . # make backup
sudo ./updaterelease
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

I found some time to try your last remark.

Updating to the latest version by commandline helped.

The event is now triggered when I hit the switch with id 113.
It looks like I can get on now with my script.

thanks a bunch
Sjoko
Posts: 15
Joined: Sunday 11 April 2021 16:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by Sjoko »

Maybe I cheered a bit too early.

It appears that after some time, the event processing gets delayed.
The delay seems to increase with time, until it seems that at some point in time, nothing seems happens anymore or it is untracable what is (not) happening.

Restarting domoticz solves this, however only for a very limited amount of time.

This illustrates what is happening (from the log):
11:00:51 restart

11:01:15 switch-on
11:01:33 trigger-On

11:02:36 switch-off
11:03:22 trigger-off

11:04:14 switch-on
11:07:41 trigger-off

can you help ?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot get dzVents to trigger

Post by waaren »

Sjoko wrote: Thursday 27 May 2021 11:12 can you help ?
You might want to switch on debug logging. (see the wiki )
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest