Page 1 of 1
Reboot Switch for RaspberryPi
Posted: Wednesday 31 August 2016 21:50
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¶m=system_reboot
but the pi doesn't restart..
Could you help me?
Thank you
Re: Reboot Switch for RaspberryPi
Posted: Wednesday 31 August 2016 21:56
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.
Re: Reboot Switch for RaspberryPi
Posted: Wednesday 31 August 2016 22:01
by SweetPants
On Linux (Ubuntu 14.04 LTS)
Code: Select all
http://127.0.0.1:8080/json.htm?type=command¶m=system_reboot
works fine from a virtual switch on my system.
Does
work from the CLI?
Re: Reboot Switch for RaspberryPi
Posted: Thursday 01 September 2016 7:07
by jannl
Works for me. Do you have any messages in the logfile?
Re: Reboot Switch for RaspberryPi
Posted: Thursday 01 September 2016 8:00
by Mazzokun
SweetPants wrote:On Linux (Ubuntu 14.04 LTS)
Code: Select all
http://127.0.0.1:8080/json.htm?type=command¶m=system_reboot
works fine from a virtual switch on my system.
Does
work from the CLI?
Code: Select all
http://127.0.0.1:8080/json.htm?type=command¶m=system_reboot
now works
Thank you:)