Anchor Drop Remote control #38
gregsyoung
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Remote Control - For Anchor Plugin
I anchor the boat whilst at the bow (usually single handed) - hence not near an MFD to record the anchor drop position.
Using a simple inexpensive 2ch handheld remote - that has twin relay outputs that connect to two input pins on RPI.
The relays pull each RPI input PIN to GND when activated.
One button on remote & corresponding relay output is for "Drop Anchor" and (after short delay) SetRadius to 50m" .. this gives an initial alarm radius and prevents the alarm from triggering whilst setting and backing down on anchor.
The other button is for "raising anchor".
If the anchor doesnt set on first attempt, you can either again press "drop anchor"button and it will update the anchor alarm plugin.
or "Raise Anchor"" and try again!
Notes
[{"id":"8ea8e700b12e068b","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"c643ab72feb5525d","type":"http request","z":"8ea8e700b12e068b","name":"Post "Drop anchor"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://localhost/plugins/anchoralarm/dropAnchor","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":650,"y":80,"wires":[["6375865771f1a785"]]},{"id":"5c9b8f5d6b8c741a","type":"inject","z":"8ea8e700b12e068b","name":"manual test drop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":120,"y":80,"wires":[["4d4caf1f60a1dcb9"]]},{"id":"6375865771f1a785","type":"debug","z":"8ea8e700b12e068b","name":"debug 11","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":840,"y":60,"wires":[]},{"id":"02f8e767f45190d8","type":"rpi-gpio in","z":"8ea8e700b12e068b","name":"Pin 38 (low) to Drop anchor","pin":"20","intype":"up","debounce":"25","read":true,"bcm":true,"x":130,"y":160,"wires":[["4d4caf1f60a1dcb9"]]},{"id":"4d4caf1f60a1dcb9","type":"switch","z":"8ea8e700b12e068b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":310,"y":80,"wires":[["b50e47d8dea0abca","c643ab72feb5525d"]]},{"id":"b339368c8af63040","type":"debug","z":"8ea8e700b12e068b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":160,"wires":[]},{"id":"6405208283e5dcf3","type":"http request","z":"8ea8e700b12e068b","name":"Post set radius to 50m","method":"use","ret":"txt","paytoqs":"ignore","url":"http://localhost/plugins/anchoralarm/setRadius","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":720,"y":140,"wires":[["b339368c8af63040"]]},{"id":"44bd8de9824d5290","type":"function","z":"8ea8e700b12e068b","name":"Set Radius initially to 50m","func":"msg.method = "POST"\nmsg.url = "http://localhost/plugins/anchoralarm/setRadius"\nmsg.headers = {}\nmsg.headers["content-type"] = "application/json"\nmsg.headers["Authorization"] = "Bearer " + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InJwaSIsImlhdCI6MTY3NjAxMDA1NywiZXhwIjoyMzA3MTYyMDU3fQ.DTKMXAczvyVOmzDxTkipQSgqjVH9NjpkeDgvD7NeQBg";\nmsg.payload = {"radius": 50}\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":180,"wires":[["6405208283e5dcf3"]]},{"id":"b50e47d8dea0abca","type":"delay","z":"8ea8e700b12e068b","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":420,"y":120,"wires":[["44bd8de9824d5290"]]},{"id":"3e5bcbaf9db31836","type":"http request","z":"8ea8e700b12e068b","name":"Post "Raise Anchor"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://localhost/plugins/anchoralarm/raiseAnchor","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":700,"y":200,"wires":[["2dcbad8f89cf76ee"]]},{"id":"3b180f6cfd316c3c","type":"inject","z":"8ea8e700b12e068b","name":"manual test raise","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":320,"wires":[["3e5bcbaf9db31836"]]},{"id":"2dcbad8f89cf76ee","type":"debug","z":"8ea8e700b12e068b","name":"debug 12","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":900,"y":240,"wires":[]},{"id":"fa2c44d73635a7ba","type":"rpi-gpio in","z":"8ea8e700b12e068b","name":"Pin 36 (low) to raise anchor","pin":"16","intype":"up","debounce":"25","read":true,"bcm":true,"x":130,"y":260,"wires":[["3e5bcbaf9db31836"]]}]
Beta Was this translation helpful? Give feedback.
All reactions