Disable/enable Devices via commands?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jobst
Normal user
Posts: 22
Joined: 19 Mar 2018, 12:05

Disable/enable Devices via commands?

#1 Post by jobst » 27 Mar 2018, 03:31

Hi

Is there a way that I could enable or disable devices via commands?

For example, I have a few sonoffs that have a motion sensor attached, those motion sensors are attached to some outside lights.
During the day it is pretty useless to have thoses devices (switches) "enabled".

I thought turning them off via commands would be a good idea.

Is this possible?

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Disable/enable Devices via commands?

#2 Post by Oxyandy » 27 Mar 2018, 04:05

You can create rules to turn them on at a certain time & off at a certain time !
See Wiki of commands
https://www.letscontrolit.com/wiki/inde ... _Reference
https://www.letscontrolit.com/wiki/inde ... rial_Rules
You are looking for On Clock#time

I would be interested in a command via Wifi which could disable / enable a device while you mention the subject..
The Wifi command would stop any internal timers etc from operating, but still able to be 'enabled' via Wifi again.
Last edited by Oxyandy on 27 Mar 2018, 14:30, edited 1 time in total.

jobst
Normal user
Posts: 22
Joined: 19 Mar 2018, 12:05

Re: Disable/enable Devices via commands?

#3 Post by jobst » 27 Mar 2018, 04:59

Oxyandy wrote: 27 Mar 2018, 04:05 [snip]

You are looking for OnClock
I cannot find that command.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Disable/enable Devices via commands?

#4 Post by grovkillen » 27 Mar 2018, 05:51

That's an event, look at the rules tutorials.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

jobst
Normal user
Posts: 22
Joined: 19 Mar 2018, 12:05

Re: Disable/enable Devices via commands?

#5 Post by jobst » 27 Mar 2018, 06:14

grovkillen wrote: 27 Mar 2018, 05:51 That's an event, look at the rules tutorials.
There should be a "thumbs up" in this forum like in other forums (e.g. github).

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Disable/enable Devices via commands?

#6 Post by grovkillen » 27 Mar 2018, 06:18

jobst wrote: 27 Mar 2018, 06:14
grovkillen wrote: 27 Mar 2018, 05:51 That's an event, look at the rules tutorials.
There should be a "thumbs up" in this forum like in other forums (e.g. github).
:D it's a bit old. The forum I mean.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Disable/enable Devices via commands?

#7 Post by budman1758 » 27 Mar 2018, 09:15

:D it's a bit old. The forum I mean.
I like it. Its easy to read and completely uncluttered by ads and other BS and junk.
Have you tried to find anything in the ESP forum?? Sheeeeeesh! :roll:
https://www.esp8266.com/index.php
"The glass is twice as big as it needs to be".

jobst
Normal user
Posts: 22
Joined: 19 Mar 2018, 12:05

Re: Disable/enable Devices via commands?

#8 Post by jobst » 28 Mar 2018, 02:50

budman1758 wrote: 27 Mar 2018, 09:15 Have you tried to find anything in the ESP forum?? Sheeeeeesh! :roll:
Yes and no - the question was related to the mega stuff ... as I am running a mega version and I was not sure whether a particualr feature is implemented.
Also I was going the way @Oxyandy in this thread was going ... suggesting it would be a good idea (iff its NOT available) to be able to turn ON and OFF devices via http commands.

E.g. having a server and doing a sweep accross the network and turn off/on devices on all sonoffs connected ... if I do not need them during certain periods.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Disable/enable Devices via commands?

#9 Post by grovkillen » 28 Mar 2018, 05:52

Budman was referring to my comment about the forum engine being old.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

jobst
Normal user
Posts: 22
Joined: 19 Mar 2018, 12:05

Re: Disable/enable Devices via commands?

#10 Post by jobst » 28 Mar 2018, 06:24

grovkillen wrote: 28 Mar 2018, 05:52 Budman was referring to my comment about the forum engine being old.
Ok, and I thought I could finally make my point as in "It would be a good idae to have this feature - as in being able to control devices (turn on/off) using http commands ...." ;-)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Disable/enable Devices via commands?

#11 Post by grovkillen » 28 Mar 2018, 06:30

But you should add this as a feature request on Github. It sounds useful, the closest thing we got now is the TaskClear command but that is deletes the task entirely.

Suggested name for the command TaskEnable and he syntax

Code: Select all

TaskEnable,<task number>,<1 or 0>
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Disable/enable Devices via commands?

#12 Post by Oxyandy » 28 Mar 2018, 14:48

Sorry my first post wasn't so clear, I was about to leave to do a job, anyway my thing is,
I have a pump watering a system with plants & I am away..
Before I left I set-up a back up reservoir in case anything happens to the first..
Well no point in the first running if it's close to empty, and the second has been - enabled.
A command from Domoticz which would disable / enable would be handy.. Just one click..
But thinking about it another way, just remote desktop in - or - team viewer -
and just delete the rules that turn the pump on, always another way when you think about it.
Domoticz keeps a track of sunrise, sunset based on location - but I have have no use for that, but know something like that is there.
Did you work something out ?

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests