WebThingsIO / gateway-addon-python

Python bindings for developing add-ons for WebThings Gateway
Mozilla Public License 2.0
16 stars 10 forks source link

How to reboot #80

Closed flatsiedatsie closed 4 years ago

flatsiedatsie commented 4 years ago

The Power Settings add-ons has a reboot functionality. I changed it to use the internal api, per your request. But it doesn't seem to work anymore?

window.API.postJson('/system/actions', {action: 'restartSystem'}).catch(console.error);

mrstegeman commented 4 years ago

Your URL is wrong. It should be /settings/system/actions.

(Sorry, just realized I told you wrong before.)

flatsiedatsie commented 4 years ago

No problem! The odd thing is it seemed to work before :-D