Live data from Hacker News

Ask HN: Best way to input data to a RasPi, from browsers on the same LAN?

news.ycombinator.com

11–16 of 16 posts

Re: Ask HN: Best way to input data to a RasPi, from browsers on the same LAN?

#11
I've done similar things with python/flask. My experienced tip, if you try to do an ad hoc network and have people connect to that without passing the internet through, prepare to get f'd by apple: https://discussions.apple.com/thread/7705927?page=3

If you want to host it on the lan just play with IPtables to get your port through and host a little web server. Shouldn't be too complicated. Look in to gunicorn for a production capable flask server. I have used Monit to keep gunicorn alive as a second line of defense. You could use init instead if you prefer.

If this is over your head let me know and I can break it down to more detail.

Re: Ask HN: Best way to input data to a RasPi, from browsers on the same LAN?

#13
post #7

Hey I am building daptin. I have chosen golang so that it can run on raspi (or any target). I haven't personally tried it on raspi yet since I don't have one, but I invite you to give this a try If I understand correctly you should be able to run the arm7 static build directly You can find the docs here at https://docs.dapt.in There is a nice dashboard accessible over the web which you can completely protect after si…

This sounds very interesting and the timing couldn't be perfect. How does your dashboard differ from the freeboard.io that was referenced below?

Don't see freebord referenced in this thread, but I just checked out what freeboard is. Seems like freeboard can consume a data source and make graphs out of it. It needs a data source to push data to it I guess. Freeboard looks more in the direction of plotting readily available data from one source.

Daptin on the other hands manages your database, build REST/Graphql APIs which you can use from any page and provides automation using actions/outcomes.

Re: Ask HN: Best way to input data to a RasPi, from browsers on the same LAN?

#14

If you want to run commands on the raspbi from the web, you have lots of options. The question is if you want to send the commands literally to the terminal, or have some preprocessing step in between? If you want to have a preprocessing step, then you need an API to take the commands, process them, run them, and then return the output. If you want to stream the output, you should look into something like websockets.…

Thanks so much, I'll play with both of those options.

Re: Ask HN: Best way to input data to a RasPi, from browsers on the same LAN?

#15
post #7

Hey I am building daptin. I have chosen golang so that it can run on raspi (or any target). I haven't personally tried it on raspi yet since I don't have one, but I invite you to give this a try If I understand correctly you should be able to run the arm7 static build directly You can find the docs here at https://docs.dapt.in There is a nice dashboard accessible over the web which you can completely protect after si…

That looks really interesting. I'll have a play!

Re: Ask HN: Best way to input data to a RasPi, from browsers on the same LAN?

#16
post #9

Check out MQTT and Adafruit.io in particular. The cool thing about MQTT is that your device is reachable behind NAT. I'm doing pretty much exactly what you describe here with this IOT-lamp project. https://github.com/h-c-c/IOT-LAMP I set up a 'util' feed for system commands and have implemented a shutdown routine so far. I send my lamp commands with Google Assistant through IFTTT.

That's really cool. Considering I just need the same command to run each time, with a different value passed to it, I could see this working the same as this (and the idea of being able to tell my Google Home to do it is pretty awesome!). I'll have a play, thanks.
Post reply on HN