Automatiseringen binnen Home Assistant

Doel : Stuur een WOL pakket tijdsgestuurd naar een PC.

(Zet PC, in dit geval de KVM-QEMU server,  alléén aan als er een backup naar toe gestuurd wordt)

Op de Beelink GTR5 server worden de volgende scripts uitgevoerd (root@kvm:/# crontab –l)

 

Pas daarom onderstaande in HA via instellingen – Automatiseringen&Scenes aan door een automatisering toe te voegen. In de automations.yaml (via File editor) ziet dat er dan als volgt uit :

- id: '1644933606960'

  alias: Scheduled-WOL

  description: Verstuur tijdsafhankelijke WOL packages

  trigger:

  - platform: time

    at: 03:55

  condition:

  - condition: time

    weekday:

    - mon

  action:

  - service: wake_on_lan.send_magic_packet

    data:

      mac: 7C:83:34:B0:E6:8B

      broadcast_address: 255.255.255.255

      broadcast_port: 9

  mode: single

 

·        Waarbij 7C:83:34:B0:E6:8B dan het MAC-adres is van NIC1 van de Beelink GTR5 server

·        Hiervoor dient de automations.yaml wel ook nog ge-included als volgt te worden in de configuration.yaml : automation: !include automations.yaml

 

 

 

Virtuele installatie HASS.io (VMDK op QNAP VirtualizationSation)

The QNAP Virtualisation Station does not have Enable UEFI option, so I use the following steps to make it happens:

Requirement:

·        VirtualBox (of VMWorkstation verander naar IDE en EUFI volstaat, exporteer/importeer naar OVF) (PC/Mac)

·        Hassio image vmdk 25 / vdi 20

Steps:
In VirtualBox:

  1. Add Disk Image File (File > Virtual Media Manager > Add), select downloaded .vmdk or .vdi
  2. New Machine:

·        Name: hassio

·        Type: Other (Important)

·        Version: Other/Unkown 64-bit (Important)

·        Memory: 1024MB

·        Hard disk: select added hassio vmdk/vdi

  1. No need to start
  2. In created machine settings:

·        System:

o   Uncheck Floppy, Optical

o   Select Chipset: ICH9 (Important)

o   Extended Feature: check APIC, EFI, Hardware Clock (Important)

  1. Others not quite important
  2. Export Machine to .ovf (Machine > Export to OCI):

·        Select Format: Open Virtualisation Format 0.9 (Important)

·        Enter file, change from …ova to …ovf (Important)

·        Continue

·        .ovf, .vmdk and .mf files will be created separately

  1. done

 

 

In QNAP Virtualisation Station:

  1. Import VM

·        Import From: PC

·        Select created .ovf

  1. It will ask for disk image file, select created .vmdk
  2. Next
  3. Enter Info by your desired
  4. Advanced Settings:

·        CPU: i7

·        Network: Intel Gigabit Ethernet

·        Hard Disk:

o   Cache Mode: Writeback

o   Controller: IDE

  1. Import
  2. Done

Now the Hassio vm should now created and bootable!

I tried .ova format before, QNAP will return checksum error, so .ovf 0.9 version can avoid it.

Herstarten HASS binnen Web-GUI

Kies binnen Web-GUI in homepage voor File editor  in het linker menuvenster, vervolgens instellingen  rechtsboven en tot slot “Restart HASS”

Herstarten HASS host binnen Web-GUI

Kies binnen Web-GUI in homepage voor Supervisor – System – Host system - Reboot