dzVents Timer problem

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

Moderator: leecollings

Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: dzVents Timer problem

Post by Doudy »

dannybloe wrote: Monday 23 April 2018 9:30 Maybe show us your script. It is clearly wrong as the log-lines tell you.
That's one of my first scripts with dzVents.
Certainly things that are not correct!
:?

Code: Select all

local radiation_value = 'Radiation'
local radiation_sensor = 'WH2600-Solar Radiation'
local light_G = 'I-Applique G'
local light_D = 'I-Applique D'

return {
	active = true,
	
	on = {
		devices = {
			radiation_sensor,
			radiation_value,
		}
	},
	
	on = { 
		timer = { 
--			'at daytime',
--			'between 05:45 and 18:45',
--			'at 8:45-21:15',
--			'between sunrise and sunset'
--			'between 30 minutes before sunset and 30 minutes after sunrise',
			'every 1 minutes between sunset and sunrise',
--			'every 2 minutes between 15 minutes before sunrise and 15 minutes after sunset',
			} 
	},

	execute = function(domoticz, device, timer, triggerInfo)
		print('<font color="blue"> [-------------- Test script Lua 8 --------------] </font>')
		local sensor = domoticz.devices(radiation_sensor)
		local current = sensor.radiation
		local G = domoticz.devices(light_G)
		local D = domoticz.devices(light_D)
		
		if (current < 30) then
			domoticz.log('Radiation :' .. current)
			print('... Allumer lampes ...')
			G.switchOn()
			D.switchOn()
		else
			domoticz.log('Radiation :' .. current)
			print('... Eteindre lampes ...')
			G.switchOff()
			D.switchOff()
		end
	end
}
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents Timer problem

Post by dannybloe »

first of all, you have two on sections. That is not correct. The second one is overriding the first.

Code: Select all

on = {
		devices = {
			radiation_sensor,
			radiation_value,
		},
		timer = { 
			'every 1 minutes between sunset and sunrise',
		} 
}
Second, your execute function has too many parameters. It should be like this:

Code: Select all

execute = function(domoticz, item)
	if (item.isDevice) then 
		-- the trigger was one of the devices
	end
	if (item.isTimer) then
		-- the trigger was the timer going off
	end
	
end
Other than that, your code seems ok. So, looking at the logs you posted earlier... do you have other scripts in that folder? Looks like it.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: dzVents Timer problem

Post by Doudy »

dannybloe wrote: Monday 23 April 2018 10:09 Other than that, your code seems ok. So, looking at the logs you posted earlier... do you have other scripts in that folder? Looks like it.
Yes i have other scripts but they are "active = false"
I have also "dzVents_settings.lua" in this folder
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents Timer problem

Post by dannybloe »

That last one has to go. It is no longer being used and disturbs everything.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: dzVents Timer problem

Post by Doudy »

I have change my script :

Code: Select all

local radiation_value = 'Radiation'
local radiation_sensor = 'WH2600-Solar Radiation'
local light_G = 'I-Applique G'
local light_D = 'I-Applique D'

return {
	active = false,
	
	on = {
		devices = {
			radiation_sensor,
			radiation_value,
		},
		timer = { 
			'every 1 minutes between sunset and sunrise',
			} 
	},

	execute = function(domoticz, item)
		print('<font color="blue"> [-------------- Test script Lua 8 --------------] </font>')
		local sensor = domoticz.devices(radiation_sensor)
		local current = sensor.radiation
		local G = domoticz.devices(light_G)
		local D = domoticz.devices(light_D)
		
		if (item.isTimer) then
			if (current < 30) then
				domoticz.log('Radiation :' .. current)
				print('... Allumer lampes ...')
				G.switchOn()
				D.switchOn()
			else
				domoticz.log('Radiation :' .. current)
				print('... Eteindre lampes ...')
				G.switchOff()
				D.switchOff()
			end
		end
	end
}
but he does not take care of the timer

Code: Select all

2018-04-23 11:42:04.011 dzVents: [-------------- Test script Lua 8 --------------]
2018-04-23 11:42:04.011 dzVents: Info: Radiation :343
2018-04-23 11:42:04.011 dzVents: ... Eteindre lampes ...
2018-04-23 11:42:04.013 dzVents: Info: ------ Finished test8.lua
2018-04-23 11:42:04.013 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-04-23 11:42:04.015 (RFXCOM) Lighting 2 (I-Applique G)
2018-04-23 11:42:04.017 (RFXCOM) Lighting 2 (I-Applique D)
...
2018-04-23 11:42:19.880 dzVents: [-------------- Test script Lua 8 --------------]
...
2018-04-23 11:42:35.898 dzVents: [-------------- Test script Lua 8 --------------]
...
2018-04-23 11:42:51.870 dzVents: [-------------- Test script Lua 8 --------------]
...
etc...
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents Timer problem

Post by dannybloe »

I don't see what the problem is. Your script is clearly triggered by changes in the devices (radiation_sensor/value) and not by the timer. The timer's smallest resolution is one minute and in your log you see that your script is triggered several times within the minute. So it is NOT the timer of your on-section but the devices section. You can turn dzVents into debug mode (settings) and it should tell you what the exact trigger was that initiated the execute.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: dzVents Timer problem

Post by Doudy »

dannybloe wrote: Monday 23 April 2018 12:12 You can turn dzVents into debug mode (settings) and it should tell you what the exact trigger was that initiated the execute.
Here is the log "Debug"

Code: Select all

2018-04-23 13:03:55.889 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:03:55.942 dzVents: Debug: Processing device-adapter for WH2600-Outdoor : Temperature+humidity device adapter
2018-04-23 13:03:55.942 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:03:55.942 dzVents: Debug: Event triggers:
2018-04-23 13:03:55.942 dzVents: Debug: - Device: WH2600-Outdoor
2018-04-23 13:03:56.063 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:03:56.105 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:03:56.106 dzVents: Debug: Processing device-adapter for WH2600-Solar Radiation: Solar radiation device adapter
2018-04-23 13:03:56.106 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:03:56.106 dzVents: Debug: Event triggers:
2018-04-23 13:03:56.106 dzVents: Debug: - Device: WH2600-Wind
2018-04-23 13:03:56.106 dzVents: Debug: - Device: WH2600-Solar Radiation
2018-04-23 13:03:56.127 dzVents: Info: Handling events for: "WH2600-Solar Radiation", value: "559"
2018-04-23 13:03:56.128 dzVents: Info: ------ Start external script: test9.lua: Device: "WH2600-Solar Radiation (Virtuel)", Index: 45
2018-04-23 13:03:56.128 dzVents: [-------------- Test script Lua 9 --------------]
2018-04-23 13:03:56.129 dzVents: Debug: Processing device-adapter for I-Applique G: Switch device adapter
2018-04-23 13:03:56.129 dzVents: Debug: Processing device-adapter for I-Applique D: Switch device adapter
2018-04-23 13:03:56.130 dzVents: Info: ------ Finished test9.lua
2018-04-23 13:03:56.198 LUA: WindResume : SO - 222°
2018-04-23 13:03:56.200 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_Wind.lua
2018-04-23 13:03:57.591 (RFXCOM) Temp + Humidity (T-S. de Bain)
2018-04-23 13:04:00.161 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:00.184 dzVents: Debug: Event triggers:
2018-04-23 13:04:00.184 dzVents: Debug: - Timer
2018-04-23 13:04:03.297 (RFXCOM) Temp + Humidity (T-Garage)
2018-04-23 13:04:11.882 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:11.931 dzVents: Debug: Processing device-adapter for WH2600-Outdoor : Temperature+humidity device adapter
2018-04-23 13:04:11.931 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:11.931 dzVents: Debug: Event triggers:
2018-04-23 13:04:11.931 dzVents: Debug: - Device: WH2600-Outdoor
2018-04-23 13:04:12.054 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:12.094 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:04:12.095 dzVents: Debug: Processing device-adapter for WH2600-Solar Radiation: Solar radiation device adapter
2018-04-23 13:04:12.095 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:12.095 dzVents: Debug: Event triggers:
2018-04-23 13:04:12.095 dzVents: Debug: - Device: WH2600-Wind
2018-04-23 13:04:12.095 dzVents: Debug: - Device: WH2600-Solar Radiation
2018-04-23 13:04:12.116 dzVents: Info: Handling events for: "WH2600-Solar Radiation", value: "560"
2018-04-23 13:04:12.117 dzVents: Info: ------ Start external script: test9.lua: Device: "WH2600-Solar Radiation (Virtuel)", Index: 45
2018-04-23 13:04:12.117 dzVents: [-------------- Test script Lua 9 --------------]
2018-04-23 13:04:12.118 dzVents: Debug: Processing device-adapter for I-Applique G: Switch device adapter
2018-04-23 13:04:12.118 dzVents: Debug: Processing device-adapter for I-Applique D: Switch device adapter
2018-04-23 13:04:12.119 dzVents: Info: ------ Finished test9.lua
2018-04-23 13:04:12.185 LUA: WindResume : SO - 214°
2018-04-23 13:04:12.188 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_Wind.lua
2018-04-23 13:04:28.008 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:28.050 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:04:28.050 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:28.050 dzVents: Debug: Event triggers:
2018-04-23 13:04:28.050 dzVents: Debug: - Device: WH2600-Wind
2018-04-23 13:04:28.136 LUA: WindResume : SSO - 204°
2018-04-23 13:04:28.138 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_Wind.lua
2018-04-23 13:04:28.172 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:28.212 dzVents: Debug: Processing device-adapter for WH2600-Solar Radiation: Solar radiation device adapter
2018-04-23 13:04:28.213 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:28.213 dzVents: Debug: Event triggers:
2018-04-23 13:04:28.213 dzVents: Debug: - Device: WH2600-Solar Radiation
2018-04-23 13:04:28.235 dzVents: Info: Handling events for: "WH2600-Solar Radiation", value: "554"
2018-04-23 13:04:28.235 dzVents: Info: ------ Start external script: test9.lua: Device: "WH2600-Solar Radiation (Virtuel)", Index: 45
2018-04-23 13:04:28.235 dzVents: [-------------- Test script Lua 9 --------------]
2018-04-23 13:04:28.236 dzVents: Debug: Processing device-adapter for I-Applique G: Switch device adapter
2018-04-23 13:04:28.237 dzVents: Debug: Processing device-adapter for I-Applique D: Switch device adapter
2018-04-23 13:04:28.237 dzVents: Info: ------ Finished test9.lua
2018-04-23 13:04:31.239 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:31.279 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:04:31.279 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:31.279 dzVents: Debug: Event triggers:
2018-04-23 13:04:31.280 dzVents: Debug: - Device: WH2600-Wind
2018-04-23 13:04:31.366 LUA: WindResume : SSO - 203°
2018-04-23 13:04:31.368 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_Wind.lua
2018-04-23 13:04:32.932 (RFXCOM) Temp + Humidity (T-Unknown)
2018-04-23 13:04:40.590 (RFXCOM) Temp + Humidity (T-S. de Bain)
2018-04-23 13:04:42.332 (RFXCOM) Temp + Humidity (T-Garage)
2018-04-23 13:04:43.891 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:43.942 dzVents: Debug: Processing device-adapter for WH2600-Outdoor : Temperature+humidity device adapter
2018-04-23 13:04:43.942 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:43.942 dzVents: Debug: Event triggers:
2018-04-23 13:04:43.942 dzVents: Debug: - Device: WH2600-Outdoor
2018-04-23 13:04:44.063 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:44.104 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:04:44.105 dzVents: Debug: Processing device-adapter for WH2600-Solar Radiation: Solar radiation device adapter
2018-04-23 13:04:44.106 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:44.106 dzVents: Debug: Event triggers:
2018-04-23 13:04:44.106 dzVents: Debug: - Device: WH2600-Wind
2018-04-23 13:04:44.106 dzVents: Debug: - Device: WH2600-Solar Radiation
2018-04-23 13:04:44.130 dzVents: Info: Handling events for: "WH2600-Solar Radiation", value: "532"
2018-04-23 13:04:44.130 dzVents: Info: ------ Start external script: test9.lua: Device: "WH2600-Solar Radiation (Virtuel)", Index: 45
2018-04-23 13:04:44.130 dzVents: [-------------- Test script Lua 9 --------------]
2018-04-23 13:04:44.132 dzVents: Debug: Processing device-adapter for I-Applique G: Switch device adapter
2018-04-23 13:04:44.133 dzVents: Debug: Processing device-adapter for I-Applique D: Switch device adapter
2018-04-23 13:04:44.133 dzVents: Info: ------ Finished test9.lua
2018-04-23 13:04:44.200 LUA: WindResume : SSO - 212°
2018-04-23 13:04:44.202 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_Wind.lua
2018-04-23 13:04:59.857 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:04:59.901 dzVents: Debug: Processing device-adapter for WH2600-Outdoor : Temperature+humidity device adapter
2018-04-23 13:04:59.901 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:04:59.901 dzVents: Debug: Event triggers:
2018-04-23 13:04:59.901 dzVents: Debug: - Device: WH2600-Outdoor
2018-04-23 13:05:00.023 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:05:00.063 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:05:00.064 dzVents: Debug: Processing device-adapter for WH2600-Solar Radiation: Solar radiation device adapter
2018-04-23 13:05:00.064 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:05:00.064 dzVents: Debug: Event triggers:
2018-04-23 13:05:00.064 dzVents: Debug: - Device: WH2600-Wind
2018-04-23 13:05:00.064 dzVents: Debug: - Device: WH2600-Solar Radiation
2018-04-23 13:05:00.085 dzVents: Info: Handling events for: "WH2600-Solar Radiation", value: "550"
2018-04-23 13:05:00.086 dzVents: Info: ------ Start external script: test9.lua: Device: "WH2600-Solar Radiation (Virtuel)", Index: 45
2018-04-23 13:05:00.086 dzVents: [-------------- Test script Lua 9 --------------]
2018-04-23 13:05:00.087 dzVents: Debug: Processing device-adapter for I-Applique G: Switch device adapter
2018-04-23 13:05:00.087 dzVents: Debug: Processing device-adapter for I-Applique D: Switch device adapter
2018-04-23 13:05:00.087 dzVents: Info: ------ Finished test9.lua
2018-04-23 13:05:00.160 LUA: WindResume : SO - 231°
2018-04-23 13:05:00.163 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_Wind.lua
2018-04-23 13:05:00.200 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:05:00.223 dzVents: Debug: Event triggers:
2018-04-23 13:05:00.223 dzVents: Debug: - Timer
2018-04-23 13:05:12.671 (RFXCOM) Temp + Humidity (T-Unknown)
2018-04-23 13:05:15.924 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2018-04-23 13:05:15.965 dzVents: Debug: Processing device-adapter for WH2600-Wind: Wind device adapter
2018-04-23 13:05:15.966 dzVents: Debug: dzVents version: 2.4.5
2018-04-23 13:05:15.966 dzVents: Debug: Event triggers:
2018-04-23 13:05:15.966 dzVents: Debug: - Device: WH2600-Wind
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents Timer problem

Post by dannybloe »

So, what is the problem then? Clearly your timer trigger is not triggering test9.lua in the log above. Only changes in WH2600-Solar Radiation. Check all lines containing: Start external script: test9.lua.

Note that the triggers defined in the on-section are independent of each other. So you have timer triggers and device triggers and if ANY of them matches then the script is executed.

If on the other hand you only want this script to be executed then you have to change it like this:

Code: Select all

on = {
	devices = {
		[radiation_sensor] = { 'between sunset and sunrise'},
		[radiation_value] = { 'between sunset and sunrise'},
	}
}
or even better:

Code: Select all

on = {
	devices = {
		[radiation_sensor] = { 'at nighttime'},
		[radiation_value] = { 'at nighttime'},
	}
}
Note that you don't use every x minutes here because that's only for timer triggers.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: dzVents Timer problem

Post by Doudy »

Hello,
dannybloe wrote: Tuesday 24 April 2018 8:27 Note that the triggers defined in the on-section are independent of each other. So you have timer triggers and device triggers and if ANY of them matches then the script is executed.
following your advice, I modified my script :

Code: Select all

local radiation_value = 'Radiation'
local radiation_sensor = 'WH2600-Solar Radiation'
local light_G = 'I-Applique G'
local light_D = 'I-Applique D'

return {
	active = true,
	
	on = {
		timer = { 
			'every 3 minutes between 15 minutes before sunrise and 15 minutes after sunset',
			},
	},

	execute = function(domoticz, timer)
		print('<font color="blue"> [-------------- Test script Lua 10 --------------] </font>')
		local sensor = domoticz.devices(radiation_sensor)
		local current = sensor.radiation
		local G = domoticz.devices(light_G)
		local D = domoticz.devices(light_D)
		
--		if (item.isTimer) then
			if (current < 30) then
				domoticz.log('Radiation :' .. current)
				print('... Allumer lampes ...')
				G.switchOn()
				D.switchOn()
			else
				domoticz.log('Radiation :' .. current)
				print('... Eteindre lampes ...')
				G.switchOff()
				D.switchOff()
			end
--		end
	end
}
I have delete :

Code: Select all

		devices = {
			radiation_sensor,
			radiation_value,
			},
the following command works every 3 minutes

Code: Select all

			'every 3 minutes between 15 minutes before sunrise and 15 minutes after sunset',
I have change following :

Code: Select all

	execute = function(domoticz, timer)
Its OK
Thanks
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: dzVents Timer problem

Post by Doudy »

I modified my script a bit
I made it more 'clean'
Well I think...

Code: Select all

return {
	active = true,
	
	on = {
		timer = { 
			'every 5 minutes between 15 minutes after sunrise and 15 minutes before sunset',
			},
	},

	execute = function(domoticz, timer)
		print('<font color="blue"> [-------------- Test script Lua Final --------------] </font>')
--		local radiation_sensor = domoticz.devices('WH2600-Solar Radiation')
		local radiation_sensor = domoticz.devices(45)
		local current_value = radiation_sensor.radiation
		local G_device = domoticz.devices('I-Applique G')
		local D_device = domoticz.devices('I-Applique D')

		domoticz.log('sensor_device : ' .. radiation_sensor.name)
		
		if (current_value < 30) then		
			domoticz.log('Radiation : ' .. current_value)
			print('... Allumer lampes ...')
			G_device.switchOn()
			D_device.switchOn()
		else
			domoticz.log('Radiation : ' .. current_value)
			print('... Eteindre lampes ...')
			G_device.switchOff()
			D_device.switchOff()
		end
	end
}
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest