I have written this code:
Code: Select all
--[[
This script runs a php page when a certain switch is "on"
--]]
commandArray = {}
-- declare some constants
-- adjust to your specific situation
SENSOR_NAME = 'Beweging badkamer' -- exact device name of the motion sensor
if (otherdevices[SENSOR_NAME]=='On' ) then
http.request_batch({
{"GET", "http://192.168.1.82/~Miel/HWtemp.php"}
})
end
return commandArray
(Reason for using this script is that i would like my temperature sensors from Homewizard to send updates to Domoticz... if i do that every minute, it will lead to slow performance of my Homewizard..... I run Domoticz on a Synology Nas).