Mouse detection

Post Reply
Posts: 33
Joined: Tuesday 01 December 2015 9:47
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Netherlands

Mouse detection

Post by Ries » Wednesday 13 June 2018 21:08

I have a PIR under the diner table so it would turn on if someone would sit at the table.
It turned out to be an excellent mouse detector. We didn't know we have them.

I created the following simple script to set an dummy alarm "Mouse detected" and a dummy text device that logs the activity during away or asleep hours.

Code: Select all

return {
	on = {
		devices = {
			'Eettafel PIR', 'Sensor keuken'
	execute = function(domoticz, device)
       	 if domoticz.devices('Status').active then -- status is active when all are asleep or away
		    domoticz.devices('Mouse detected!').switchOn().checkFirst()
		    domoticz.devices('Mouse report').updateText('Device ' .. .. ' was changed to '.. device.state)
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest