Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
doctorfrog
Mar 14, 2007

Great.

Might be able to do it with Kodi.

Adbot
ADBOT LOVES YOU

deong
Jun 13, 2001

I'll see you in heck!

doctorfrog posted:

Might be able to do it with Kodi.

Ive got kodi loaded on there now.. not sure where I'd go about finding that. I'll see if their forums have anything.

wolrah
May 8, 2006
what?
Kodi set to autoplay a playlist on startup should do the trick: https://matthill.eu/tutorials/kodi-auto-play-repeat-playlist-at-startup/

I think you should be able to use a "Smart Playlist" which can be randomized and automatically update with new content.

deong
Jun 13, 2001

I'll see you in heck!
Thanks! That did it. For now I just queued the videos and set them as a playlist. I need to look into a bigger card so that I can add more later. Right now I have 4 videos and they auto play on start, which will be pert for a 4 hr road trip this weekend.

forkbucket
Mar 9, 2008

Magnets are my only weakness.
I made a thing!



If anyone remembers, earlier in the thread I asked about weather stations and people had very helpful suggestions. I mostly wanted a simple weather display that would display the current conditions and maybe a forecast. So after some looking around I ended up buying an e-ink display (a Waveshare 2.7 inch display to be exact). I bought the version that had the built in HAT so I could plop it right on top of a Raspberry Pi Zero W.

The libraries and stuff you need to get that running were all listed on the Waveshare wiki and were pretty easy to set up. So I wrote a python program that gathers and parses weather data and displays it on the e-ink. Once that was up and running I took a gorgeous piece of wood I saved from my late grandfather's workshop and made a simple wooden frame. I shaped the main block with a jig saw and drill. Then I honed it down with a chisel, some sandpaper and hell of a lot of swearing. I'm super happy with how it turned out! Here's a couple more pictures I snapped during the process. I apologize for the horrible picture quality, my phone is getting old and the camera is terrible...



Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

That looks great!

xzzy
Mar 5, 2009

Literally unusable due to that crooked 't' in Light.

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

xzzy posted:

Literally unusable due to that crooked 't' in Light.

I don'ᵗ see ᵗhe problem.

forkbucket
Mar 9, 2008

Magnets are my only weakness.

xzzy posted:

Literally unusable due to that crooked 't' in Light.

Yea for some reason the smaller t's are a bit wonky. I finagled Arial in there so it's most likely definitely my fault, but it doesn't bother me v:shobon:v

mewse
May 2, 2006

That's super cool, must be very satisfying to have that all put together. Is it pulling internet data?

forkbucket
Mar 9, 2008

Magnets are my only weakness.

mewse posted:

That's super cool, must be very satisfying to have that all put together. Is it pulling internet data?

Yea, the python program I wrote parses a .xml file from yr.no (a collaboration site between the Norwegian Meteorological Institute and the National Broadcasting Channel in Norway). They publish their weather data for free, with certain caveats. Initially I tried using openweathermap.org and their python wrapper. It worked pretty well and was easy enough to use, but they only had limited data available with their free subscription API. Using the info from Yr was a slight learning curve since I had to learn how to process xml files within python, but once that clicked it was pretty straight forward. Writing the actual code for the display was mostly trial and error placing the objects and lines and getting the right size! I probably spent about as much time as i did coding going through all their little .png icons for the different weather statuses and making them look good in black and white pixel art, to be honest.

Edit: The python script updates and refreshes the screen every 10 minutes, which is probably overkill for weather but I love watching the thing update :3:
By the way, I'd be happy to share my code or answer questions if anyone else is curious or is planning something similar!

xzzy
Mar 5, 2009

Strip all your keys/logins out of the code and put it in github if you want to share it.

Then have one person in ten years clone it. :v:

But at least it'll be out there.

forkbucket
Mar 9, 2008

Magnets are my only weakness.
That's probably the best way to do it! I'll work on getting a quick how-to of what I did to, since I'm not sure how helpful the .py file is on its own.

McGiggins
Apr 4, 2014

by R. Guyovich
Lipstick Apathy
Hell I'll clone it and make one. A wooden piece like that with a backlight screen (is it backlit? I know nothing of e-ink technology) would look amazing in my house.

It would be interesting to see if AUSBOM do easily scrapable data, but for a wall piece like that well worth looking in into.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

darksky has a free weather api with high quality data and it has several python wrappers.

Moey
Oct 22, 2010

I LIKE TO MOVE IT
I may finally have a project for my old pi! I love the look of that thing.

xzzy
Mar 5, 2009

Yeah it looks loving sweet. I'd get to the case design part and think to myself "man it would be nice to have a proper case but all I know how to use is scissors so I guess it's gonna be cardboard."

Or I'd fire up blender with a scheme to get it 3d printed and never finish.. ending up with cardboard.

forkbucket
Mar 9, 2008

Magnets are my only weakness.

McGiggins posted:

Hell I'll clone it and make one. A wooden piece like that with a backlight screen (is it backlit? I know nothing of e-ink technology) would look amazing in my house.

It would be interesting to see if AUSBOM do easily scrapable data, but for a wall piece like that well worth looking in into.

No its basically like a tiny kindle screen, so no back lighting.

McGiggins
Apr 4, 2014

by R. Guyovich
Lipstick Apathy
How does one properly secure a pi? I just had my internet cut off (phone posting) by my telcomprov (verified as them and not a scam) apparently due to 'virus activity' but there is nothing on my home network other than a 3b, zero w, this phone and a smart tv plus chromecast.

So it has to be the pis, but i gave them passwords when i got them. I haven't got rid pf the default pi accounts (i just changed the password) because as i understand it raspbian jessie doesn't work too well if the pi account goes bye bye, as apparently a lot of things are programmed under the assumption that specific account is on the machine.

Inept
Jul 8, 2003

Make sure your router's firmware is up to date. A lot of consumer routers have well known vulnerabilities and have been made part of various botnets. This is the most likely cause if your router is configured normally (no port forwarding or DMZ to your Pi).

CascadeBeta
Feb 14, 2009

by Cyrano4747

forkbucket posted:

I made a thing!



I would love to make one of these. What a good idea. I'm assuming it wouldn't be hard to swap where it pulls weather data from?

forkbucket
Mar 9, 2008

Magnets are my only weakness.

CascadeBeta posted:

I would love to make one of these. What a good idea. I'm assuming it wouldn't be hard to swap where it pulls weather data from?

Yea it's as simple as editing the url with your desired location if you have the same display. I'll have the code and a short step by step of what to do up on github later today, barring any unforeseen events!

Edit: Unless you mean using a different service like Dark Horse or OpenWeatherMap. In that case you'd have to write your own little python program.

Volguus
Mar 3, 2009
While this is an awesome project, it is also very wasteful. The RPi is way too overpowered for this. An eink screen only consumes power when refreshing. Therefore, something like https://hackaday.com/2016/06/12/an-improved-wifi-connected-e-ink-display/ would do away with the need for a charger and most likely could run for months on a battery.

xzzy
Mar 5, 2009

Well you're still gonna need a computer somewhere on your network for it to fetch data from, unless you already got a proper linux server set up to hand out bitmaps you could do a lot worse than running a pi.

wolrah
May 8, 2006
what?
Yeah, a Pi Zero W pulls about 2/3 of a watt when idling while connected to WiFi according to the internet. Let's say the USB power supply is hilariously inefficient and the whole assembly is pulling two watts constantly. That's 48 watt-hours per day, ~1.5kWh per month. I pay ~7 cents per kWh, so something like that would cost me barely double digit cents per month to run and never need to think about charging it, while offering significantly more processing capability and much easier development.

Now of course if you want to do a project like that simply for the sake of doing it in a more "embedded" style I'm certainly not saying you shouldn't, projects don't have to make financial sense, but if you put more than a few bucks worth of your time in to it solely for the purpose of efficiency you've lost overall.

forkbucket
Mar 9, 2008

Magnets are my only weakness.
After I finished bug testing and had it where i wanted it I hooked up a voltimeter thing that plugs into the usb socket between the charger and the cable. IIRC it pulled 0.08 A from the charger on average (raspberry pi zero w on the wifi network). Don't think that's too bad in the grand scheme of things? I dunno if there's a way to write a linux shell puts the pi to sleep in between screen refreshes? I'm not linux savvy enough to work that out, I'm fairly new to the whole raspberry pi thing and coding in general to be honest.

Mostly this was just a fun project I did because nerd stuff is cool and I thought I'd share :shobon:

xzzy
Mar 5, 2009

Nah, linux is pretty good about idling when there's no work to be done, it'll chill out using the minimum amount of power needed. The effort needed to get power usage even lower would make the whole project way more complex and finicky.

Oben
Aug 7, 2004

Oh, the lights changed
You can disable the hdmi to get the power down even further. Plus on mine, with the official case, turning off the led drops the temperature into the blue.

astral
Apr 26, 2004

McGiggins posted:

How does one properly secure a pi? I just had my internet cut off (phone posting) by my telcomprov (verified as them and not a scam) apparently due to 'virus activity' but there is nothing on my home network other than a 3b, zero w, this phone and a smart tv plus chromecast.

So it has to be the pis, but i gave them passwords when i got them. I haven't got rid pf the default pi accounts (i just changed the password) because as i understand it raspbian jessie doesn't work too well if the pi account goes bye bye, as apparently a lot of things are programmed under the assumption that specific account is on the machine.

Inept posted:

Make sure your router's firmware is up to date. A lot of consumer routers have well known vulnerabilities and have been made part of various botnets. This is the most likely cause if your router is configured normally (no port forwarding or DMZ to your Pi).

is a good start.

I'd also recommend: Turn off UPnP on your router. Don't install random software on your pi by downloading/running a random shell script.

It's also about time to update from Jessie if you haven't yet.

If you have an (especially old-versioned) Android phone that's also a good candidate for infection, and I wouldn't rule out the smart TV.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Volguus posted:

While this is an awesome project, it is also very wasteful. The RPi is way too overpowered for this. An eink screen only consumes power when refreshing. Therefore, something like https://hackaday.com/2016/06/12/an-improved-wifi-connected-e-ink-display/ would do away with the need for a charger and most likely could run for months on a battery.

This is the "but you could have used a 555" of embedded

forkbucket
Mar 9, 2008

Magnets are my only weakness.
All right, I had to do some reorganizing of the code and toss together a quick readme file. But as promised here is the weather display stuff! https://github.com/NeonSpork/weather_display

I'm fairly new to python and coding in general, so be gentle! I'm open to feedback, I'm sure there are other ways to structure the program or solutions that may be more elegant than what I've done. I'm all ears when it comes to learning how to be better at this. Just be nice about it is all I ask!

xzzy
Mar 5, 2009

The correct response is if they don't like your programming technique, they should fix it and submit a pull request.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Here's a PR for the naysayers:

quote:

The python code only runs in python 2 because the Waveshare people wrote their library in python 2, and I don't see the point in wasting time converting it to python 3.X when it works just fine. gently caress you, that's why.

Sagebrush
Feb 26, 2012

ante posted:

This is the "but you could have used a 555" of embedded

isn't "you could have used a 555" already the "you could have used a 555" of embedded?

Inept
Jul 8, 2003

Volguus posted:

While this is an awesome project, it is also very wasteful. The RPi is way too overpowered for this. An eink screen only consumes power when refreshing. Therefore, something like https://hackaday.com/2016/06/12/an-improved-wifi-connected-e-ink-display/ would do away with the need for a charger and most likely could run for months on a battery.

Hey person who is just learning to program in Python and showed us a cool project, that's dumb. You should just reverse engineer the firmware on some Chinese board like this guy did or you'll waste about as much electricity as the clock on your microwave.

Volguus
Mar 3, 2009
Oi, sorry about even dreaming of a possible improvement to a project (regardless how cool and perfect it already is). Jesus people.
Why would you want to consume less electricity? So you can run on a battery. Why would you wanna do that? So you can place the box anywhere and not worry about having access to a plug.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Dreaming of an improvement is one thing. Dismissing it as “wasteful” is another. Don’t be a jerk.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I mean, that would be a valid project. But it's a totally different project with a completely different scope and design goals, presented in a really abrasive dismissive way

mewse
May 2, 2006

Yeah, get that thing on a battery for the added convenience of having to recharge it all the time

Adbot
ADBOT LOVES YOU

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

The Squix (actually I guess they rebranded to thingpulse) e-paper esp8266 I posted about before has battery power and charging circuitry if you want it:
https://mcuoneclipse.com/2017/10/22/squix-esp8266-based-e-paper-weather-station/

It includes a weather station as the basic project on it but can be used for whatever. Costs about the same or more as a Pi zero + epaper display as a kit, though.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply