!!! HomeAssistant

!! Resources
* [Integrations|https://www.home-assistant.io/integrations/?brands=featured]

!! Install procedure

Boot the HP thin client from an Ubuntu Desktop 24.04 usb, and then [follow this procedure|https://www.home-assistant.io/installation/generic-x86-64#method-1-installing-haos-via-ubuntu-booting-from-a-usb-flash-drive] to install the HA-OS to the built-in SSD. \\
Then simply remove the USB and reboot.  \\
You get a HomeAssistant prompt on console 1, and a root prompt on console 6 (just press enter) \\
The web console is available at [http://192.168.2.8:8123], first create a user.

!! Customization

* Add [DSMR integration|https://www.home-assistant.io/integrations/dsmr/] and plug a P1 usb meter in the HP thin client. Also you can enable some initially disabled entities, like voltages and current. You can entities from this integration to the energy dashboard.
* Add the Frontier Silicon integration, that should allow operating the Imperial DABMan internet radio.
* Install the Mobile App integration (or was it already present after vanilla install?), anyway, you should be able to add your phone, but using the HomeAssistant app on your phone.
* Install the SolarEdge integration. Also add this in the energy dashboard. You do need an API key, I got that straight away as a reply on a mail to mail solar installer SolarHVT. Zie ook [deze instructies|https://helpdesk.homewizard.com/nl/articles/6120664-hoe-koppel-ik-mijn-solaredge-omvormer]
* Create an empty dashboard ("Rommel"), here you can add stuff (you cannot add stuff to the default set of dashboards)
* arrange firewalling via the raspberry pi by:
** adding one POSTROUTING rule:\\ {{{iptables -t nat -A POSTROUTING -p tcp -d 192.168.2.8 --dport 8123 -j SNAT --to-source 192.168.2.19}}}\\
** adding another forward rule:\\ {{{iptables -A FORWARD -p tcp -d 192.168.2.8 --dport 8123 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT}}}
** add an extra nat rule to the knockd config:
{{{
[options]
	UseSyslog

[openALL]
	sequence    = 4381, 3090, 9672
	seq_timeout = 5
	command     = /sbin/iptables -I INPUT -s %IP% -p tcp -j ACCEPT;/sbin/iptables -t nat -A PREROUTING -p tcp --dport 8123 --source %IP% -j DNAT --to-destination 192.168.2.8:8123
	tcpflags    = syn

[closeALL]
	sequence    = 9672, 3090, 4381
	seq_timeout = 5
	command     = /sbin/iptables -D INPUT -s %IP% -p tcp -j ACCEPT;/sbin/iptables -t nat -D PREROUTING -p tcp --dport 8123 --source %IP% -j DNAT --to-destination 192.168.2.8:8123
	tcpflags    = syn
}}}
* install [HACS|https://hacs.xyz/] (Home Assistant Community Store 
* enable ssh root access to the ha host:
** basically copying your ssh public key to /root/.ssh/authorized_keys. The root console is on serial console 6, just enter root, not password is asked. Then I used the ha webterminal to copy/paste my public key to a file called "aap", did a {{find / -name aap}}, and found out which actual from the host file system it was, then simply copy the contents: {{cat aap >/root/.ssh/authorized_keys}}.
** Then the DropBear ssh daemon needs to be enabled/started: {{systemctl start dropbear && systemctl enable dropbear}}
** You can then ssh from your workstation to ha with {{ssh root@192.168.2.8}}, and ther you are :-)


!! TODO

* integration of klikaan klikuit
* [ssh to the root OS|https://community.home-assistant.io/t/howto-how-to-access-the-home-assistant-os-host-itself-over-ssh/263352]
* heatpump integration for BOSCH easycontrol thermostat, see [https://github.com/cpmarvin/boscheasycontrol/tree/main], [https://console.eu1.bosch-iot-rollouts.com/]