I want a switch to be pushed remotely...

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
LexHoub
New user
Posts: 3
Joined: 22 Jun 2018, 07:40

I want a switch to be pushed remotely...

#1 Post by LexHoub » 15 Oct 2018, 09:52

Hi,

I use ESP_EASY in combination with Homeseer.
As controller I call HomeSeer_REST_API.aspx with IDX as device number.
This works perfect when I am near the actual light-switches that are build into the wall with an ESP behind it.

But is there a way to simulate that a button is pushed (so force an input to get high/low)?
Why do I need this?
My switches are at several place in my home and my office is at the first floor. So every time I am testing I must run through the house.
Or even worse: When I am not at home and want to change and test something.
I would be so much easier to simulate the change of an input!
Here is my devicelist
Knipsel.PNG
Knipsel.PNG (49.7 KiB) Viewed 3087 times

Alex

Wiki
Normal user
Posts: 413
Joined: 23 Apr 2018, 17:55
Location: Germany

Re: I want a switch to be pushed remotely...

#2 Post by Wiki » 15 Oct 2018, 11:20

Hi,

have a look here: https://www.letscontrolit.com/wiki/inde ... #HTTP_call

May be this will help you.

Code: Select all

pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $

LexHoub
New user
Posts: 3
Joined: 22 Jun 2018, 07:40

Re: I want a switch to be pushed remotely...

#3 Post by LexHoub » 15 Oct 2018, 12:45

Going to check it now!

LexHoub
New user
Posts: 3
Joined: 22 Jun 2018, 07:40

Re: I want a switch to be pushed remotely...

#4 Post by LexHoub » 15 Oct 2018, 13:11

Seems to work!!

I use <<ESP IP>>/control?cmd=event,L2on

My ruleset 1:

Code: Select all

 On L2on do 
 gpio,0,1 //Set input 0 High
  timerSet,1,1 //timer 1 set for 1 sec
endon
 
On L2off do 
  timerSet,1,0 //timer 1 set to halt,
  gpio,0,0 //Set input 0 low (normal state)
endon
 
On Rules#Timer=1 do  
   gpio,0,0 //Set input 0 low (normal state)
endOn
The log output looks like this:

Code: Select all

481240: EVENT: L2on
481250: ACT : gpio,0,1
481253: SW : GPIO 0 Set to 1
481257: ACT : timerSet,1,1
481284: Command: timerset
481337: SW : Switch state 1 Output value 1
481339: EVENT: L2#S=1.00
482048: WD : Uptime 8 ConnectFailures 0 FreeMem 14592
482736: EVENT: Rules#Timer=1
482752: ACT : gpio,0,0
482754: SW : GPIO 0 Set to 0


So the input gets HIGH and with help from the controller my homeseer device is set!

THANKS!!!!!!!! :D :D :D

Alex

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: I want a switch to be pushed remotely...

#5 Post by dynamicdave » 16 Oct 2018, 12:09

Thanks for sharing this - brilliant use of 'Rules' and 'Events'.

I've got a set of IR detectors around the outside of my house that drive WeMos D1 Minis that pass info via MQTT to Node-RED.

I've now implemented your 'hints/suggestion' and can now test my system remotely - yipppeeee.

PS: I'm using an 'mqtt' node to send the event rather than an 'http' node.

Thanks again.

Regards from David.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 42 guests