Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get an indication whether the current switch state is in line with the "schedule" or it has been switched, manually #21

Closed
mwittig opened this issue Jan 4, 2017 · 2 comments

Comments

@mwittig
Copy link
Owner

mwittig commented Jan 4, 2017

https://forum.pimatic.org/topic/333/new-plugin-for-edimax-smartplugs/42

"...

One of these plugs automates a cat drinking well, for which I have set up a schedule.
This works very well, but my kids are activating the plug very often manually when a cat is sitting before the well making big eyes …

I would like to get the information if the current on/off state is scheduled or not - or the other way round, I would like to know if it was activated manually to be able to switch it off after something like 10 minutes or so.

I tried to think of a rule, but there is no possibility to know if it was scheduled or not. The only way would be to set up the schedule within pimatic again …

Well, I would more like to use the schedule features of the plug itself and get this extra info … So, I had a look at the schedule string. It is quite clear how it is encoded, but at the moment I do not really know how to simply strip this down to “current time is within scheduled time” …

My schedule for sunday (‘0’) looks like this "‘0’: ‘60801-b0d01-g0iu1-k0m01-n5nO0’"
This decodes simply to:

60801 = 06:00 - 08:00 - On
b0d01 = 11:00 - 13:00 - On
g0iu1 = 16:00 - 18:30 - On
k0m01 = 20:00 - 22:00 - On
and as an Off/big number - Example

n5nO0 = 23:05 - 23:50 - Off
So the numbers 0 to 60 are encoded as something like 0-9a-zA-Z
And at the end there is a 0 or a 1 for Off / On

For me it would really be sufficient to have a boolean attribute saying that I’m currently in a scheduled On time slot or not.
..."

@mwittig mwittig changed the title Get an indication whether the current switch state matches the schedule or the switch state has been changed manually Get an indication whether the current switch state is in line with the "schedule" or it has been switched, manually Jan 4, 2017
@mplessing
Copy link
Contributor

Hi, pull request is pending for this.

The smart plug also offers the option to schedule the OFF state, but this is somehow doubled as
if there is no scheduled ON, it is of course scheduled OFF.
Following this only the ON state is relevant for a schedule status of "active".

Regards

@mwittig
Copy link
Owner Author

mwittig commented Jan 22, 2017

Released pimatic-edimax@0.3.15
Thanks, again!

@mwittig mwittig closed this as completed Jan 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants