• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rules time interval
#1
I would like to cool my room between the hours of 15 to 23
How to set the rules that the temperature in the room was 19 degrees during these hours
 
Reply
#2
Take a look at the rules in my config.

Also a nice feature is the use of generic dimmers for adjusting this settings over the gui.
Terrarium:  RPi Model B Rev 2 / pilight 8.1.2 / stretch
Aquarium: RPi Model B Plus Rev 1.2 / pilight 8.0.6 / jessie
 
Reply
#3
(03-12-2016, 12:15 PM)terrar Wrote: Take a look at the rules in my config.

Also a nice feature is the use of generic dimmers for adjusting this settings over the gui.
I think I did not understand.
I want air conditioning worked only during certain hours.
For example, from 15 to 23.30 hours and additionally responsive to the temperature sensor.
At other times the air conditioning to be turned off
Dimmers do not have and do not use.
 
Reply
#4
So first we have to declare what you need/want to use for this project:

1) which temperature sensor
(or do you only want fixed times for on and off
independent from actually room temperature?)
2) which switch for air condition
(or are you able to switch the remote of the
air-condition via pilight?)

Tell me which devices you plan to use for your project an i try to help you with the rules then.
Terrarium:  RPi Model B Rev 2 / pilight 8.1.2 / stretch
Aquarium: RPi Model B Plus Rev 1.2 / pilight 8.0.6 / jessie
 
Reply
#5
(03-12-2016, 02:27 PM)terrar Wrote: So first we have to declare what you need/want to use for this project:

1) which temperature sensor
(or do you only want fixed times for on and off
independent from actually room temperature?)
2) which switch for air condition
(or are you able to switch the remote of the
air-condition via pilight?)

Tell me which devices you plan to use for your project an i try to help you with the rules then.

I use Raspberry + DS18B20 + wireless socket 433MHz(clarus_switch)
 
Reply
#6
Could you provide more information about your setup, such as how you are controlling your air conditioning?
@terrar's config contains lots of time-based rules to switch devices on and off, so you should have look at that, as well as the pilight manual (http://manual.pilight.org).
 
Reply
#7
(03-12-2016, 02:35 PM)pilino1234 Wrote: Could you provide more information about your setup, such as how you are controlling your air conditioning?
@terrar's config contains lots of time-based rules to switch devices on and off, so you should have look at that, as well as the pilight manual (http://manual.pilight.org).

I can not give more information.
Simply I want to have my air conditioning was turned on by (clarus_switch) at 15.00 and off at 22.30 and also at this time that was controlled by a sensor DS18B20
At other times it is to be OFF
 
Reply
#8
For a simple automation without possibility to adjust timerange and temperature in the gui without manual changes in the config.json this rules should work:

Code:
    "rules": {
        "aircondition_on_in_defined_timerange_depending_on_temperature": {
            "rule": "IF time.hour >= 15 AND time.hour < 23 AND (zeit.second % 10 == 0) AND temperaturesensor.temperature > 19 AND clarus.state IS off THEN switch DEVICE clarus TO on AFTER 5 SECOND",
            "active": 1
        },
        "aircondition_off_when_temperature_reached": {
            "rule": "IF temperaturesensor.temperature < 19 AND clarus.state IS on THEN switch DEVICE clarus TO off AFTER 5 SECOND",
            "active": 1
        },
        "aircondition_off_when_timerange_ended": {
            "rule": "IF zeit.hour == 23 AND (zeit.second % 10 == 0) AND clarus.state IS on THEN switch DEVICE clarus TO off AFTER 5 SECOND",
            "active": 1
        }

This rules should activate your aircondition at 15:00 until 22:59 but only when temperature is higher than 19°C (rule 1)
and stops it when temperature is lower 19°C (rule 2)
or endtime (23:00) is reached.(rule 3)

needed device-protocols:
* clarus switch
* ds18b20
* datetime

The devicenames have to be adapted to your config.
Terrarium:  RPi Model B Rev 2 / pilight 8.1.2 / stretch
Aquarium: RPi Model B Plus Rev 1.2 / pilight 8.0.6 / jessie
 
Reply
#9
Thank you very much. I tested.


P.S. Everything works as it should.
Thank you very much.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  puzzled by syntax when using RANDOM time Emiks5 4 1,305 03-04-2020, 10:57 PM
Last Post: Emiks5
  [8.1.2] variables in rules -> error terrar 1 793 09-14-2018, 05:28 PM
Last Post: curlymo
  Rules wont work bdb 2 1,124 08-12-2018, 06:25 PM
Last Post: bdb
  Can't switch Relay device by rules: Error switch.lua:77 wobbi 6 1,567 07-31-2018, 06:25 AM
Last Post: curlymo
  Strange behavior of rules currock 4 1,357 06-28-2018, 05:57 PM
Last Post: currock
  feature request: switching rules terrar 7 1,904 05-05-2018, 09:23 PM
Last Post: trader23
  variable "label" not allowed in rules Niek 4 2,980 09-30-2017, 06:39 PM
Last Post: curlymo
  Rule executed at wrong time philipp81 1 1,183 02-25-2017, 10:43 PM
Last Post: curlymo
  [Solved ]Turn off device at random time manmetdehamer 4 2,576 07-27-2016, 03:35 PM
Last Post: manmetdehamer
  option "all" not sent in rules muecke 5 2,514 07-01-2016, 11:37 AM
Last Post: Niek

Forum Jump:


Browsing: 1 Guest(s)