themlruts Posted December 1, 2014 Posted December 1, 2014 I'm trying to send a text message only when this program bellow is executed and the door sensor is on. (closed) There are 2 programs the first program is just setup for geo fecne and then it calls the 2nd program bellow. If Status 'Ashley_Garage_Door-Sensor' is Off Then Set 'Ashley_Garage_Door-Relay' On Wait 1 second Set 'Ashley_Garage_Door-Relay' Off Else - No Actions - (To add one, press 'Action') I only want to trigger the text when the door is truly closed. I just don't understand how I can loop and continue to query the sensor until closed. Complete noob here Thanks Mike
MikeD Posted December 1, 2014 Posted December 1, 2014 (edited) Hi Mike, This will send a text when your garage door closes. If Control 'Ashley_Garage_Door-Sensor' is switched On Then Send Notification to 'Text' content 'GarageClosed' Else - No Actions - (To add one, press 'Action') ~Mike Edited December 1, 2014 by MikeD
oberkc Posted December 1, 2014 Posted December 1, 2014 The program suggested by themlruts is how I would do it. " I just don't understand how I can loop and continue to query the sensor until closed." Why do you believe there is any need to loop anything. When the sensor changes, it will tell the ISY. I also don't understand you purpose in the one second cycle of your relay. Is the relay connected to anything?
themlruts Posted December 1, 2014 Author Posted December 1, 2014 Hi Mike, This will send a text when your garage door closes. If Control 'Ashley_Garage_Door-Sensor' is switched On Then Send Notification to 'Text' content 'GarageClosed' Else - No Actions - (To add one, press 'Action') ~Mike Thanks Mike The program suggested by themlruts is how I would do it. " I just don't understand how I can loop and continue to query the sensor until closed." Why do you believe there is any need to loop anything. When the sensor changes, it will tell the ISY. I also don't understand you purpose in the one second cycle of your relay. Is the relay connected to anything? I was thinking about looping to check the sensor status. Then once the sensor status changed it would send the text. The relay is hooked to the garage door opener. Thanks Mike
oberkc Posted December 1, 2014 Posted December 1, 2014 First problem...you are not checking the sensor status....you are turning the relay on, then off. Second problem...relays will not transmit status. Third problem...there is no need to query any insteon device for status. Most insteon devices transmit any change in status. If the sensor were to change state, it would transmit this change. Any other insteon device that cares, including the ISY, would know of this change and react accordingly. Correction to my original post...it is miked's approach that I like. Sorry.
themlruts Posted December 1, 2014 Author Posted December 1, 2014 First problem...you are not checking the sensor status....you are turning the relay on, then off. Second problem...relays will not transmit status. Third problem...there is no need to query any insteon device for status. Most insteon devices transmit any change in status. If the sensor were to change state, it would transmit this change. Any other insteon device that cares, including the ISY, would know of this change and react accordingly. Correction to my original post...it is miked's approach that I like. Sorry. Oberkc, Thanks for the reply. I must of phrased my words wrong. I know I cant check the status of the relay. That code I posted is called when my Cell phone is out of the Geo fenced area so it would close the door. I was wondering what code I need to add to that to send a text when the door was fully closed. Thanks Mike
oberkc Posted December 1, 2014 Posted December 1, 2014 (edited) Oberkc, Thanks for the reply. I must of phrased my words wrong. I know I cant check the status of the relay. That code I posted is called when my Cell phone is out of the Geo fenced area so it would close the door. I was wondering what code I need to add to that to send a text when the door was fully closed. Thanks Mike Aha! Now I see. I think I would simply avoid any looping or waiting, and add a second program like miked suggested. A couple of other thoughts....what if the door was already closed when you leave the geofenced area? Are you not concerned that this will open the door? Have you considered configuring your relay into momentary mode and relying on this (rather than a program wait statement) to pulse your relay? Edited December 1, 2014 by oberkc
themlruts Posted December 1, 2014 Author Posted December 1, 2014 Aha! Now I see. I think I would simply avoid any looping or waiting, and add a second program like miked suggested. A couple of other thoughts....what if the door was already closed when you leave the geofenced area? Are you not concerned that this will open the door? Have you considered configuring your relay into momentary mode and relying on this (rather than a program wait statement) to pulse your relay? It should only trigger the relay if the door is open. At least that's my understanding in the IF statement.(Status 'Ashley_Garage_Door-Sensor' is Off)... That makes a lot more sense. I will have to look into that. I just need to change those options on the device correct?
Xathros Posted December 1, 2014 Posted December 1, 2014 (edited) If this program is DISABLED and only called by your Geofence program then you should be OK. Otherwise, if this is enabled, I suspect you may have trouble opening your garage door as this will want to close the door as soon as it opens. -Xathros Edited December 1, 2014 by Xathros
themlruts Posted December 1, 2014 Author Posted December 1, 2014 If this program is DISABLED and only called by your Geofence program then you should be OK. Otherwise, if this is enabled, I suspect you may have trouble opening your garage door as this will want to close the door as soon as it opens. -Xathros Xathros, I should have noted that it is disabled Thanks Mike
Recommended Posts