Shutdown domoticz pi

Moderator: leecollings

DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Shutdown domoticz pi

Post by DaWauZ »

Hello,

Maybe its in the wrong subforum, excuse me for that but I dont know exactly what should then be the right one.

I would like to create a shutdown switch, to shutdown the rpi with domoticz itself. I dont know if that is possible, but its also shitty to shut it down by a command (sudo poweroff) as I dont have a display/keyboard on the pi.

Is it possible to do that and how?
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
Cornholio1234
Posts: 23
Joined: Thursday 03 March 2016 11:01
Target OS: Windows
Domoticz version: V3.4964
Location: Germany
Contact:

Re: Shutdown domoticz pi

Post by Cornholio1234 »

why don't you just ssh into your pi like the rest of the world? :-)
Windows Server, Aeotec Z-Stick Gen5, V3.4964
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

Well, because I have to start my laptop, and so on.
Its easier to do it by the domoticz app on my phone. Why not automate it.
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: Shutdown domoticz pi

Post by alexsh1 »

Yes, it is possible. You have to come up with your own script (as demon) and as soon as you issue a command, which can be adopted as a virtual sensor in Domoticz, RPI will be reboot/shutdown.

Please see below:
https://lowpowerlab.com/guide/atxraspi/
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Shutdown domoticz pi

Post by Egregius »

Code: Select all

http://192.168.2.10:8084/json.htm?type=command&param=system_shutdown 
should do it as that is the url that the www gui calls.
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Shutdown domoticz pi

Post by jannl »

I have a reboot button on my frontpage.
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

Egregius wrote:

Code: Select all

http://192.168.2.10:8084/json.htm?type=command&param=system_shutdown 
should do it as that is the url that the www gui calls.
Where in which gui do yo see this?
I cant find it in the webgui of domoticz?
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Shutdown domoticz pi

Post by Egregius »

I have a restart and shutdown option in the menu.
Then used feveloper view of my browser to see the url.
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

Ok but I dont, domoticz is running on a rpi.
How can I get that options?
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Shutdown domoticz pi

Post by jannl »

Hm, I run domoticz on a pi. The restart in somewhere in the lower part of the settings menu
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

I found it now, on my laptop resolution 1366x768 the bottom of the options menu are not visible.
I connected a larger external screen and now I see them.

In the dev view the link is this: <a id="cShutdown" href="javascript:SwitchLayout('Shutdown')"><img src="images/shutdown.png"> <span data-i18n="Shutdown System">Computer afsluiten</span></a>

How can I use this on a switch, it cant because its html ...
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Shutdown domoticz pi

Post by Egregius »

The link is as I posted it earlier.
You need to open the network tab of develover view and click the button to see the action.
Image
Just a normal switch command in the screenshot, shutdown url posted above
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Shutdown domoticz pi

Post by jannl »

The info is also in wiki as far as I remember
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Shutdown domoticz pi

Post by Egregius »

DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

ok, i created a switch, push off button and gave it an off action http://192.168.1.14/json.htm?type=comma ... m_shutdown
But nothing happens...
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Shutdown domoticz pi

Post by Egregius »

Logfile? Authentication?
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

I only get these :

Code: Select all

2016-10-19 20:34:35.928 Error: Error opening url: http://192.168.1.14/json.htm?type=command¶m=system_reboot
I have to log in, in my webgui.
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
User avatar
Egregius
Posts: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Shutdown domoticz pi

Post by Egregius »

Something is wrong with your url. 'Param' got replaced.
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

yeah I dont know why, @ the action is really typed http://192.168.1.14/json.htm?type=comma ... m_shutdown
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
DaWauZ
Posts: 69
Joined: Wednesday 05 November 2014 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Shutdown domoticz pi

Post by DaWauZ »

Its solved, i'm really shaming myself, I forgot the :8080 port in the url.
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests