Home Assistent unter Promox VE installieren

Promox nach Standard installieren
pve shell aufrufen
Dieses script dort hin kopieren

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/vm/haos-vm.sh)"

Auswählen last stable eg 15.2

Version kann abweichen aber immer Stable
Virtual Machine ID, Machine Type so lassen
Write Through Disk Cache default

VM’s Hostname Empfehlung so lassen.
CPU Model ist Host

Anzahl Kerne 2
RAM 6 GB (Promox sollte eh auf min 32GB laufen)
Bridge, MAC Address, VLAN, MTU Size auf Standard lassen.
Start VM nach Installation -> Yes
Unbedingt auf die local-lvm instalieren!

Die Installation dauert c a 5 Minuten, danach auf der console anmelden.


Eingeben in Browser „http://IP:8123

Sonnen Batterie Integration

rest:
  - resource: http://192.168.1.xx:80/api/v2/latestdata
    method: GET
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json
      Auth-Token: DEIN TOKEN
    scan_interval: 60
    timeout: 15
    sensor:
      - name: solar_power_w
        value_template: '{{ value_json["Production_W"] }}'
        unit_of_measurement: W
        device_class: power
      - name: battery_soc
        value_template: '{{ value_json["USOC"] }}'
        unit_of_measurement: '%'
        device_class: battery
      - name: battery_consumption_production_diff
        value_template: '{{ value_json["Pac_total_W"] }}'
        unit_of_measurement: W
        device_class: power
      - name: house_consumption
        value_template: '{{ value_json["Consumption_W"] }}'
        unit_of_measurement: W
        device_class: power
      - name: battery_capacity
        value_template: '{{ value_json["FullChargeCapacity"] }}'
        unit_of_measurement: Wh
        device_class: energy
      - name: battery_soc_energy
        value_template: '{{ (value_json["USOC"]|float / 100 * value_json["FullChargeCapacity"]|float)|round(0)|int }}'
        unit_of_measurement: Wh
        device_class: energy 

Vielleicht aber auch über -> https://github.com/weltmeyer/ha_sonnenbatterie
   
   
Dem Sensor fehlt die Richtige state_class, device_class und die Einheit. Diese kannst über Customize beheben. Erstelle Dir in der configuration.yaml unterhalb der Zeile homeassistant die Zeile homeassistant: customize: !include customize.yaml Dann erstelle Dir im gleichen Verzeichnis, wo auch die configuration.yaml zu finden ist die Datei customize.yaml In diese Datei trägst Du dann für jeden Sensor einen Eintrag, nach diesem Schema: sensor.xyz_energy: state_class: total_increasing u… 

sensor.solaredge_aktuelle_leistung:
   device_class: Energy


sensor.sonnenbatterie_XXXXX_state_production:
   device_class: Energy

sensor.sonnenbatterie_97484_state_consumption_current:
   device_class: Energy

sensor.gartenhaus_total_ausgangsleistung:
   device_class: Energy

sensor.tibber_pulse_im_apfelgarten_11_einspeiseleistung:
   device_class: Energy

sensor.tibber_pulse_im_apfelgarten_11_leistung:
   device_class: Energy
Veröffentlicht unter Uncategorized | Schreib einen Kommentar

Installing Home Assistant Core on Ubuntu 22.04 (Promox VE)

sudo -s

Wichtig USB Bluethoth aktivieren (Promox)

Und im Ubuntu einschalten.

apt install bluetooth
apt install bluez libbluetooth-dev libudev-dev libcap2-bin

dpkg --configure -a
apt install -f
apt-get --fix-broken install
apt-get update --fix-missing
apt update && apt upgrade

add-apt-repository ppa:deadsnakes/ppa
apt update
apt install wget build-essential
apt install wget libncursesw5-dev
apt install wget libssl-dev

sudo apt-get install sqlite3 libsqlite3-dev
apt install wget tk-dev
apt install wget libgdbm-dev
apt install wget libc6-dev
apt install wget libbz2-dev
apt install wget libffi-dev
apt install wget zlib1g-dev
!!!!!!!!!!!!!!!!!!!!!!!!!!! Snapshot vor Python install !!!!!!!!!!!!!
apt install python3.13 python3.13-dev python3.13-venv python3-pip

 python3 --version

Change the first line in files “/usr/bin/pip” & “/usr/bin/pip3” to “#!/usr/bin/python3.13.3”
nano /usr/bin/pip
nano /usr/bin/pip3

apt install bluez
apt install libffi-dev
apt install libssl-dev
apt install libjpeg-dev
apt install zlib1g-dev
apt install autoconf
apt install build-essential
apt install libopenjp2-7
apt install libtiff6apt install libturbojpeg0-dev
apt install tzdata

apt install ffmpeg
apt install liblapack3
apt install liblapack-dev
apt install libatlas-base-dev  
--------------------------------------------------------------------------------

useradd -rm homeassistant -G dialout
mkdir /srv/homeassistant
chown homeassistant:homeassistant /srv/homeassistant
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3.13 -m venv .
source bin/activate
python3.13 -m pip install wheel
pip3 install homeassistant==2025.1.3
 
hass
   Create file (init.d script) “/etc/init.d/homeassistant”
sudo nano /etc/init.d/homeassistant

#!/bin/sh
# For Ubuntu:
# description: Home Assistant
# processname: hass

### BEGIN INIT INFO
# Provides:          hass
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Home Assistant service
# Description:       Home Assistant
### END INIT INFO

name="HomeAssistant"
pid_file="/var/run/$name.pid"

case "$1" in
    start)
		su - homeassistant -c '/srv/homeassistant/bin/python3.13
 /srv/homeassistant/bin/hass' &>/dev/null &
		echo $(pgrep python3.13) > "$pid_file"
		echo "Running with PID: $(pgrep python3.13)"
    ;;
    stop)
        echo -n "Stopping $name.."
        kill $(pgrep python3.13)
	rm "/var/run/$name.pid"

    ;;
    restart)
        stop
		start
    ;;
    status)
        if $(pgrep hass); then
            echo "Running with PID: $(pgrep python3.13)"
        else
            echo "$name is not running"
            exit 1
        fi

    ;;
    *)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac
exit 0

-> End File

sudo chmod 0755 /etc/init.d/homeassistant
sudo update-rc.d homeassistant defaults
reboot
service homeassistant status

 python --version
  • For Ubuntu 23.04-24.10sudo apt install libtiff6
  • For Ubuntu 14.04-22.04sudo apt install libtiff5
  • For Ubuntu 12.04-13.10sudo apt-get install libtiff4

Für den Start ohne Service

sudo -u homeassistant -H -s
cd /srv/homeassistant
python3.12 -m venv .
source bin/activate
hass

Update
pip3 install --upgrade homeassistant
sudo ufw allow 8123/tcp
hostname -I
http://localhost:8123
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/vm/haos-vm.sh)"

Contents

Update Phyton Version

Version überprüfen ***** did not work ****

python3 --version
sudo apt update && sudo apt upgrade -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
apt list | grep python3.13
sudo apt install python3.13
python3.13 --version

Update Home Assistent auf neue Phyton Version

Check ob alles io ist
sudo apt --fix-broken install
sudo apt install python3-minimal grub2-common
sudo python3 -m ensurepip --upgrade
sudo python3 -m pip install --upgrade pip
sudo apt update && sudo apt upgrade
sudo apt autoremove --purge
sudo apt clean

--------------------------------------------------------------------------------
sudo -s
cd /home/homeassistant/.homeassistant
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 freeze –local > requirements-2024.12.txt
exit
To create the backup do the following:

Stop your HASS instance:

service homeassistant status
service homeassistant stop

Go to the SRV folder, and copy the homeassistant program directory to your backup folder:

cd /srv
sudo mv homeassistant homeassistantold-20241226

sudo mkdir homeassistant
sudo chown -R homeassistant:homeassistant homeassistant
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3.13 -m venv .

Konfiguration

Einbinden der Sonnen Batterie

rest:
  - resource: http://192.168.1.xx:80/api/v2/latestdata    <--- 
    method: GET
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json
      Auth-Token: DEIN TOKEN             <---------------
    scan_interval: 60
    timeout: 15
    sensor:
      - name: solar_power_w
        value_template: '{{ value_json["Production_W"] }}'
        unit_of_measurement: W
        device_class: power
      - name: battery_soc
        value_template: '{{ value_json["USOC"] }}'
        unit_of_measurement: '%'
        device_class: battery
      - name: battery_consumption_production_diff
        value_template: '{{ value_json["Pac_total_W"] }}'
        unit_of_measurement: W
        device_class: power
      - name: house_consumption
        value_template: '{{ value_json["Consumption_W"] }}'
        unit_of_measurement: W
        device_class: power
      - name: battery_capacity
        value_template: '{{ value_json["FullChargeCapacity"] }}'
        unit_of_measurement: Wh
        device_class: energy
      - name: battery_soc_energy
        value_template: '{{ (value_json["USOC"]|float / 100 * value_json["FullChargeCapacity"]|float)|round(0)|int }}'
        unit_of_measurement: Wh
        device_class: energy    

Pirate Weather

sudo apt install git
sudo -s
git clone https://github.com/Pirate-Weather/pirate-weather-ha
cd /home/homeassistant/.homeassistant
mkdir custom_components
cd custom_components
mkdir pirateweather
cd pirateweather
sudo cp -r pirate-weather-ha/custom_components/* /home/homeassistant/.homeassistant/custom_components
Veröffentlicht unter Installation, Troubleshooting | Verschlagwortet mit , | Kommentare deaktiviert für Installing Home Assistant Core on Ubuntu 22.04 (Promox VE)

Plasticity wie geht was

Solid löschen -> Mit der linken Maustaste markieren dann Taste X löscht es

Veröffentlicht unter 3D CAD, Anleitungen | Verschlagwortet mit | Kommentare deaktiviert für Plasticity wie geht was

Installation RustDesk

Ubuntu Server installieren
OpenSSH mit installieren

Server Desktop installieren
sudo apt update && sudo apt upgrade

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade


sudo reboot
Display Manager installieren
sudo apt install lightdm
sudo apt install ubuntu-desktop
Falls wir während der Installation gefragt werden, welchen Display Manager wir verwenden möchten, wählen wir hier lightdm aus.
sudo reboot
Partitions Manager
GParted per Verwaltung installieren. Wir benötigt um Festplatten für Timeshift vorzubereiten.
sudo apt-get install gparted
sudo apt-get install timeshift

Contents

Installation Server
Firewall Einstellungen

sudo ufw allow 21114:21119/tcp
sudo ufw allow 8000/tcp
sudo ufw allow 21116/udp
sudo ufw enable

Status Firewall sudo ufw status

Node js installation
sudo apt install nodejs
sudo apt install npm
sudo apt install curl

Install pm2
sudo npm install pm2 -g

wget https://raw.githubusercontent.com/techahold/rustdeskinstall/master/install.sh
chmod +x install.sh
./install.sh

Packet Installation sudo apt-get -f rustdesk-server-hbbr_1.1.14_amd64.deb
sudo dpkg -i rustdesk-server-hbbr_1.1.14_amd64.deb
sudo dpkg -i rustdesk-server-hbbs_1.1.14_amd64.deb

./hbbs
./hbbr

pm2 start hbbs
pm2 start hbbr
Check PM2 pm2 list
pm2 save
pm2 startup

Ip Adresse: hostname -I

Restart Server:
sudo systemctl restart rustdesksignal
sudo systemctl restart rustdeskrelay

Client Installationen

192.168.xx.xx:8000 ruft die install scripte auf
Windows client installieren
Power Shell starten als Administrator
How to Enable windowsagentaioinstall.ps1
# Get-ExecutionPolicy-List
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
./WindowsAgentAIOInstall.ps1

sudo snap install curl
Linux install via script
Achtung bei MX-Linux bootoption auf systemctl umstellen.
chmod +x linuxclientinstall.sh
sudo ./linuxclientinstall.sh

Autostart Linux client
sudo systemctl enable rustdesk

Ubuntu wayland ausschalten
sudo nano /etc/gdm3/custom.conf
Um den Fehler zu beseitigen die Datei /etc/gdm3/custom.conf editieren

[daemon] # Enabling automatic login AutomaticLoginEnable=true AutomaticLogin=$USERNAME (mit dem Anmeldenamen ersetzen) # Uncomment the line below to force the login screen to use Xorg WaylandEnable=false

Uninstall AnyDesk

sudo apt-get purge anydesk
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt update
sudo apt list --upgradable
sudo apt upgrade -y

Uninstall Teamvievwer

Überprüfen ob installiert
dpkg -l | grep teamviewer
sudo apt-get remove teamviewer
sudo apt autoremove

Upgrade client

Update Windows in Administrator PowerShell
winget install rustdesk.rustdesk

Update on MAC OS
/bin/bash -c „$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)“


brew upgrade rustdesk

Update Linux
sudo apt-get install build-essential procps curl file git
Install Hombrew
/bin/bash -c „$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)“

sudo dpkg -i rustdesk-1.3.9-x86_64.deb


test -d ~/.linuxbrew && eval „$(~/.linuxbrew/bin/brew shellenv)“
test -d /home/linuxbrew/.linuxbrew && eval „$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)“
echo „eval \“\$($(brew –prefix)/bin/brew shellenv)\““ >> ~/.bashrc

Veröffentlicht unter Anleitungen, Installation | Verschlagwortet mit | Kommentare deaktiviert für Installation RustDesk

Was mache ich wie in Fusion 360 <> FreeCad

Schale erstellen Fusion 360

Schale erstellen FreeCad

Veröffentlicht unter 3D CAD | Verschlagwortet mit , , | Kommentare deaktiviert für Was mache ich wie in Fusion 360 <> FreeCad

Meine FreeCad Einrichtung 1.0.0

Start -> Helles Thema wählen
Datei neu wählen
Werkzeuge -> Add-on Manager OpenThemes installieren
Bearbeiten Einstellungen-> Applikation einstellen OpenLight
Beim Apfel auf FreeCad -> Einstellungen
FreeCad neu Starten dann nochmal Einstellungen
OpenPreferences anwenden Anzeige FreeCad neu starten
Anzeige BIM ignorieren und Start nochmal weg x en.
Einstellungen -> Arbeitsbereiche abwählen

BIM
FEM
CAM
MESH
Surface
Anwenden und OK
Einstellungen Sketcher Raster EIN
Neu Starten
Neue Datei und einen Grundkörper Einfügen
Fenster Links und Rechts Überlagerung Modus umschalten
Ausgabefenster unter Ansicht Fenster -> Ausgabefenster nach rechts ziehen.

Symbolleisten entsperren Rechtsklick in die Symbolleiste und hacken sperren entfernen

Veröffentlicht unter 3D CAD, Anleitungen, Installation | Verschlagwortet mit | Kommentare deaktiviert für Meine FreeCad Einrichtung 1.0.0

WordPress auf anderen Server einrichten

FTP Server installieren
sudo apt install vsftpd
Hostnamen ermitteln -> hostnamectl

MySql Server installieren
sudo apt install mysql-server
Status überprüfen -> sudo service mysql status QUIT mit der Eingabe q
Netzwerkstatus -> sudo ss -tap | grep mysql
Die Datei /etc/mysql/
/etc/mysql/mysql.conf.d/mysqld.cnf den Bind Eintrag anpassen auf die Server IP
bind-address = 192.168.0.5

DBeaver ce Installieren

sudo snap install curl

Abhängigkeiten Installieren
sudo apt update
sudo apt install apache2 \
ghostscript \
libapache2-mod-php \
php \
php-bcmath \
php-curl \
php-imagick \
php-intl \
php-json \
php-mbstring \
php-mysql \
php-xml \
php-zip

Install WordPress

sudo mkdir -p /srv/www
sudo chown www-data: /srv/www
curl https://wordpress.org/latest.tar.gz | sudo -u www-data tar zx -C /srv/www

Create Apache site for WordPress. Create /etc/apache2/sites-available/wordpress.conf with following lines:

cd /etc/apache2/sites-available
$ sudo nano wordpress.conf

<VirtualHost *:80>
    DocumentRoot /srv/www/wordpress
    <Directory /srv/www/wordpress>
        Options FollowSymLinks
        AllowOverride Limit Options FileInfo
        DirectoryIndex index.php
        Require all granted
    </Directory>
    <Directory /srv/www/wordpress/wp-content>
        Options FollowSymLinks
        Require all granted
    </Directory>
</VirtualHost>


sudo a2ensite wordpress
systemctl reload apache2
sudo a2enmod rewrite
systemctl reload apache2
sudo a2dissite 000-default
systemctl reload apache2
sudo service apache2 reload

Configure database

$ sudo mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0,00 sec)

mysql> CREATE USER wordpress@localhost IDENTIFIED BY '<your-password>';
Query OK, 1 row affected (0,00 sec)

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
    -> ON wordpress.*
    -> TO wordpress@localhost;
Query OK, 1 row affected (0,00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 1 row affected (0,00 sec)

mysql> quit
Bye


Enable MySQL with -> sudo service mysql start

sudo -u www-data cp /srv/www/wordpress/wp-config-sample.php /srv/www/wordpress/wp-config.php


Next, set the database credentials in the configuration file (do not replace database_name_here or username_here in the commands below. Do replace <your-password> with your database password.):

sudo -u www-data sed -i ’s/database_name_here/wordpress/‘ /srv/www/wordpress/wp-config.php

sudo -u www-data sed -i ’s/username_here/wordpress/‘ /srv/www/wordpress/wp-config.php


sudo -u www-data sed -i ’s/password_here//‘ /srv/www/wordpress/wp-config.php

sudo -u www-data nano /srv/www/wordpress/wp-config.php
Find the following:
define( ‚AUTH_KEY‘, ‚put your unique phrase here‘ );
define( ‚SECURE_AUTH_KEY‘, ‚put your unique phrase here‘ );
define( ‚LOGGED_IN_KEY‘, ‚put your unique phrase here‘ );
define( ‚NONCE_KEY‘, ‚put your unique phrase here‘ );
define( ‚AUTH_SALT‘, ‚put your unique phrase here‘ );
define( ‚SECURE_AUTH_SALT‘, ‚put your unique phrase here‘ );
define( ‚LOGGED_IN_SALT‘, ‚put your unique phrase here‘ );
define( ‚NONCE_SALT‘, ‚put your unique phrase here‘ );

Delete those lines (ctrl+k will delete a line each time you press the sequence). Then replace with the content of https://api.wordpress.org/secret-key/1.1/salt/. (This address is a randomiser that returns completely random keys each time it is opened.) This step is important to ensure that your site is not vulnerable to “known secrets” attacks.

Save and close the configuration file by typing ctrl+x followed by y then enter

Das bedeutet die Zeilen define(‚AUTH_KEY …. bis define(‚NONCE -> löschen und mit der ausgabe von https://api.wordpress.org/secret-key/1.1/salt/ ersetzen.

Einfacher jedoch mit dem Texteditor da Nano eine eigene Zwischenablage hat.



Veröffentlicht unter Installation | Verschlagwortet mit | Kommentare deaktiviert für WordPress auf anderen Server einrichten

CMOS Batterie tauschen Terra PC Nettop

Anleitung zum Austausch der CMOS Batterie im Terra PC Model 1008073

Leider ist die CMOS Batterie unter der Laufwerks Abdeckung angebracht. Der Stecker ist ohne gesamt Öffnung der Gehäuses nicht erreichbar. Die Batterie ist echt stark mit Kleber befestig.

Danke fürs anschauen.
Veröffentlicht unter Anleitungen | Verschlagwortet mit , , | Kommentare deaktiviert für CMOS Batterie tauschen Terra PC Nettop

PID-Tuning mit Octoprint

Durcker verbinden und auf Terminal drücken.

Kopieren Sie folgenden GCode „M303 E0 S230 C8“ in das Eingabefeld. E steht in diesem Fall für ihren Extruder, S für die zu erreichende Temperatur und C für die Anzahl der Zyklen die durchlaufen werden sollen.

Sollte es zu einer Fehlermeldung kommen Bad heater id in PiD tuning bed erst mal eine andere Extrudernummer Versuche -> E1. Sollte es immer noch zu einer Fehlermeldung kommen, dann bitte die Configuration.h kontrollieren. Sollte MPC aktiviert sein, kommt es ach zu Fehlermeldung.

Nun durchläuft ihr 3D-Drucker 8 Zyklen Aufheizphase, um die optimalen Werte zu ermitteln.

Nach dem achten Durchlauf wird ihnen folgendes in Octoprint ausgegeben: Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h. Diese 3 Werte bauen sie sich wie folgt als Befehlscode um: „M301 P15.36 I1.43 D41.20“ und kopieren diese Zeile in das Eingabefeld von Octoprint und bestätigen es. Mit „M500“ werden die neuen Werte im Eeprom abgespeichert. Das war es auch schon mit dem PID-Tuning für ihr Hotend.

Nicht vergessen mit M500 abspeichern.

Wer gerne möchte, kann es auch mit Pronterface erledigen.

PID-Tuning Heizbett mit Octoprint

Wer es gerne möchte kann es auch mit Pronterface erledigen

M303 E-1 S70 C5
Richtig für PLA
Ausgabe

#define DEFAULT_bedKp 59.40
#define DEFAULT_bedKi 11.47
#define DEFAULT_bedKd 205.12

Daraus ergibt sich dann:
M304 E-1 P59.40 I11.47 D205.12
Nicht Vergessen mit M500 speichern.

#PIDTEMPBED in Configuration.h was disabled

Veröffentlicht unter Uncategorized | Kommentare deaktiviert für PID-Tuning mit Octoprint

Hardware Firewall (Sophos SG105 rev.2)

Da ich immer wieder sehr massiv aus dem Internet angegriffen werde habe ich mich dazu entschieden eine HW Firewall zu installieren.


Als erstes muss man sich Gedanken machen wie die IPs konfiguriert werden sollen. Es sind natürlich zwei getrennte Bereiche und die WAN Seite kann auch nicht als Privates Netz konfiguriert werden. Ich möchte natürlich nicht mein jetzt bestehendes Netzwerk (IPs) umkonfigurieren das wäre ein riesiger Aufwand. Ich denke, ich werde der FritzBox eine neue IP vergeben.

IP FritzBox 192.168.xx.1
Internes Netzwerk 192.168.xxx.1 DHCP bleibt erstmal auf der QNAP
Als DNS nehmen wir estmal die von der Telekom
217.237.150.205
217.237.149.142

Veröffentlicht unter Anleitungen, Installation | Verschlagwortet mit , , , | Kommentare deaktiviert für Hardware Firewall (Sophos SG105 rev.2)