Page 1 of 1

SOLVED - pistar remote commands RF - was hardware button to shut down

Posted: Tue Aug 28, 2018 7:20 pm
by dh3ybe
Hello,

my name is Kai and I am new to pistar. I am not new in using raspberry pi but new in pistar and mmdvm.
I run mmdvm on a raspberry pi 1 B (not +). It works very good.

I want to shut down my pistar by means of a hardware button. I know, that I can do that by means of gpio pins and buttons and scripts "oberving" that gpio pin concerninh hi or low eletronic level.

Can this be done with an mmdvm hat attached on the GPIO and using a GPIO pin that is not used by mmdvm device?

I have my pistar running connected to a lan-dsl router, but I have not every time a computer running to switch off by means of the pistar webinterface button.

If this post is to much raspberry pi related, please shift it to the right forum board.

Thank in advance for answers or hints and thanks for great pistar-raspi-image

Best regards
Kai
dh3ybe

Re: hardware button to shut down

Posted: Tue Aug 28, 2018 7:56 pm
by KE0FHS
Do you have a radio available when you want to shut down? If yes, you could use the Pi-Star Remote Control RF commands (https://amateurradionotes.com/pi-star-n ... #watchdogs).

Re: hardware button to shut down

Posted: Tue Aug 28, 2018 9:04 pm
by dh3ybe
Hello Toshen,

yes, I have my analog and my digital hf-radio.

As I understood, I can that configure and can do a system shutdown by sending in dmr a private call to the hotspot, where the privatecall number has to be the specific number in the configuration file for the shutdown.

That is a good hint an thank you for your quick anser and supporting me in my further steps concerning pistar :D

Best regards
Kai
dh3ybe

Re: hardware button to shut down

Posted: Tue Aug 28, 2018 9:24 pm
by dh3ybe
pistar says "login data not configured" (pistar speaks to me in german, so I translated it)

I enabled it, I enabled shutdown and I did put my CALLSIGN in UPPERCASE in expert Remote config.

Even after a reboot the message came.

I will do a next trial tommorow

When that works, that will be a very good solution vor me.

Best regards
Kai
dh3ybe

Re: hardware button to shut down

Posted: Tue Aug 28, 2018 9:43 pm
by KE0FHS
One thing to check: you must remove the comment symbol (#) in front of commands you want to use, so if you want to use DMR shutdown:

Code: Select all

[dmr]
# TG commands [Ed note: Use private calls]
svckill=8999999
svcrestart=8999998
reboot=8999997
shutdown=8999996
#hostfiles=8999995
I just tested this using my Hytera AR-685 HT with a ZUMspot + RPI Zero W hotspot. I programmed in two channels for REBOOT and SHUTDOWN: Private call, Color Code 1, Time Slot 2, my hotspot frequency. In the Pi-Star dashboard Admin view, I made sure the Pi-Star Remote label was green. Both commands work.

There is an unusual behavior when rebooting or shutting down, quite different compared to using the software Reboot and Shutdown buttons in the Pi-Star Power view. After keying up the remote RF command, the call is logged in the Gateway Activity and Local Activity sections, but then the Pi-Star dashboard just freezes; it doesn't look like anything more is happening. If you then try to navigate to a different view like Configuration or Dashboard, you'll get a "Site can't be reached" error message, which tells you the command has been executed.

Re: hardware button to shut down

Posted: Wed Aug 29, 2018 2:15 am
by W1KMC
OK fols - there is a 'glitch' somewhere:

My Pi-Star is set correctly with the Remote (my Callsign is the only one that will shut the device down) and Shutdown uncommented, BUT

a Private Call to the shutdown code of 9999996 gets sent and in 5 seconds or so "Secret Not Found" is heard on TG 9 (I think) BUT the PI DOES shut down (Pi board anyways -- the Hat still blinks. If I am plugged into a Battery bank about 60 seconds later the Hat will stop blinking as the Battewry Bank thinks its not powering anything anymore and shuts itself off -- effectively turning off all juice. Plugging into a constant power source and this does not happen but the Pi0W (or even my Pi3B+ boards) do turn off.

Do what you see may be normal as when you try to change pages, the underlying Pi-Start is off

Next time you do the shutdown by code, watch your RasPi and see if is doing what I say, if so, you are shut down. Now they do make USB to Micro (what Pi uses) with a built-in power switch but if your radio can shut it down then this would be good for turning it back ON again

Here's the one I am going to order from ebay (your country may vary on ebay site though:

https://www.ebay.com/itm/Raspberry-Pi-P ... 1438.l2649

Let us know how it goes

Re: hardware button to shut down

Posted: Wed Aug 29, 2018 1:41 pm
by KE0FHS
dh3ybe wrote: Tue Aug 28, 2018 9:24 pm pistar says "login data not configured"
Just had a thought, a total guess, really: what do you have set in Pi-Star > General Configuration > Node Type? If you have Private selected and the radio you're using has a different callsign configured, the message you're getting might be related to that. When Private is selected (and in some countries, like the U.K., that's the required setting for a hotspot), you can only access the hotspot with a radio that is configured with the same callsign as the hotspot.

pistar remote commdands RF - was Re: hardware button to shut down

Posted: Wed Aug 29, 2018 5:10 pm
by dh3ybe
Hello oKevin and Toshen,

thanks for your hints.

So a changed in expert config remote

Code: Select all

#enabled=false
enabled=true
to

Code: Select all

enabled=true
The "#'" i inserted in the first trial and did write enabled=true in a new row. Changed it back and only one rwo with "true" value enabled. But that would be new to me, that under linux/raspberry pi this should not work.

No it runs and gave the information "login data not configured" as voice information an mmdvm oled display do show close and the rapsi shuts down.

Works for me.

Thank for your advices and trials.

Very good solution for me.

Best regards
Kai
dh3ybe