Timed Actions in Blockly

Moderator: leecollings

Post Reply
KaeptnM
Posts: 4
Joined: Friday 01 February 2019 16:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Timed Actions in Blockly

Post by KaeptnM »

Hey, together!

I need your help again, this time it's blockly :roll:


I'd like to program a scenario with that I can control the heating in my bathroom in the morning. So when I go to bed, I will tell the system, when I'd like to stand up the next day, and it will turn on the thermostat one hour before.

E.g. I have to get up at 6:00 it will begin heating at 5:00 for 120 minutes.

Thats what I did up to now (sorry for german descriptions):

I made an selector switch with these options :
Blockly_03.jpg
Blockly_03.jpg (48.53 KiB) Viewed 943 times
After that, I made a normal switch which sets the temperature.
(That's because the Setpoint-block is not expandable with more options. in the end "Wohnzimmer" will be "Badezimmer", its just for testing)
Blockly_02.jpg
Blockly_02.jpg (48.8 KiB) Viewed 943 times
And then I made the Blockly-table for the selector switch (ignore the telegram notifications):
Blockly_01.jpg
Blockly_01.jpg (194.91 KiB) Viewed 943 times
So, for example:
I have to get up at 6 o'clock. I will turn the selector switch "Vorheizen Badezimmer" to "Aufstehen: 6 Uhr" ("Stand up at 6 o'clock") the evening before.
So the normal switch ("Badezimmer-vorheizen_Func") will be turned on for 120 minutes, which means, that the temperature is set to 21 degrees.

But I have to include the time! In this example I have to include "at 5:00,that the switch is switched at 5 o'clock. How can I do that?


I'm sorry, I'm very confused, an I hope you understand what I mean. Can anyone help :cry:

Thanks!
User avatar
rasch
Posts: 1
Joined: Monday 25 February 2019 17:30
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.9700
Location: Schleswig-Holstein
Contact:

Re: Timed Actions in Blockly

Post by rasch »

I think, it may work if you set a variable after the "Set Badezimmer-vorheizen_Func"
e.g.: "Set wakeup-time = 9:00"
And the Badezimmer-vorheizen_Func gets the value from this variable.
I'm not sure if this will work. It's just an idea... :)
RaspberryPi2+ZME-UZB1, Pilight, Homebridge
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: Timed Actions in Blockly

Post by dressie »

If you use the "AND" function, it will work. So like this:

If (switch) = "wake-up at 6" AND the time = "05.00"
SET .....

You know what I mean? That way it looks at you switch and checks the time before it will do an action, in your case turn the heating on.


I have this running which looks a lot what you want:
Knipsel.JPG
Knipsel.JPG (59.46 KiB) Viewed 872 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest