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

Timer functionality per switch #72

Closed
theyosh opened this issue Jan 10, 2018 · 15 comments
Closed

Timer functionality per switch #72

theyosh opened this issue Jan 10, 2018 · 15 comments

Comments

@theyosh
Copy link
Owner

theyosh commented Jan 10, 2018

Add an option to created separated timers for switches. This will allow the switch to turn off and on on a time based schedule.

Needed input per switch:

  • Timer start time - ex: 09:00
  • Timer stop time - ex: 22:00 or 10:00 PM
  • Timer on duration - ex: 180
  • Timer off duration - ex: 90

In this example the timer will run between 9 AM and 10 PM. In that period the power will be on for 180 minutes and then off for 90 minutes. This repeats till 10 PM.

If this timer is enabled on the switch, it cannot be used on the environment page. Because the switch has its own timer logic and not using the central logic anymore.

The on and off durations are in minutes.

The power switch will be checked every 30 seconds if a power switch change is needed.

The power switch indicator will have a clock icon to it to show that it is timer based.

timerswitch

@theyosh theyosh mentioned this issue Jan 10, 2018
Repository owner deleted a comment from Barbara1984 Jan 13, 2018
Repository owner deleted a comment from Aapjes94 Jan 13, 2018
@Barbara1984
Copy link

Hi, I do not want to be silly but when will this update come about? :-)

theyosh added a commit that referenced this issue Jan 25, 2018
…date brings only updates to the webinterface and configuration. The timer functionality is not yet implemented. #72
@theyosh
Copy link
Owner Author

theyosh commented Jan 25, 2018

Updates for this feature can be tested in branch https://github.com/theyosh/TerrariumPI/tree/feature/switch_timers. So update with git pull. Then use git checkout feature/switch_timers. Then restart TerrariumPI and clean your browser cache.

Also keep a copy of your settings file before testing this.

@Barbara1984
Copy link

Ok, thanks, I'll tell you how it works

@Aapjes94
Copy link

Aapjes94 commented Jan 25, 2018

From my end, this branch seems to work. The update worked and it's installed. The 'translations' are still missing, so it isn't exactly clear how this function work.

theyosh added a commit that referenced this issue Jan 27, 2018
theyosh added a commit that referenced this issue Jan 27, 2018
theyosh added a commit that referenced this issue Jan 27, 2018
theyosh added a commit that referenced this issue Jan 27, 2018
@theyosh
Copy link
Owner Author

theyosh commented Jan 27, 2018

At this point I think I got it working. So it could be fully tested now.

@Barbara1984
Copy link

Very cool thanks for your work I will test it tomorrow.

@Barbara1984
Copy link

Hi, I have now made the update but unfortunately I find no setting for the timer

@theyosh
Copy link
Owner Author

theyosh commented Jan 28, 2018

Clear browser cache, and select activate at the timer pull down when editing the switches.

@Barbara1984
Copy link

Sorry maybe I'm too stupid but I think nothing has done the update and emptied cache. But I can not find the timer mode.

@Barbara1984
Copy link

terrarium

@Aapjes94
Copy link

It worked for me so something went wrong during your install. Are you sure you used git checkout feature/switch_timers after git pull

cd TerrariumPi
git pull
git checkout feature/switch_timers
sudo ./install.sh
probably a sudo reboot is needed after this as well to get everything set up properly

@Barbara1984
Copy link

Thanks for the help now it works :-)

@theyosh
Copy link
Owner Author

theyosh commented Jan 29, 2018

Cool, I have it also merged to master branch. So everybody can use it now 👍

@Barbara1984
Copy link

Can you please # 82 again open the subject is unfortunately not done :-(

@theyosh
Copy link
Owner Author

theyosh commented Feb 3, 2018

Update the code that timer functionality is also in all the environment parts. Same logic.

@theyosh theyosh closed this as completed Feb 8, 2018
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

3 participants