MightHat Reboot signal doing nothing [solved]

Started by wile1411, December 04, 2018, 05:59:43 AM

wile1411

I think I've missed a step somewhere.  :-\

If I hold for >2/5 secs and < then 8 sec I see the  message "Forced shutdown.." on the LCD. If I hold for longer, the Pi does indeed shutdown and the LCD gives the message "Pi is now OFF" that is complete.

From the code, I see that this is the "force shutdown" process and it seems I'm missing the BOOTOK signal from the PI.
The BOOTOK and the Shutoff LEDs on the MH have never lit, so I'm guessing my pi setup is either incorrect or I'm referencing the incorrect pins for power ok.

I've got a Pi 3B+. The MH script says:
SIG_SHUTOFF        A3
SIG_BOOTOK         A6

I found the atxRasPi details and wondering what pins needed to be set on the pi side of things for the shutdownchecksetup.sh script to execute the necessary shutdown commands when getting a signal from the MH?

Current settings in shutdownchecksetup.sh script:
SHUTDOWN = 7                                                    #GPIO used for shutdown signal
BOOT = 8                                                                #GPIO used for boot signal

Do I leave these as is in the atxRasPi script and following the instructions on the atxRasPi git page?

EDIT: Nevermind - tried it with the defaults and it all works fine.
I wonder if there might be something to add onto the MightyHat guide to point people to this as it wasn't obvious when I went looking for this. I only stumbled over it while making my own modifications to the MH.ino file and realized the Pi didn't know anything about the button presses.

Felix

My apologies for making this so unobvious, and thanks for bringing this up.
I added a new "Programming your Pi" page that should help explain the behavior and how to get it to behave.

wile1411

I wouldn't say it was so 'unobvious' ;)
The first comment on the features page says it's like the ATXRasPi

It was never seeing the BootOK light up that was the obvious clue 'I' missed something. It didn't actually hinder normal operation, so in a way that was fine. Up until I wanted to shut the thing down (other than a force shutdown), there wasn't a problem that was noticeable. I just kept looking into the power control functionality until I managed to connect the dots back to the ATXRasPi script.

The new page is clear as day - Thanx for that and I hope the next person who sets up their gateway is helped enough it all runs first go.

While on the subject of the MightyHat
Thanks again for such a great device. I originally ordered 8 x R4 moteino boards a few years back and I've been tinkering with 2 of the motes on and off for a good while ever since. Kept trialing ideas on how I wanted to utilize them and well as learn processes need to make them work.

Since I received the MightyHat/PiGateway, all 8 were are put in service within 3 weeks.
4 x Temp/Weather around the house
1 x SonarMote for Pool Level
1 x MotionMote for shed monitoring (in conjunction with a PiZeroW & NoIR camera)
1 x SwitchMotePSU added to small extension cord to toggle house exhaust fan (Still working out if it even make a difference this summer)
1 x MotionMote for front door monitoring

I've got 2-3 Motes left that came with the other products and they are currently on the bench being tested to monitor Gas and Water usage and 1 other SwitchMote3Btn yet to be installed for the shed lights. Having fun and thanx for the products.

HeneryH

If you install the Pi Gateway software and have a MightyHat installed at that time, the installation scripts will run the atx-raspi installer.

Sounds like the only confusion would have been if you installed the MightyHat after you already had an operational Pi.

wile1411

#4
Quote from: HeneryH on December 05, 2018, 07:46:56 AM
If you install the Pi Gateway software and have a MightyHat installed at that time, the installation scripts will run the atx-raspi installer.

Sounds like the only confusion would have been if you installed the MightyHat after you already had an operational Pi.

Ah-ha - thank you! That's the step I missed somehow. (head) -> Desk. *bonk* I suspected it was my dunceness that brought this issue about.

Apologies to Felix for any hint it was anything to do with missing information - although, I think the new page is still handy :)
Looking back at the gatewaysetup.sh install script, it even asks you if you have the MightyHat installed. *sigh*
Taking a moment to remember, I think your assumption is correct. I must of built the Pi image before I had the MH and didn't want to say yes to the that question on the script as I didn't have the hardware available yet.