Useful RULES - Post your rules here!

R2D2 shared this idea 5 years ago
Under Consideration

Thread for rules people have created. Please use the format provided in the first post and only discuss the rules by using the reply function in the relevant post. Thank you!


I am using lots of virtual switches to do the things I want more or less automatically based on rules. I decided to put the my most useful rules here. There more rules but they are pretty specific to me needs. E.g. wake up is detected by motion sensors in a particular time frame and the home then goes to wake up mode, which means some light, sound and heating configuration changes..


In my opinion it all depends on the clever and more or less not noticeable placement of sensors. If you do not use the Philips Hue system you should definitely consider buying it. It will be a total game changer.


But this only fun if every Z-Wave sensor or actuator is reachable by the Zipabox. To assure this you should also buy some Fibaro Wall Plugs, not for switching stuf on or off but for establishing a better mesh network. But make sure that they really work as router. You can do so by clicking onto "Network Heal" in the Zipabox Settings menu. If they do not show up as a routing device you have to exclude in include them again.



________


"At Home or Away?"-Rules


Purpose:


To find out if someone is at home or not and to do the appropriate stuff according to the result.

Requirements:

  • door sensor (located at place of entry and exit)
  • motion sensor (located inside near the place of entry)

  • virtual switch "Anwesenheit" (indicating the home [ON] or away mode [OFF])
  • variable "Bewegung" (indicating movement [1] or no movement [0] inside the home)

Screenshot:


1fd722966c7b2c32abc8c020210ea4d8


Explanation:


In order find out if someone is at home or not, we have to use two rules. We need a door sensor and a motion sensor. We also need to create a virtual switch for storing the home or away state and a variable for storing the motion sensing state. As this variable only stores the values 0 and 1 it could be replaced by a virtual switch.


The first rule (Rule 20) is executed when the door is opened. The checks if motion has been sensed inside the house just a moment before. If no motion has been sensed the rule assumes that the door has been opened from the outside and switches the virtual switch "Anwesenheit" ("at home") to on. If motion has been sensed the rule waits for two minutes before checking again if motion has been sensed. If after two minutes no motion has been sensed the rule assumes that the door has been opened from the inside and the you have left the house. It then puts the virtual switch "Anwesenheit" into the off position. You have to create a rule for this switch to do the stuff you want to do when it moves to off or on. An example will follow later.


The second rule (Rule 19) is executed when motion is sensed by the motion sensor. If you have more than one motion sensor, a similar rule should be created for each of the sensors for better reliability. If motion has been sensed the variable "Bewegung" ("motion") is set to "1". The rule then waits for two minutes before setting the variable "Bewegung" back to "0".


Notes:

  • Variables can be created in the rule creator. Log out after creation and log in again to make sure that they are available in the rule creator.
  • Virtual switches can be created by adding a Z-Wave device in the device manager.

Comments (20)

photo
2

Rule for Virtual Switch



Purpose:


Rule for doing something when a virtual switch has been switched into the ON or OFF position. This example uses the virtual switch "Anwesenheit" from the first example to do something when someone is leaving or entering the home.


Requirements:


  • actuators to do something (here one thermostat and another virtual switch)
  • sensors that help deciding to to something (here one luminance sensor)


  • virtual switch (here called "Anwesenheit" and representing home or away state)

Screenshot:


dfd9a98b6520868544d2a5ee900dfa16


Explanation:


The rule is executed when the virtual switch has been moved - by another rule or manually by yourself! - into the ON position. A variable called "anwesend" representing that someone is at home ("1") or not ("0") is set to "1". The heating is then set to 22 degrees celcius. Afterwards the rule checks the luminance value of a luminance sensor. If the luminance value is below 50 the rule assumes that it is dark and moves another virtual switch called "Licht Hell" ("Light Bright") into the ON position.


Notes:


  • The rule is only executed when the virtual switch is moved into the ON position either by another rule or manually. The movement into the OFF position has to be covered by another rule. You can also use one rule for both positions. You then have to use "if ... then .. else". An example will follow.

photo
2

Rule for switching lighting on or off (Philips Hue)


Purpose:


Another virtual switch based rule for switching lighting on or off. In this example the Philips Hue system is used.


Requirements:


  • virtual switch
  • some controllable lights (e.g. Philips Hue)

Screenshot:


27dc9274b04dd714fda7a82bcba45f2b


Explanation:


The rule is executed when the virtual switch "Licht Hell" ("Light Bright") is moved either into the ON or into the OFF position either by another rule or manually. It then checks if the virtual switch has been moved into the ON position.


In this case a "HTTP request" action is executed. This action sending a command to the bridge of the Philips Hue system and switches a light on:


c54ba0578dc17770c3925732e14ec47c


The URL consists of the IP address of the Philips Hue bridge and the username used to control the bridge. You can finde more information here. The Hue system is pretty powerful and high quality. It can also be controlled very easily by "HTTP request" actions. The light is identified by its number ID in the URL field. The state the light should move into is defined in the Body field. Here the light is switched on, set to maximal brightness, set to a particular color defined by its hue value and set to a particular saturation.


If the virtual switch has been moved into the OFF position another "HTTP request" action is executed which switches the light off. In order to do this the "bri", "hue" and "sat" lines in the above body field have to be removed and "true" has to be replaced by "false".


Notes:


  • The Philips Hue system also provides group of lights so that you can control a whole group of lights by just one "HTTP request" action.

photo
1

Nice one guys

photo
1

This is a nice idea!


maby zipato can make a topic whit this.

photo
1

And by duplicating the body you can switch on/off multiple hue bulbs I guess, right?

photo
1

You put another "HTTP request" action under it and just change the number of the light in the URL field. Both lights will then be switched on or off simultaniously.

photo
photo
1

I recommend the POSTMAN app (can be found in the Chrome web store) for testing your REST API calls to systems like the Hue Bridge.

photo
1

The bridge itself offers a debugger where you can test your requests.

photo
1

I know, but I like POSTMAN way better because it's more advanced and allows you to save your commands as well

photo
photo
1

OK, good idea!


I played around with simulating sunrise and sunset for my fishtank. Unfortunately only with a virtual slider, because I don't want to by a fibaro RGBW-Controller until it's not propper supported by zipato. And the sending of UDP-Commands to my Milight-Controller works also not :-(

Anyway - here is the rule:

29d7fe7001ec40743fba86c25c5ba7e2

The scheduler is set to start the rule every 3 minutes. For real use it needs a little bit fine tuning, but it works as it is.

And yes, it's never reaching 100%, that is ok.


Niels

photo
3

Why not organize this on the Wiki instead? Great idea, but having the rules "drown" in comments in the forum is not so good.

photo
1

I agree, but better so than nothing or nowhere.

photo
photo
3

I have a rule that turns my washer in to a smart device :)


When the machine starts i receive a push message and the RGB light tuns on if the machine is done i receive " washer ready" and the light turns to blue.


0764f0a9fa0d73141489e971f0857bad

photo
1

Nice! I more or less have the same rule. Only I send a HTTP request to pushingbox.com which I linked to pushalot.com so that I receive push notifications on my Windows Phone and Windows 8.1. My next rule will be to check whether or not the dryer was turned on X time after the washing machine finished so that I can get reminders (to avoid smelling clothes).

photo
1

haha nice :)

photo
1

i'm using Pushover

photo
1

Why wait for 600 secs the first time?

photo
photo
1

Sensor: Fibaro Motion Sensor


Actuator: Zipato RGBW Bulb


Purpose of the rule: Set RGBW bulb luminosity to 100% if the motion sensor has detected motion and the luminosity in the room is less than 50 lux, also this rule will only turn on the light if the bulb is completely off. This is so if you entered the room and then you activated an scene, lets say, you dim the light to 50% this rule wont override the luminosity set by the scene.

photo
1

Hi ive tryed this rule, iexperience that if the lights are on i does not turn on the lights, (ive checked this since it turns on 2 lights) but the rule starts and it turns off the lights after the given seconds,

So if you turn on the lights manualy its on until there movement, Then it wil turn off after the time given in the rule.


have a smart solution for that.?

photo
1

Hello Stian,


Sorry for the delayed response. If you have two bulbs that you want to operate I would recommend you to evaluate both devices' intensity on the rule (IF luminosity<50 AND ZipatoBulb1Intensity<1 OR ZipatoBulb2Intensity<1 THEN turn ON the lights)


I wouldn't recommend you to mix manual and automatic switch in the same rule, I use separate rules for that and it works good. Regarding the auto OFF function I also tried to do something that if you manually switch ON the light it will stay ON regardless of motion, the problem I had is that I use Qubino Flush Relays and the INPUT of the switch can be out of sync from the OUTPUT i. e. If the light turns on automatically (OUTPUT ON) and then I press the switch, the OUTPUT will be off but the input will be ON so after several tries I gave up with that and I created a virtual switch called Autolight, that way if i want the light to me manually controlled then I turn this switch OFF and it works as expected. See below.

photo
1

@Albert Macias


My Quad sensor only appears the motion sensor option, how do I use the "Luminance" Would you help me ?

photo
1

@Albert Macias

My Quad sensor only appears the motion sensor option, how do I use the "Luminance" Would you help me ?

photo
1

I have also trio and quad sensors. They are different icons for same device.

6a92df1a5f62f93211c8af7700ac4e37

photo
1

thank you so much

photo
photo
1

Hi Guys. Found this veeeery usefull. I am a newbie to the zipato rules, and I am trying to establish a rule with is set off by double(or triple)pressing on, with a Nexa LWST-605. Any pointers to get me going in the right direction?

photo
1

I´m not sure if this is what you are looking for: I use it as an SOS Counter to send an emergency mail if my mother presses one button of the remote three times. Perhaps useful as a first approach (I´m not quite sure if Increment is part of standard package. If not, you need Pro-Features or you have to rewrite it with a decrement. Increment or decrement is part of pro-features)

Files: sos.PNG
photo
1

Hi Klaus. It did not really do the trick. Are you able to explain your rule, for me to completely understand? How does the rule understand that it is triggered by a push on the button, for example. Appreciate it.

photo
1

Thats easy: Everytime, one of the remotes (which I use to switch on and off some lights) is pressed, the variable "SOSCounter" is increased by one. So it starts with a zero and after the first push it becomes one. Verbinden (join) makes sure that the rule startes again, if it is "retriggered" during the run. So after the first press of a button "SOS Counter" becomes 1 and if the button is pressed again before the time of the "Falls" loop is over (it waits five seconds after the when) this loop starts again. So the next time the variable becomes 2. If I press again during the next run (again five seconds) the variable becomes 3 and the message is being send. If I don´t push a button within those five seconds, the rule comes to an end and resets the variable to zero again. So the message only comes when the button is pressed three times in fast (within five seconds) succesion.


Perhaps you don´t have the pro feature? I thought one of both funcitions (decrement or increment) of a variable is included in the basic package but I might have been wrong. I just looked it up and now I think you need the pro feature for increment / decrement. ;-((


https://www.zipato.com/how-it-works/features

photo
1

Thank you for a thorough explenation, got it to work now. I have pro-feature. Got it working now. Thank you very much for pointing the direction.

photo
photo
1

Hi Klaus. Thanks for responding. I will give it a go and get back to you.

photo
5

here is a rule of a virtual meter I have been using with IFTTT, Alexa and the Maker channel. This may help someone who is looking to use alexa or google assistant but not with the pre configured voice settings. This will require users to say "Alexa/Echo/Computer(new), trigger, ........whatever you want to say......."


Or if you have the Google Home, use Google Assistant. This is actually better and faster and allows you to custom up to 3 different ways of saying a command, and its response. And you dont need "trigger" But you do have to say "hey google"

photo
1

Good Morning!!


I want to make a level system in a water box, using Four Icos Mini Buoys and two switch zipato with two inputs and two outputs is it possible to use in my rule some virtual device shows the percentage status of the box, @apoio zipato would help me get started or any tips

photo
1

Hey Willias, not exactly sure what you are using here? Do you have a link to the product?


How does your mini buoy send its information? What is the reason for the 2 inputs and 2 outputs of the zipato switches? Do they need to be switches independantly?

Draw a diagram maybe and we'll try and help

photo
photo
1

Hi Everyone. Any of you that has tried to make a rule where Zipato needs to "sense" a push and hold of a button/lightswitch?

photo
1

this would depend on whether your zwave module can distinguish hold from push. What module are you using?

photo
photo
1

I have an "Indoor IP Camera Zipato" Some time ago she recorded a short video and sent it to my e-mail, I think it's cool!, but this happened by accident, In the rule that camera is included Its function and when the alarm is violated capture some photos and send them to the email, Instead of the photos he recorded a video i found very interesting. I already asked questions for the "@support zipato"and said that it is not possible If it is not possible, then why did my "Indoor IP Camera Zipato" record and send the video via email! I really want to do this, does anyone know or have ever done anything like it?

photo
1

As far as I know Zipato was having issues with this even with zipatile camera...

photo
1

I'm not talking about the camera my zipatile, I have an equal to the attachment below!

photo
1

I know you don't talk about Zipatile camera. What I meant is that this issue is for every camera connected to zipato, as far as I know video snapshot has never worked properly. I will test with the latest beta and see if it works.

photo
1

Now they even removed the options from the ACTION puzzle and message attachment, before we had the options but it didn't work. At least from Zipatile they even removed the ability of recording videos, only livestream is available. I'm sure they did this for all Zipato cameras.


I really don't like this... they most likely removed these options because of the problems they were having and the fact that never worked. One step backwards Zipato...

photo
1

thank you Alberto Macias !!

I think some bug happened on my camera, the video it was interesting.

photo
1

thank you Alberto Macias


I think some bug happened on my camera, I hope that in the future it will be possible record and send via email.

photo
photo
1

Hi all,


I would like to have a rule to give me the max and min temperature or humidity of a sensor for a period of time. Any of you have something similar?

photo
2

Pablo,


I don't but I dont think it sould be an issue, you probably can create a rule which is activated every time the temperature changes, then store this value in a virtual meter and variable and compare to your previous value. I would probably create two rules, one for maximum another for minimum, you could compare IF new value is greater/smaller than stored value then replace value. Then at the end of the day you can send yourself an email with the values using a scheduler.

photo
1

Great! I will do a trial!

photo
1

Hello again! Just to share, this is what I've done in case it is useful for anyone. It's a rule to send you main notifications regarding weather conditions (in this example temperatures), such us big temperature increases/drops in short time period, and also temperatures above/bellow some limits. Rule is activated/deactivated via Virtual Switch. It is not exactly what I was wanting to do because to send you the max/min temperature values for a period (and doing it nicely), you need the PRO license to include the value of the variable on the message.


I have divided the day in two parts: 0:00 - 12:00 and 12:00 - 0:00 for sending the messages only once (if conditions are happening) on each part of the day. As I don't know the accuracy of the WHEN-SCHEDULE, I have added the TIME-BETWEEN condition for reseting the values for each part of the day.


And this is it:


3b4250f8060628d8c197c71111d9e39a

photo
photo
1

Another approch for sending a message when the washingmachine is finished.

3 minutes aftere the variable wasmachine (=washingmachine) the message will be send.

/98BjqjkmnO1JSsAAAAASUVORK5CYII=

photo
1

I would be inclided to insert a Join command after the When block to stop executing the washing mashine rule in multiple instances. Otherwise nice rule

photo
1

Variable wasmachinelast needs to be updated frequently. That is precisely why i didnt choose for a join command.

Im afraid im losing current_consumtion reports that are >= 45.0.

You think the result will be the same?

photo
1

The difference is that with your rule will execute completely every time the controller registers a current different than 0, so while the machine is running your rule is executing continuosly. If you add the JOIN puzzle in teory the rule get's interrupted if the current value changes before it finishes it's execution, it could be a more efficient approach.

photo
1

I believe it can help reduce the stress on the controller.

photo
1

Hi, I've implemented same function splitting the rule in two. The first one simply trigger when consumption i different from zero and set a variable. The second one is a scheduler that run every minute and count from how many minute the wash is endend. If counter is greater than whatever you want it send and alert.

I sue this same approach for several trigger (i.e. multimedia devices connected to TV) without any issue on the controller.

photo