Skip to content

Instantly share code, notes, and snippets.

@ikidd
Created February 20, 2021 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikidd/c9da7a9851ebcee5b598d6a210d79cc5 to your computer and use it in GitHub Desktop.
Save ikidd/c9da7a9851ebcee5b598d6a210d79cc5 to your computer and use it in GitHub Desktop.
NR flow for turning on a wifi plug if item waiting in CUPS queue
[{"id":"6ce5d159.126d78","type":"inject","z":"1c85885c.80412","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":60,"wires":[["6a9e0ede.6f203"]]},{"id":"f7a8e74b.708128","type":"html","z":"1c85885c.80412","name":"","property":"payload","outproperty":"payload","tag":".list > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1)","ret":"html","as":"single","x":320,"y":120,"wires":[["84fd8aa5.c726a"]]},{"id":"6a9e0ede.6f203","type":"http request","z":"1c85885c.80412","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://10.10.251.161:631/jobs?","tls":"","persist":false,"proxy":"","authType":"","x":340,"y":60,"wires":[["f7a8e74b.708128"]]},{"id":"84fd8aa5.c726a","type":"split","z":"1c85885c.80412","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":100,"y":200,"wires":[["71725e4e.ef59d"]]},{"id":"71725e4e.ef59d","type":"switch","z":"1c85885c.80412","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"LaserJet4000","vt":"str"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":250,"y":200,"wires":[["75e076dd.b35ba"],[]]},{"id":"f69947e2.343c78","type":"Tasmota Switch","z":"1c85885c.80412","d":true,"broker":"8a21176b.0c86b8","device":"tasmota_A47F1E","name":"","outputs":1,"uidisabler":false,"fullTopic":"","cmndPrefix":"","statPrefix":"","telePrefix":"","x":630,"y":200,"wires":[[]]},{"id":"75e076dd.b35ba","type":"trigger","z":"1c85885c.80412","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"2","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":430,"y":200,"wires":[["f69947e2.343c78"]]},{"id":"8a21176b.0c86b8","type":"mqtt-broker","name":"","broker":"10.10.251.8","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment