Opublikowany 2024-12-04 13:27:11 UTC przez: Redaktor

Homeassistant - jak uruchomić bash

Aby dostać się do powłoki bash:

Wpisz "login" w wierszu poleceń ha, a otrzymasz powłokę roota.

ha > login

i już

 

https://forum.proxmox.com/threads/guide-install-home-assistant-os-in-a-vm.143251/

So just like my other guide, this is more for my own records so I can come back and refer to it.

I know there are scripts for these things, but I prefer doing them manually so I can learn along the way.

Maybe it can help someone else in the future.



Obtain the VM image

- Navigate to the installation page on the HA website: https://www.home-assistant.io/installation/alternative

- Simply right-click the KVM/Proxmox link and copy the address

- In your Proxmox console, use wget to download the file

Bash:
wget <ADDRESS>


- Expand the compressed image

Bash:
unxz </path/to/file.qcow2.xz>




Create the VM

General:
- Select your VM name and ID
- Select 'start at boot'

OS:
- Select 'Do not use any media'

System:
- Change 'machine' to 'q35'
- Change BIOS to OVMF (UEFI)
- Select the EFI storage (typically local-lvm)
- Uncheck 'Pre-Enroll keys'

Disks:
- Delete the SCSI drive and any other disks

CPU:
- Set minimum 2 cores

Memory:
- Set minimum 4096 MB

Network:
- Leave default unless you have special requirements (static, VLAN, etc)


Confirm and finish. Do not start the VM yet.



Add the image to the VM

- In your node's console, use the following command to import the image from the host to the VM

Bash:
qm importdisk <VM ID> </path/to/file.qcow2> <EFI location>


For example,

Bash:
qm importdisk 205 /home/user/haos_ova-12.0.qcow2 local-lvm



- Close the node's console and select your HA VM

- Go to the 'Hardware' tab

- Select the 'Unused Disk' and click the 'Edit' button

- Check the 'Discard' box if you're using an SSD then click 'Add'

- Select the 'Options' tab

- Select 'Boot Order' and hit 'Edit'

- Check the newly created drive (likely scsi0) and uncheck everything else


Finish Up

- Start the VM

- Check the shell of the VM. If it booted up correctly, you should be greeted with the link to access the Web UI.

- Navigate to <VM IP>:8123

Done. Everything should be up and running now.

 

https://community.home-assistant.io/t/is-sonoff-spm-supported/402159

eg.: for my tuya integration
to find entry_id:
To find it, go to Developer Tools → Services. Choose the desired service and select your integration from dropdown. Then switch to YAML mode to see entry_id .

 
alias: Reload Tuya every 2 Minutes
description: ""
trigger:
  - platform: time_pattern
    minutes: "2"
condition: []
action:
  - service: homeassistant.reload_config_entry
    data:
      entry_id: eba1xxx2eb04ef265bdbfdbdxx14bexx
mode: single
Powrót do Listy artykułów