- Platform information:
- Hardware: Raspberry Pi 3 B
- OS: openHABian
- openHAB version:3.3.0 M5
Hi all,
I’ve implemented the reboot/shutdown logic mentioned in the above guide. I’m able to successfully restart openHAB with the openhab user via SSH.
However, I’m having difficulties restarting using rules.
Now, my logs show the following error for either reboot or shutdown rules (notice the last line):
Restart:
2022-05-18 15:55:43.138 [INFO ] [utomation.script.file.maintenance.js] - {
"oldState": "NULL",
"newState": "Reboot",
"state": "null",
"receivedCommand": null,
"receivedState": null,
"receivedTrigger": null,
"itemName": "openHABMaintenance_Action",
"module": "c8152a90-7315-40f6-b562-bb1a8a07e648",
"payload": {
"type": "String",
"value": "Reboot",
"oldType": "String",
"oldValue": "NULL"
},
"eventType": "change",
"triggerType": "ItemStateChangeTrigger"
} "New State:" "Reboot"
2022-05-18 15:55:43.142 [INFO ] [utomation.script.openhab.maintenance] - Rebooting openHAB
2022-05-18 15:55:43.150 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'openHABMaintenance': Fail to execute action: 1
Shutdown:
2022-05-18 15:56:21.488 [INFO ] [utomation.script.file.maintenance.js] - {
"oldState": "NULL",
"newState": "PowerOff",
"state": "null",
"receivedCommand": null,
"receivedState": null,
"receivedTrigger": null,
"itemName": "openHABMaintenance_Action",
"module": "c8152a90-7315-40f6-b562-bb1a8a07e648",
"payload": {
"type": "String",
"value": "PowerOff",
"oldType": "String",
"oldValue": "NULL"
},
"eventType": "change",
"triggerType": "ItemStateChangeTrigger"
} "New State:" "PowerOff"
2022-05-18 15:56:21.493 [INFO ] [utomation.script.openhab.maintenance] - Shutting Down openHAB
2022-05-18 15:56:21.501 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'openHABMaintenance': Fail to execute action: 1
The rule commands are:
executeCommandLine("sudo","reboot");
executeCommandLine("sudo","poweroff");
Any help would be greatly appreciated
Many thanks in advanced!
Jeevs