Wakeonlan home assistant6/21/2023 Setting up such a system is not easy and requires some network knowledge. Of course, the system works only when there is an Internet connection. Based on the parameters in the file it performs a restart, or executes the requested command. In both cases the operation is always the same: HA regularly checks a JSON file uploaded to a site (Dropbox, Google Drive, or any freely accessible Internet site). I implemented in HA a kind of Watchdog and some basic commands in case of need. Therefore, I wanted to add a “backdoor” in case the VPN or component failed. The second house is in the mountains a few hours away, so it is not always convenient if there are problems with HA. Resilience (Watchdog and remote control Home Assistant) So you have to connect to the master instance by phone or via the Web and you can run command controls without having to “jump” back and forth between instances. One can also choose to bring back only what one is interested in. Thanks to the component you can integrate into the master instance everything that is on the other linked HAs, as if the entities, automations, etc. Previously you had to install the component only on the master instance, now you have to install it on all of them. The unofficial Remote Home-Assistant component allows multiple HA instances to be linked together. However, one has to keep making the “jump” between instances. If you want, you can terminate here, because the secondary home is reachable through the network. If you do not have a router with the VPN Wireguard you can make the direct connection between the two HA instances. The Wireguard addons allow me to create a tunnel between the secondary instance and my main router. Wireguardįirst we need a bidirectional link between the two HA instances. The secondary instance is independent and reasons on its own, but it sends all the information to the primary instance from that you can directly control everything. I have a second instance of HA on a Raspberry in the secondary house, internet is provided by a 4G modem that has a non-public IP address. I have one instance of Home Assistant (HA) in my primary home, this is the only instance I connect to to manage everything. I had already described some attempts in previous posts, here I collect the experience after more than a year of operation. Introĭue to the 2G shutdown in Switzerland, I had to change the heating management system of the second house in the mountains.Īfter some attempts for more than a year a working and resilient solution has been in operation. Thanks to the Wireguard addons I am able to avoid the fact that the 4G modem does not have a public IP address. Now, anytime you trigger the script to shutdown in Home Assistant, EventGhost would pick it up, and it would then shut down the computer.Taking advantage of the unofficial integration I connect two instances of Home Assistant to each other. After that, drag the event sent from Home Assistant and drop it between the Macro and the Action. Then select Force close of all programs and then click OK. You can create scripts in Home Assistant to trigger any of those options. You can have EventGhost lock the computer, reboot, shut it down, sign off or sleep. Under power, there are several options that you can select. Click on Add Macro, System, and then Power. In Home Assistant, trigger the script to turn off the computer. Save the changes, then go to the Configuration tab, Server Control and reload your scripts. This would be the payload that would be sent to EventGhost, which can then be used in a macro to turn off the computer. Then, we’re using the Join service to send the command to the computer, and for the data, we set up the command to shutdown. We named the script pc_off, which is what we set up earlier on the switch to turn on and off the computer.
0 Comments
Leave a Reply. |