This object is in archive! 
Check internet connection in the rules creator
Need Answer
Hi, I have similar problem. Some time my 4G modem lose signal. As a result internet connection is down. Only restart helps to restore internet. I have smart switch 6. I want to restart my modem via this device. When this event will occur i just turn off my smart switch and after 10 seconds turn on it. But the main question. How to define internet connection problem in the creator rules.
No connection
Real-time notifications may not work
this can be done on the zipatile but not on the zipabox. How others have bypassed this issue is by creating virtual meters and variables and testing them. David Pritchard has outlined this in a post somewhere
this can be done on the zipatile but not on the zipabox. How others have bypassed this issue is by creating virtual meters and variables and testing them. David Pritchard has outlined this in a post somewhere
Hi Adrian. Thank you very much for you answer. I saw that similar issues solved by virtual devices. But didn't find any manuals or instructions how to work with them. Could you help me with this? Thank you!
Hi Adrian. Thank you very much for you answer. I saw that similar issues solved by virtual devices. But didn't find any manuals or instructions how to work with them. Could you help me with this? Thank you!
Adrian. I found description of virtual sensor and switcher. But I see that for sensor uses cloud link, for change values for it. But if I have trouble with connection, how I can change values? I saw that some people use local ip address instead of domain name but i really don't know how to check internet connection.
Adrian. I found description of virtual sensor and switcher. But I see that for sensor uses cloud link, for change values for it. But if I have trouble with connection, how I can change values? I saw that some people use local ip address instead of domain name but i really don't know how to check internet connection.
I'm afraid this is still not possible on Zipabox, you can add a new type of alarm partition for Battery which also sends notifications about internet problems but there is no way you can use it in rules. I would show you but unfortunatelly I cannot add devices on Zipabox for some reason.
I'm afraid this is still not possible on Zipabox, you can add a new type of alarm partition for Battery which also sends notifications about internet problems but there is no way you can use it in rules. I would show you but unfortunatelly I cannot add devices on Zipabox for some reason.
Alberto thank you for explanation. It's strange that Zipabox has special backup module with usb 3G - stick but it cant processing connection problems.
Alberto thank you for explanation. It's strange that Zipabox has special backup module with usb 3G - stick but it cant processing connection problems.
Hi. I invent rule for checking internet connection. But is have some trouble with this script. I know that virtual devices works only if internet connection is available. In this case use virtual device and variable. I try to change status of virtual sensor if status changed I also change variable. If status of virtual sensor is not changed I also change variable. Than I check if variable means connected than drop status of variable to "not connected". Another case I restart modem via smart switcher. In this script I use additional virtual sensor because i want to see variable value. But I see strange situation. In first part of rule I set virtual sensors in "Active" status. But only one changed. Do Rule creator have limit for update virtual sensor? Why I can't change status of it?
Hi. I invent rule for checking internet connection. But is have some trouble with this script. I know that virtual devices works only if internet connection is available. In this case use virtual device and variable. I try to change status of virtual sensor if status changed I also change variable. If status of virtual sensor is not changed I also change variable. Than I check if variable means connected than drop status of variable to "not connected". Another case I restart modem via smart switcher. In this script I use additional virtual sensor because i want to see variable value. But I see strange situation. In first part of rule I set virtual sensors in "Active" status. But only one changed. Do Rule creator have limit for update virtual sensor? Why I can't change status of it?
Ok. Firstly I dont see a reason to set the two switches to active right after the when block. These are set in the if else puzzles anyway. Try to remove them + insert a Join instead (after the when puzzle and before the 1st if).
Also after the wait puzzle you must use a refresh puzzle as the state needs to be actual not the one before the wait puzzle (otherwise zipato will use the states that was actual at the trigger of the rule (at the time you have set).
Ok. Firstly I dont see a reason to set the two switches to active right after the when block. These are set in the if else puzzles anyway. Try to remove them + insert a Join instead (after the when puzzle and before the 1st if).
Also after the wait puzzle you must use a refresh puzzle as the state needs to be actual not the one before the wait puzzle (otherwise zipato will use the states that was actual at the trigger of the rule (at the time you have set).
Hmmm, looking into the rule it does not make sense to me - without any modification that I have described above, although my modification request still might make this rule a bit strange.
Your rule will always set both switched to active so they will always have the same state when the first if is executed. Are any of these sensors and switches linked to something external that can also change the state?
Hmmm, looking into the rule it does not make sense to me - without any modification that I have described above, although my modification request still might make this rule a bit strange.
Your rule will always set both switched to active so they will always have the same state when the first if is executed. Are any of these sensors and switches linked to something external that can also change the state?
I know that virtual devices works only if internet connection is available. If I haven't connection to the internet in my view virtual devices will have previous state (Inactive). But when rules run, only one virtual device changed status. Also I don't know what is the differers between set state commend of virtual device and sent http request with change state.
I know that virtual devices works only if internet connection is available. If I haven't connection to the internet in my view virtual devices will have previous state (Inactive). But when rules run, only one virtual device changed status. Also I don't know what is the differers between set state commend of virtual device and sent http request with change state.
Well. This is a good one. The rule is executed on the controller but what Im unsure about is the scheduler. Im unsure if the scheduler is executed locally or remotely. See if you have an astro scheduler, it definitely relies on the cloud and will not work if the weather data is not new. Can someone test a scheduler to find out if the scheduler (time based not astro) depends on the internet or not?
I have a time scheduler, and it does not fire when my zipatile is offline (disconnected from wifi) although the rule executes a HTTP command and perhaps this command is not working.
Alberto and Dave Pritchard have more in depth knowledge about the virtual sensors, switches and their state synch upon disconnection.
Well. This is a good one. The rule is executed on the controller but what Im unsure about is the scheduler. Im unsure if the scheduler is executed locally or remotely. See if you have an astro scheduler, it definitely relies on the cloud and will not work if the weather data is not new. Can someone test a scheduler to find out if the scheduler (time based not astro) depends on the internet or not?
I have a time scheduler, and it does not fire when my zipatile is offline (disconnected from wifi) although the rule executes a HTTP command and perhaps this command is not working.
Alberto and Dave Pritchard have more in depth knowledge about the virtual sensors, switches and their state synch upon disconnection.
I test it when I have connection with the Internet. I have scheduler which works with time.
I test it when I have connection with the Internet. I have scheduler which works with time.
Artem,
Do you have only one Zipabox? or you have Zipatile / Zipabox Duo? In theory virtual switches work with or without internet connection (as long as you are connected to the same local network, and from the same controller). If you have two Zipato controllers (even two zipaboxes) you could probably make some sort of "heartbeat" rule, changing states back and forth of two virtual meters on different processors through HTTP requests, to this days HTTP requests need to be done through zipato cloud, so if any of both meters do not change in certain amount of time you know you have lost connection with zipato server.
Also if you only have one processor the you probably do the same through a script in google docs, I have never done that but I know Dave has done a lot of scripts for Phillips Hue and Sones, he would be able to help.
Other option could be doing it through a Raspberry Pi or Arduino in the same network, I'm trying to integrate some interfases with the arduino YUN but that is still on progress.
Artem,
Do you have only one Zipabox? or you have Zipatile / Zipabox Duo? In theory virtual switches work with or without internet connection (as long as you are connected to the same local network, and from the same controller). If you have two Zipato controllers (even two zipaboxes) you could probably make some sort of "heartbeat" rule, changing states back and forth of two virtual meters on different processors through HTTP requests, to this days HTTP requests need to be done through zipato cloud, so if any of both meters do not change in certain amount of time you know you have lost connection with zipato server.
Also if you only have one processor the you probably do the same through a script in google docs, I have never done that but I know Dave has done a lot of scripts for Phillips Hue and Sones, he would be able to help.
Other option could be doing it through a Raspberry Pi or Arduino in the same network, I'm trying to integrate some interfases with the arduino YUN but that is still on progress.
I have only one zipabox and two devices. There are smart switcher 6 and Figaro eye (multi-sensor with temperature sensor). So I try to check internet connectivity via virtual device and variable. I just want drop value value and check value of virtual sensor. If connection is available virtual device will change value of variable and itself and I can check it. It's simple rule but i see that it's not working like in common program languages. I will try to debug rules for understanding how it works.
I have only one zipabox and two devices. There are smart switcher 6 and Figaro eye (multi-sensor with temperature sensor). So I try to check internet connectivity via virtual device and variable. I just want drop value value and check value of virtual sensor. If connection is available virtual device will change value of variable and itself and I can check it. It's simple rule but i see that it's not working like in common program languages. I will try to debug rules for understanding how it works.
Hi, Thank you all for advices. I found the solution. In attachment you can find my rule. I use virtual sensor and variable for checking internet connection. Also I add counter for excluding random restart of my modem. I use 1 minute scheduler and check variable. If i see that last 5 minutes virtual sensor is not updated that means internet connection is absent. Also I think this rule can bee used if you need to send some command to the modem / controller which helps to restart internet connection. But in my case I use smart switcher 6. This issue can be closed.
Hi, Thank you all for advices. I found the solution. In attachment you can find my rule. I use virtual sensor and variable for checking internet connection. Also I add counter for excluding random restart of my modem. I use 1 minute scheduler and check variable. If i see that last 5 minutes virtual sensor is not updated that means internet connection is absent. Also I think this rule can bee used if you need to send some command to the modem / controller which helps to restart internet connection. But in my case I use smart switcher 6. This issue can be closed.
Hi Artem. Two questions:
1. have yu tested the rule (by unplugging the internet cable) and it works fine?
2. Can you show us what message you send in the two message puzzles? Are these message puzzles related to the wirtual switch? Do they switch on or off or one on and the second message off?
Hi Artem. Two questions:
1. have yu tested the rule (by unplugging the internet cable) and it works fine?
2. Can you show us what message you send in the two message puzzles? Are these message puzzles related to the wirtual switch? Do they switch on or off or one on and the second message off?
1) Yes, it works fine. If the internet cable is unplugged during 5 min I get restart.
2)It' just change state in On stage or Off. In first http block I set it in On position by https://my.zipato.com/zipato-web/remoting/attribute/set?serial=011C55200D0186C5&apiKey=710fbc79-b49f-44b6-9fde-de9a0bddcd8f&ep=1b66ae0d-6a5e-4136-8a9e-64d9dc7f16c5&state=1
And the second one https://my.zipato.com/zipato-web/remoting/attribute/set?serial=011C55200D0186C5&apiKey=710fbc79-b49f-44b6-9fde-de9a0bddcd8f&ep=1b66ae0d-6a5e-4136-8a9e-64d9dc7f16c5&state=0
1) Yes, it works fine. If the internet cable is unplugged during 5 min I get restart.
2)It' just change state in On stage or Off. In first http block I set it in On position by https://my.zipato.com/zipato-web/remoting/attribute/set?serial=011C55200D0186C5&apiKey=710fbc79-b49f-44b6-9fde-de9a0bddcd8f&ep=1b66ae0d-6a5e-4136-8a9e-64d9dc7f16c5&state=1
And the second one https://my.zipato.com/zipato-web/remoting/attribute/set?serial=011C55200D0186C5&apiKey=710fbc79-b49f-44b6-9fde-de9a0bddcd8f&ep=1b66ae0d-6a5e-4136-8a9e-64d9dc7f16c5&state=0
Also I found not standard behaviour( for standard program languages) of checking virtual sensor state, If we have connection with the internet we can use control block (if else) for checking virtual sensor state. But if we don't have connection with the Internet that means all control blocks will not work. I understood that when try to check if virtual sensor has inactive state when internet cable is unplugged
unplugged.
Also I found not standard behaviour( for standard program languages) of checking virtual sensor state, If we have connection with the internet we can use control block (if else) for checking virtual sensor state. But if we don't have connection with the Internet that means all control blocks will not work. I understood that when try to check if virtual sensor has inactive state when internet cable is unplugged
unplugged.
Hi Artem, great job. This confirms also another question that the time based scheduler works also when there is no internet connection. Im going to create the rule now.
Hi Artem, great job. This confirms also another question that the time based scheduler works also when there is no internet connection. Im going to create the rule now.
Rule created. I now need to add a power plug to my router so it can be switched on/off. I think I love this rule. Great work Artem.
Rule created. I now need to add a power plug to my router so it can be switched on/off. I think I love this rule. Great work Artem.
Thank you. If you select scheduler based on virtual devices you must be sure that you have internet connection at first. Although if you have connection to the internet it's not guarantee that virtual device will change value successfully. In my rule i see that sometimes state is not changed in this case i have to use increment block for variable. I recommended do not use virtual devices for critical for you blocks because it works not so stable.
Thank you. If you select scheduler based on virtual devices you must be sure that you have internet connection at first. Although if you have connection to the internet it's not guarantee that virtual device will change value successfully. In my rule i see that sometimes state is not changed in this case i have to use increment block for variable. I recommended do not use virtual devices for critical for you blocks because it works not so stable.
Yes, I agree. Nothing is 100% reliable therefore I understand the requirement of using increments.
Yes, I agree. Nothing is 100% reliable therefore I understand the requirement of using increments.
We should have the chance to use a PING command, this could be much more flexible and reliable, please Zipato !
We should have the chance to use a PING command, this could be much more flexible and reliable, please Zipato !
Maybe with the IFTT service, there's probably a way to check if your internet connection is working. I imagine an HTML link sent each 5 minutes to Zipabox, if there's an answer from a rule created in that way, then the connection is OK. It's just an idea.
Maybe with the IFTT service, there's probably a way to check if your internet connection is working. I imagine an HTML link sent each 5 minutes to Zipabox, if there's an answer from a rule created in that way, then the connection is OK. It's just an idea.
Replies have been locked on this page!