monitor wall plug from washing machine

Moderator: leecollings

Locked
derjungewilde
Posts: 1
Joined: Wednesday 09 December 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

monitor wall plug from washing machine

Post by derjungewilde »

Hi

I'm new with Domoticz and LUA.

I want to monitor my wall plug for the washing machine to tell me if the laundry is done.
Below is a LUA script from a fibaro froum. 161 is the id for the wall plug in the fibaro system. 45 for the smartphone.

How does the script has to look like for Domoticz and will it be possible to do that.

sorry for my bad english

thanks and regards

Alex

Code: Select all


<code>--[[
%% properties
161 value
%% globals
--]]
 
local sourceTrigger = fibaro:getSourceTrigger();
 
if (sourceTrigger[&'type'] == 'property') -- Trigger wall plug
   then 
   fibaro:sleep(600000);    -- 10 min delay
   local wallplug =  (tonumber(fibaro:getValue(161, 'value')) > 0 ); -- get wall plug status
  if (Wallplug) 
    then 
      while true do
       local PushOff = (tonumber(fibaro:getValue(161, 'valueSensor')) < 8 ); -- Wallplus < then 8 watt
       if (PushOff) then
        fibaro:call(45, 'sendPush', 'laundry is done'); -- send push message tosmartphone
        fibaro:sleep(600000);   -- 10 min delay
        fibaro:call(45, 'sendPush', 'wall plug will turn off'); -- send push message tosmartphone
        fibaro:call(161, 'turnOff');  -- wallplug off
        break;
       end
       fibaro:sleep(60000);
      end
   end
end  
 
</code>
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: monitor wall plug from washing machine

Post by ThinkPad »

I have this already working with a Lua script for Domoticz, see this topic: http://domoticz.com/forum/viewtopic.php ... 187#p64660

As this topic is now duplicate, i will close it.
I am not active on this forum anymore.
Locked

Who is online

Users browsing this forum: No registered users and 1 guest