Dose anyone know how to shutdown the pi from RM with a http post?
I'm thinking shutdown the pi and then shutdown the power to the pi and monitor when we go out for a magic mirror project
There is no generic way to shut down a Pi from a post. I think you will have to create a basic web server, maybe using the built in web server in php. Then you would have to process the post to execute a script ot simply shutdown (will need sudo rights)
Hope this helps.
Is that what this is saying
I was trying a later post saying
Yes, the UI sends a post request to "http://your-ip/settings with
name = syscmd and value = poweroff to shutdown
or
name = syscmd and value = poweroff to reboot to reboot your device
From the looks of it, Yes. You will need a web server running to process the post. It looks like Rune UI already has the web server. Are you running Rune UI on you Pi or something else.
I did this
So,
You have a basic Pi with no additional software installed?
Yea, only extra is magic mirror and pm2 which autoloads MM on boot
does that have a web server? Can you access the system from a browser?
Thought the ssh was, not tried logging in remotely not sure where to start
ssh is command line. (secure shell)
Can I http post to the command line?
That's what I thought they were doing
You need a web server to process the post command. I assume RuneAudio has a web server.
So I need to do this
Yes, apache is a web server. Once you get that running, then maybe you can use the info from Rune to do what you want to do. I think you have a steep learning curve ahead. Good luck.
Thanks, I'm making it up as I go along!
Thought someone on here would have done this already
Just curious but why do you need to shut down the RPi when you go out?
Before I shutdown the monitor as their power together
you can't SSH through groovy but you can telnet and run commands
How
If you're able to install and configure Flask, you can try the suggestion here.
https://www.raspberrypi.org/forums/viewtopic.php?t=238398
And this one from the webcore forum, but you can use the RM to do the URL call