OpenMarine
Soft buttons (on web page) - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Feature Requests (https://forum.openmarine.net/forumdisplay.php?fid=5)
+--- Thread: Soft buttons (on web page) (/showthread.php?tid=354)



Soft buttons (on web page) - Saqqara - 2017-02-10

This is one we've discussed on other forums, but I figured I'd repeat it here.

The ability to trigger actions by buttons begs for a web page that can be accessed by a smartphone or browser anywhere on board or around the world.

I see this recipe I may tinker with if I get time:
http://mattrichardson.com/Raspberry-Pi-Flask/

and there is an iOS app or two that can control GPIO. It looks easy to implement. Of course a proprietary solution doesn't befit openplotter.

http://ioslinks.com/mypi/help.html

Greg


RE: Soft buttons (on web page) - gniersma - 2017-02-16

Greg,

With node-red and node-red dashboard it is very easy to make your own webpage on the openplotter machine including soft buttons.
This is open source software.

see this posting: http://forum.openmarine.net/showthread.php?tid=219

G.


RE: Soft buttons (on web page) - Saqqara - 2017-02-17

Wow... that's excellent. I was thinking of it as output only and I hadn't had a chance to dig into it.

So yesterday I installed it on my office PC and found a pretense to use it for a work related dashboard. Very cool. 

Yes, this is the way forward, for so many things!


RE: Soft buttons (on web page) - PaddyB - 2017-03-09

(2017-02-17, 02:28 PM)Saqqara Wrote: Wow... that's excellent. I was thinking of it as output only and I hadn't had a chance to dig into it.

So yesterday I installed it on my office PC and found a pretense to use it for a work related dashboard. Very cool. 

Yes, this is the way forward, for so many things!

This is a flow I use to shutdown, it closes opencpn hopefully saving any routes/tracks first then shuts down the Pi..

Hope this might be of use:


Code:
[{"id":"aebc54b0.f35f08","type":"inject","z":"a1ba0b6c.b93d98","name":"shutdown!","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":136.00003051757812,"y":1272,"wires":[["deaaaa5f.9d7048"]]},{"id":"deaaaa5f.9d7048","type":"exec","z":"a1ba0b6c.b93d98","command":"killall -s TERM opencpn ","addpay":false,"append":"","useSpawn":"","timer":"","name":"Shutdown Opencpn","x":347.0000305175781,"y":1306.9999694824219,"wires":[[],["2f9c2c03.3c0024"],[]]},{"id":"2f9c2c03.3c0024","type":"delay","z":"a1ba0b6c.b93d98","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":501.0000305175781,"y":1267,"wires":[["68d1ee59.5575"]]},{"id":"b96ce45d.65ae48","type":"ui_button","z":"a1ba0b6c.b93d98","name":"shutdown","group":"8861c889.240108","order":8,"width":0,"height":0,"label":"Shutdown!","color":"red","icon":"","payload":"","payloadType":"date","topic":"","x":147.00003051757812,"y":1193.9999694824219,"wires":[["deaaaa5f.9d7048"]]},{"id":"68d1ee59.5575","type":"exec","z":"a1ba0b6c.b93d98","command":"sudo shutdown -h now","addpay":true,"append":"","useSpawn":"","timer":"","name":"Shutdown Pi","x":617.0000305175781,"y":1311.4999694824219,"wires":[[],[],[]]},{"id":"8861c889.240108","type":"ui_group","z":"","name":"Temperature gauges","tab":"aeffa403.23f5f8","disp":true,"width":"19"},{"id":"aeffa403.23f5f8","type":"ui_tab","z":"","name":"Gauges","icon":"dashboard","order":1}]