Not using websocket - Prefer to generate my errors through infinite loops, mixing up storage contexts, spamming the maker API and bad configurations thankyouverymuch!!!!
I do that fairly regularly. lol
You have to look at the websocket checkbox on the advance tab to be sure.
I was mostly being a smart arse anyway. I think you got the extra websocket item from importing another flow that already had it - not necessarily anything you setup.
Per @JasonJoel I switched and was able to create more VERY dangerous projects that I'll share once my equipment arrives. Also fixed a lot of my issues as there is more information carried into node red. I'm happy I swapped it.
Yes! - be afraid - be very afraid.
I'm very curious @april.brandt
is there a less clunkier way of doing this set of rules?
I want the outside light to come on and dusk at 1% and go off at dawn, however I have a motion sensor outside, that I want to use to increase the outside light to 100% once it's been triggered, but only if the light is on (so after dusk) then go down to 1% when motion becomes inactive.
You can eliminate the first sequence if you use a time range node in the second.
Does that recognise dusk and dawn? I can't seem to get it to @aaiyar ...I can default to sunset/sunrise if not
I don't use dusk, so I don't know. But it definitely recognizes dawn.
Edit: there is also
Which also uses suncalc (and should recognize dusk and dawn)
This is how I did mine. The table turns on one hour before sunset and off one hour after. If the living rooms lights turn on, then the light dims to 25% and up to 100 when the light shuts off. Also when harmony turns on it dims and stays dim. Also the second flow turns on the lights outside of that window if illuminance is low. For really cloudy days.
[{"id":"f3b1f475.fe6138","type":"switch","z":"fae721c1.29dbb","name":"Mode is Night","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"Night","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":980,"y":2080,"wires":[["7cc0abe1.bb0bb4"]]},{"id":"c8075737.380c88","type":"switch","z":"fae721c1.29dbb","name":"Mode is Away Home Quiet (1output)","property":"payload.value","propertyType":"msg","rules":[{"t":"regex","v":"Away|Home|Quiet","vt":"str","case":true}],"checkall":"true","repair":false,"outputs":1,"x":1050,"y":2140,"wires":[["7d0c6ea5.06cee"]]},{"id":"91fd1acb.644dd8","type":"switch","z":"fae721c1.29dbb","name":"on(1) or off(0)","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":2100,"wires":[["d4717d56.4f20f"],["39d33965.2c56c6"]]},{"id":"6fc5481e.6a0e08","type":"switch","z":"fae721c1.29dbb","name":"Lu","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"lte","v":"10","vt":"num"},{"t":"gte","v":"20","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":395,"y":2220,"wires":[["5d344cf6.f3c7e4"],["4bfb8917.39ca18"]],"l":false},{"id":"98791514.aac0b8","type":"switch","z":"fae721c1.29dbb","name":"Lu","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"gte","v":"25","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1655,"y":2160,"wires":[["5c0fd4bb.b8c47c"]],"l":false},{"id":"d4717d56.4f20f","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table On","server":"6b5d6374.da729c","deviceId":"1495","command":"on","commandArgs":"","x":660,"y":2080,"wires":[[]]},{"id":"39d33965.2c56c6","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table OFF","server":"6b5d6374.da729c","deviceId":"1495","command":"off","commandArgs":"","x":660,"y":2120,"wires":[[]]},{"id":"7cc0abe1.bb0bb4","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table Off","server":"6b5d6374.da729c","deviceId":"1495","command":"off","commandArgs":"","x":1170,"y":2080,"wires":[[]]},{"id":"2e8b19ba.c9a8b6","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table On","server":"6b5d6374.da729c","deviceId":"1495","command":"on","commandArgs":"","x":1580,"y":2120,"wires":[[]]},{"id":"5c0fd4bb.b8c47c","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table Off","server":"6b5d6374.da729c","deviceId":"1495","command":"off","commandArgs":"","x":1790,"y":2160,"wires":[[]]},{"id":"9d8d477d.2cbcc8","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table On","server":"6b5d6374.da729c","deviceId":"1495","command":"on","commandArgs":"","x":880,"y":2200,"wires":[[]]},{"id":"10a5860d.c3ebaa","type":"hubitat command","z":"fae721c1.29dbb","name":"Entry Way Table Off","server":"6b5d6374.da729c","deviceId":"1495","command":"off","commandArgs":"","x":870,"y":2260,"wires":[[]]},{"id":"7d9dc8d4.be4808","type":"hubitat device","z":"fae721c1.29dbb","name":"Illuminance","server":"6b5d6374.da729c","deviceId":"2580","attribute":"illuminance","sendEvent":true,"x":290,"y":2220,"wires":[["6fc5481e.6a0e08"]]},{"id":"bb9166bd.3001e8","type":"hubitat device","z":"fae721c1.29dbb","name":"Illuminance","server":"6b5d6374.da729c","deviceId":"2580","attribute":"illuminance","sendEvent":false,"x":1550,"y":2160,"wires":[["98791514.aac0b8"]]},{"id":"b58832b0.9e788","type":"hubitat mode","z":"fae721c1.29dbb","name":"Mode","server":"6b5d6374.da729c","sendEvent":true,"x":830,"y":2080,"wires":[["f3b1f475.fe6138"]]},{"id":"1c68d1e.6d6382e","type":"hubitat mode","z":"fae721c1.29dbb","name":"Mode","server":"6b5d6374.da729c","sendEvent":true,"x":830,"y":2140,"wires":[["c8075737.380c88"]]},{"id":"31ac80a5.60b6a","type":"bigtimer","z":"fae721c1.29dbb","outtopic":"","outpayload1":"","outpayload2":"","name":"Sunset-60 (on) / Sunrise+60 (off)","comment":"","lat":"43.4561268","lon":"-96.4379696","starttime":"5004","endtime":"5003","starttime2":0,"endtime2":0,"startoff":"-60","endoff":"60","startoff2":0,"endoff2":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":180,"y":2100,"wires":[[],["91fd1acb.644dd8"],[]]},{"id":"7d0c6ea5.06cee","type":"time-range-switch","z":"fae721c1.29dbb","name":"sunset to sunrise = output 1","lat":"43.4561268","lon":"-96.4379696","startTime":"sunset","endTime":"sunrise","startOffset":"-59","endOffset":"+59","x":1340,"y":2140,"wires":[["2e8b19ba.c9a8b6"],["bb9166bd.3001e8"]]},{"id":"5d344cf6.f3c7e4","type":"time-range-switch","z":"fae721c1.29dbb","name":"sunrise to sunset = output 1","lat":"43.4561268","lon":"-96.4379696","startTime":"sunrise","endTime":"sunset","startOffset":"+60","endOffset":"-60","x":640,"y":2200,"wires":[["9d8d477d.2cbcc8"],[]]},{"id":"4bfb8917.39ca18","type":"time-range-switch","z":"fae721c1.29dbb","name":"sunrise to sunset = output 1","lat":"43.4561268","lon":"-96.4379696","startTime":"sunrise","endTime":"sunset","startOffset":"+61","endOffset":"-61","x":640,"y":2260,"wires":[["10a5860d.c3ebaa"],[]]},{"id":"6b5d6374.da729c","type":"hubitat config","z":"","name":"Hubitat","usetls":false,"host":"192.168.86.32","port":"80","appId":"3451","nodeRedServer":"http://192.168.86.49:1880","webhookPath":"/hubitat/webhook_","autoRefresh":true,"useWebsocket":false}]
for some reason I get 'ws error' under each of my devices when setting it to something other than a time...I don't know if that's normal
time-range-switch recognizes dusk and dawn
I use webhook, so I've never encountered that. I did try using websocket when it became first available, but felt the hassle of doing de-dups wasn't worth the marginal increase in speed.
I think webhook is more true and tested at this point of time and would recommend its use.
that fixed it....
The top part of my flow does exactly what you're looking for if you import it and change the devices to your own and the hub to your own, but I also use webhook.
I'm confused about what you said, I can see the activation on sunset and sunrise, but I can't see where your flow increases brightness when motion is active etc..
I've ended up with this, but I'm not sure if it'll work correctly - I also can't see defined start/end time like you have in your time range switch
fair warning @april.brandt, I've been stalking your Node-Red comments and I have started tinkering with my Node-Red setup.. I might be hitting you up before long HAHAHA.. Hope you all are doing ok!!
Op shoot! Busted. that flow is on and off - stand by, I'll get you the right flow and post is here.
The one I should share with you is way too complicated. I'll create one and share it in just a minute or so.
I don't know that it's better, but I can't wrap my head around condensing the time range to a single
[{"id":"d7526313.23dbf","type":"hubitat device","z":"d19a2683.b31678","name":"Living Room Motion","server":"6b5d6374.da729c","deviceId":"1620","attribute":"motion","sendEvent":true,"x":230,"y":500,"wires":[["1375faed.365745"]]},{"id":"1375faed.365745","type":"switch","z":"d19a2683.b31678","name":"Active/inactive","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"active","vt":"str"},{"t":"eq","v":"inactive","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":460,"y":500,"wires":[["fb815e85.16ea2"],["b36b5b33.f04048"]]},{"id":"fb815e85.16ea2","type":"time-range-switch","z":"d19a2683.b31678","name":"sunset to sunrise = output 1","lat":"43.4561268","lon":"-96.4379696","startTime":"sunset","endTime":"sunrise","startOffset":"-59","endOffset":"+59","x":720,"y":480,"wires":[["d47553ba.7f8f"],[]]},{"id":"a7bfc783.8a9448","type":"switch","z":"d19a2683.b31678","name":"light","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1075,"y":480,"wires":[["1a51c9ef.df3e66"]],"l":false},{"id":"d47553ba.7f8f","type":"hubitat device","z":"d19a2683.b31678","name":"light","server":"6b5d6374.da729c","deviceId":"201","attribute":"switch","sendEvent":false,"x":950,"y":480,"wires":[["a7bfc783.8a9448"]]},{"id":"2f6039d1.bcaec6","type":"switch","z":"d19a2683.b31678","name":"light","property":"payload.currentValue","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1075,"y":520,"wires":[["1730452e.3ac71b"]],"l":false},{"id":"4523c31f.6d943c","type":"hubitat device","z":"d19a2683.b31678","name":"light","server":"6b5d6374.da729c","deviceId":"201","attribute":"switch","sendEvent":false,"x":950,"y":520,"wires":[["2f6039d1.bcaec6"]]},{"id":"b36b5b33.f04048","type":"time-range-switch","z":"d19a2683.b31678","name":"sunset to sunrise = output 1","lat":"43.4561268","lon":"-96.4379696","startTime":"sunset","endTime":"sunrise","startOffset":"-59","endOffset":"+59","x":720,"y":520,"wires":[["4523c31f.6d943c"],[]]},{"id":"1a51c9ef.df3e66","type":"hubitat command","z":"d19a2683.b31678","name":"Entry Way Table 100","server":"6b5d6374.da729c","deviceId":"1495","command":"setLevel","commandArgs":"100","x":1220,"y":480,"wires":[[]]},{"id":"1730452e.3ac71b","type":"hubitat command","z":"d19a2683.b31678","name":"Entry Way Table 10","server":"6b5d6374.da729c","deviceId":"1495","command":"setLevel","commandArgs":"10","x":1210,"y":520,"wires":[[]]},{"id":"6b5d6374.da729c","type":"hubitat config","z":"","name":"Hubitat","usetls":false,"host":"192.168.86.32","port":"80","appId":"3451","nodeRedServer":"http://192.168.86.49:1880","webhookPath":"/hubitat/webhook_","autoRefresh":true,"useWebsocket":false}]