←back to thread

2093 points pabs3 | 1 comments | | HN request time: 0s | source
Show context
angrygoat ◴[] No.42135621[source]
What a beautiful use of technology to uphold someone's personhood, and let them know they are loved, despite (and with regard to) a profound injury.

This reminds me of a desire I've had for a long time: a simple, wall-mountable eInk device that could be configured with a URL (+wifi creds) and render a markdown file, refreshing once every hour or so. It would be so useful for so many applications – I'm a parish priest and so I could use it to let people know what events are on, if a service is cancelled, the current prayer list, ... the applications would be endless. I'd definitely pay a couple of hundred dollars per device for a solid version of such a thing, if it could be mounted and then recharged every month or two.

replies(11): >>42135791 #>>42135902 #>>42136090 #>>42136946 #>>42137028 #>>42137259 #>>42138858 #>>42138987 #>>42139034 #>>42144836 #>>42145380 #
inanutshellus ◴[] No.42139034[source]
assuming your eink display would be on the same LAN as some always-on PC...

  1. install python
  2. make a file named `index.html` somewhere. 
  2a. put this in the "head" tag, so it'll refresh hourly: `<meta http-equiv="refresh" content="3600">`.
  3. run `python -m http.server` from the same folder
     This will start a single-threaded web server on 8000
  4. On another machine on your network verify you can pull up http://firstmachine:8000/. 
  5. having proven it works, go buy an e-ink display and point it to http://firstmachine:8000/, make it the default homepage.
Voila.

Any time you have anything to say, just edit the `index.html` file and the eink display will update.

No need for fancy subscription services or kickstarter projects or crowdfunding... just... batteries included python.

replies(4): >>42141558 #>>42150269 #>>42150336 #>>42153168 #
trashcan ◴[] No.42141558[source]
Having done this, you will also most likely want to setup a javascript timer that also triggers a refresh in case the meta refresh fails. And a weekly reboot of the machine in case there is a memory leak or some other issue.
replies(4): >>42141824 #>>42145119 #>>42145521 #>>42150315 #
xp84 ◴[] No.42150315[source]
The primary issue I would imagine, would be not that a meta refresh fails to happen, rather, that any type of full refresh is attempted during a momentary 'blip' of the local network, leaving it showing a "cannot find server" type of error. To achieve the safest persistence of the refresh loop, it would probably make more sense to have the refresh function via

1. AJAX request for itself, with a timed retry in the case of any failure (optional: During this time, add a visible indicator that you're having connectivity issue) 2. Extract the contents of the <body> tag of the fetched HTML 3. Set the innerHTML of the <body> tag of the DOM to the fetched body.

To avoid memory leaks I'd still be tempted to also try to implement a "safe-ish refresh" that checks for a successful response and quickly fires off a location.reload() on like a daily basis.

replies(1): >>42150350 #
1. trashcan ◴[] No.42150350{3}[source]
Yep, exactly r:refreshing failing. If you are using a full featured browser you can also use a browser extension that forces the refresh.

Additionally for a raspberry pi, you can use a watchdog timer service that checks to see if the rpi has frozen, and reboots it.