Pimoroni OnOff shim (software.)

Help with Raspberry Pi Foundation Boards (Raspberry Pi, Pi Zero, Pi Zero W, Pi A, Pi B, Pi B+, Pi2 B, Pi3 B, Pi 3 B+)
Post Reply
User avatar
G0WBX
Posts: 15
Joined: Wed Sep 23, 2020 8:01 pm

Pimoroni OnOff shim (software.)

Post by G0WBX »

Hi.

Had a look around the forum before asking, and only found two messages relating to the OnOff shim, and no idea if they were successful.

So... Has anyone successfully added one of these to a Pi-Star? https://shop.pimoroni.com/products/onoff-shim (As it would be useful when running without a link to the dashboard etc.)

I'm OK wrangling hardware, but just want to check if there are any caveats / clashes / stuff to be aware of / avoid etc. BEFORE I mess with an otherwise reliable hot-spot stack (with one of the small OLED screens and wired LAN card) in regards to installing the needed software for the button to work.

Of course, a full backup of the SD card will be taken first, and verified!

73. Dave G0WBX, preparing to dig a deep rabbit hole..

><
Forever confused.
User avatar
G0WBX
Posts: 15
Joined: Wed Sep 23, 2020 8:01 pm

Re: Pimoroni OnOff shim (software.)

Post by G0WBX »

Thanks for looking Sir.

The shim works just fine on a "normal" Pi, just as advertised. Press to turn on. Long press to turn off, and it shuts down cleanly.

I was wondering about the OLED display, but I can check that out myself, it was indeed if there was any firmware/software clashes anywhere. I guess, backup the card, and try it. What could possibly go wrong? :-)

Will report back when I find the time to play some more.

73. Dave G0WBX(G8KBV)
Forever confused.
User avatar
G0WBX
Posts: 15
Joined: Wed Sep 23, 2020 8:01 pm

Re: Pimoroni OnOff shim (software.)

Post by G0WBX »

Hi.

This is just to say, that this :- https://shop.pimoroni.com/products/onoff-shim seems to work well with the Pi-Star RpiZero based Hotspot hardware, including an OLED display. (One of the smaller items, with the old controller chip.)

And also one of these devices:- https://erelement.com/raspberry-pi/eth-usb-hub-hat (Though not purchased from that source.) As wired LAN's are just so much more reliable than WiFi. It falls back to WiFi if the Wired LAN is not connected, so working via my phone that itself is working as a WiFi hotspot, also works well.

I digress...

The install script Pimoroni tell you to download and execute (see their page linked earlier) seems to complete a lot quicker on a Pi-Star, than on a plain vanilla Pi. (Probably because a all the needed GPIO etc support is already baked into the Pi-Star at a guess.)

So, I can now turn on, and turn off the Pi-Star, with a press of a button. Plus, when turning off, it does indeed perform a clean shutdown before turning off the power.


Do do this...

As I had not updated my Pi-Star for a while, I first went through the hoops to do all that via ssh'ing into it from a desktop PC (Linux based as it happens.)
That took quite a long time to do, as the OS side was quite out of date, especially with some security patches! (over 38 items to upgrade!)

I then having installed the hardware, and found that no hotspot features or behavior was affected (so no hardware clashes.) Connected to the dashboard and logged into the config page, and backed up the settings, exited the web side, and again ssh'd into the Pi-Star. Then, after making the file system read/write, ran the curl based download and run command documented on the Pimoroni OnOff shim page (linked above) as the pi-star user.

That forces you to reboot the thing after it's installed the daemon, and that of course restores the file system back to read-only.

Once again I ssh'd into it, and using the htop command, I could see the "cleanshutd" daemon was loaded and running as root..

Logging out of it via the LAN (web and ssh) I checked the hotspot overall was working, it was.

I then checked that is did the right thing on shutdown, it does, and subsequent restart.

So far so good. Only time will tell...

NO affiliation to any companies or vendors above, other than as a happy user of the products.

73.
Dave G0WBX (or G8KBV I can legally work myself! Not that any more sense is made of anything...)
Forever confused.
NJ5W
Posts: 6
Joined: Tue Mar 22, 2022 7:09 pm

Re: Pimoroni OnOff shim (software.)

Post by NJ5W »

I got the fan to turn on and off with the software but I can not figure out how to turn the LED off or a different color. Anyone have success there?
Post Reply