Reboot Switch for RaspberryPi

Moderator: leecollings

Post Reply
Mazzokun
Posts: 89
Joined: Thursday 28 April 2016 23:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Milan, Italy
Contact:

Reboot Switch for RaspberryPi

Post by Mazzokun »

Hello, I created a virtual switch to restart the raspberry pi and I place this json url in the on action field:

Code: Select all

http://127.0.0.1:1989/json.htm?type=command&param=system_reboot
but the pi doesn't restart..
Could you help me?
Thank you
GoranLundberg
Posts: 7
Joined: Sunday 07 August 2016 22:49
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sweden
Contact:

Re: Reboot Switch for RaspberryPi

Post by GoranLundberg »

I would guess that the user running domoticz doesn't have permission to reboot the machine.
Which user are you running domoticz as? pi?
For domoticz to be able to reboot the machine it needs to run as root or as sudo root.
But it's not recommended to run domoticz as a root user due to security reasons.
Server: Raspberry Pi1 B+ Hardware: RFXCOM - RFXtrx433 USB Transciever Domoticz: Beta Channel Keybase: https://keybase.io/goranlundberg
SweetPants

Re: Reboot Switch for RaspberryPi

Post by SweetPants »

On Linux (Ubuntu 14.04 LTS)

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=system_reboot
works fine from a virtual switch on my system.

Does

Code: Select all

sudo shutdown -r now
work from the CLI?
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Reboot Switch for RaspberryPi

Post by jannl »

Works for me. Do you have any messages in the logfile?
Mazzokun
Posts: 89
Joined: Thursday 28 April 2016 23:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Milan, Italy
Contact:

Re: Reboot Switch for RaspberryPi

Post by Mazzokun »

SweetPants wrote:On Linux (Ubuntu 14.04 LTS)

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=system_reboot
works fine from a virtual switch on my system.

Does

Code: Select all

sudo shutdown -r now
work from the CLI?

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=system_reboot
now works :D
Thank you:)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests