It's fine - I don't think that is your issue but could you screen shot the properties page of that node?
Here is mine:
It's fine - I don't think that is your issue but could you screen shot the properties page of that node?
Here is mine:
The time range was something I installed because I dont see a stock time range to use. Where would it be or what is it called?
Here is the properties page for the time range node as requested, but I would rather just use the stock one for now if I could find it lol.
I use a sequence very similar to that posted by @erktrek, with the garage door being controlled by the status of a presence sensor in my car. I do use the time range node to that the door can be raised only between certain hours.
Also, I check the door status before either raising it (upon arrival) or lowering it (upon departure).
I goofed on the switch node - it should be "present/not present" for the msg.payload.value comparison!!!!
i dont know where this time range default node is.
would you be willing to share that flow? im having a hard time of it. I am used to SmartThings/WebCoRE but think NodeRED by be better for hubitat. WebCoRE is seeing the changes for present/not present on the firsty try for some reason.
Mine is part of the "node-red-contrib-sun-position" nodes.. handy for sun position calcs etc..
There isn't one. You are using the one that I use. Just make sure you enter your latitude and longitude to configure that node.
oh ok. The property page for yours look different. Thanks for clearing that up.
No problem. Here you go:
[{"id":"9e8492cf.83872","type":"hubitat device","z":"afda3b03.8d448","name":"Ashok's Car Presence","server":"a22e0ea9.276dc8","deviceId":"1831","attribute":"presence","sendEvent":true,"x":190,"y":1820,"wires":[["c192cfee.34db68"]]},{"id":"c192cfee.34db68","type":"switch","z":"afda3b03.8d448","name":"present/not present","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"present","vt":"str"},{"t":"eq","v":"not present","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":1820,"wires":[["a97d8eb.363fa7"],["a7e28a4e.54c43"]]},{"id":"a97d8eb.363fa7","type":"delay","z":"afda3b03.8d448","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":595,"y":1780,"wires":[["ebd0a748.7b5068"]],"l":false},{"id":"a7e28a4e.54c43","type":"hubitat device","z":"afda3b03.8d448","name":"Contact - Garage Door","server":"662851c4.3ccad","deviceId":"4557","attribute":"contact","sendEvent":false,"x":690,"y":1860,"wires":[["15eed554.2d2c7b"]]},{"id":"ebd0a748.7b5068","type":"switch","z":"afda3b03.8d448","name":"just_arrived = t","property":"just_arrived","propertyType":"global","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":720,"y":1780,"wires":[["f96f480.efb8cb8"]]},{"id":"15eed554.2d2c7b","type":"switch","z":"afda3b03.8d448","name":"open","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"open","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":890,"y":1860,"wires":[["50a021d6.db4df8"]]},{"id":"f96f480.efb8cb8","type":"time-range-switch","z":"afda3b03.8d448","name":"Dawn-9PM","lat":"29.977091","lon":"-90.143000","startTime":"sunrise","endTime":"21:00","startOffset":0,"endOffset":0,"x":910,"y":1780,"wires":[["fd722222.093e4"],[]]},{"id":"50a021d6.db4df8","type":"hubitat command","z":"afda3b03.8d448","name":"Garage Door Down ON","server":"662851c4.3ccad","deviceId":"226","command":"on","commandArgs":"","x":1090,"y":1860,"wires":[[]]},{"id":"fd722222.093e4","type":"hubitat device","z":"afda3b03.8d448","name":"Contact - Garage Door","server":"662851c4.3ccad","deviceId":"4557","attribute":"contact","sendEvent":false,"x":1190,"y":1780,"wires":[["5cba2204.3ec434"]]},{"id":"5cba2204.3ec434","type":"switch","z":"afda3b03.8d448","name":"closed","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"closed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1400,"y":1780,"wires":[["ecea6f9f.fb7548"]]},{"id":"ecea6f9f.fb7548","type":"hubitat command","z":"afda3b03.8d448","name":"Garage Door Up ON","server":"662851c4.3ccad","deviceId":"225","command":"on","commandArgs":"","x":1600,"y":1780,"wires":[[]]},{"id":"a22e0ea9.276dc8","type":"hubitat config","name":"HubitatM","usetls":false,"host":"192.168.1.46","port":"80","appId":"1522","nodeRedServer":"http://192.168.1.4:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false,"colorEnabled":true,"color":"#5dd049"},{"id":"662851c4.3ccad","type":"hubitat config","name":"HubitatS","usetls":false,"host":"192.168.1.36","port":"80","appId":"4489","nodeRedServer":"http://192.168.1.4:1880","webhookPath":"/hubitat/webhook2","autoRefresh":true,"useWebsocket":false,"colorEnabled":true,"color":"#51b8f0"}]
You also need to use the HE Device node NOT the command node for your HE presence device.
you two are great! thank you for the help. Its a lot to get used to
that was changed per your suggestion earlier. thank you for that
Happy to help!!! Been there and done that - I used WebCoRE a lot too.. love the interface was very logical. However I find Node-RED much better at scaling and the visual flow aspect is very logical/intuitive too but certainly different paradigm..
@aaiyar Why is this delay here? I usually put a delay on away (btween 30-60 seconds typically) in case the presence drops for whatever reason to keep a false away and subsequence false arrival from happening. Not sure if this is something specific to your system at your house?
Good question.
Here's the explanation. I want my car's presence sensor to raise the garage door only if my car's presence is detected within 5 minutes of my phone entering a specified geofence around my house.
Because there's a possibility that my car's presence sensor will be detected before my phone is detected as entering the geofence, I put a 2 second delay there. That is long enough for my phone to be detected and it sets the global variable just_arrived to be true.
I understand. I am working to be rid of geofences so I am going to try using it without that delay as my setup does not use geofencing at all currently. It also doesnt work right yet either
You also don't need that switch node with the global variable (just_arrived).
I took that out as well. I have a working prototype now! I still need to add in my wifes beacon and pushover to get messages and warnings if the door opens when it shouldn't. That will be no fun to try to figure out.
Here is what I changed yours too. Looks pretty much the same right? lol