diff --git a/src/assets/HestiaClasses.js b/src/assets/HestiaClasses.js index e98ebb2..40fd24e 100644 --- a/src/assets/HestiaClasses.js +++ b/src/assets/HestiaClasses.js @@ -114,4 +114,18 @@ export class Communicator { } }); } + + // Send startup command + startup() { + this.send('hestia/command/startup', JSON.stringify({ + "publisher": "front" + })); + } + + // Send shutdown command + shutdown() { + this.send('hestia/command/shutdown', JSON.stringify({ + "publisher": "front" + })); + } } \ No newline at end of file diff --git a/src/assets/hestia.js b/src/assets/hestia.js index 71e9722..1c28ed4 100644 --- a/src/assets/hestia.js +++ b/src/assets/hestia.js @@ -61,6 +61,16 @@ export function togglePower(element) { refreshState(window.document, psState); } +export function startup() { + psState.startup(comms); + refreshState(window.document, psState); +} + +export function shutdown() { + psState.shutdown(comms); + refreshState(window.document, psState); +} + window.onload = function() { comms.init(psState, config); refreshState(window.document, psState); diff --git a/src/index.html b/src/index.html index a96f20a..7158592 100644 --- a/src/index.html +++ b/src/index.html @@ -64,6 +64,12 @@
+
+ +
+
+ +