Heater: Difference between revisions

From FlowerHouseWiki
Line 132: Line 132:
<p>Fist steps to enable data logging:</p>
<p>Fist steps to enable data logging:</p>
# Log in to the web interface
# Log in to the web interface
# Go to Setup and add to ''TTY Device'': <syntaxhighlight lang="Bash" inline>/dev/HeaterCOM</syntaxhighlight>
# Go to ''Setup'' and add to ''TTY Device'': <syntaxhighlight lang="Bash" inline>/dev/HeaterCOM</syntaxhighlight>
# Save and then click ''Init Messwerte''
# Save and then click ''Init Messwerte''
# Go to ''Aufzeichnung'' and select the values you like to record and store your selection and save
# Go to ''Aufzeichnung'' and select the values you like to record and store your selection and save
# Go to Setup and click 'Init Service Menü'
# Go to ''Setup'' and click 'Init Service Menü'


== Additional Configuration ==
== Additional Configuration ==

Revision as of 21:10, 21 February 2021

Froeling.jpg

Network


IP: 192.168.88.12
MAC: DA:62:17:83:4E:8F
Domain: heater.flowerhouse.at

System


OS: Debian Buster
RAM: 512MB
Cores: 1
Privileged: No

The Heater-LXC is reachable under 192.168.88.12 which is located in the ServerVLAN.

The subdomain is heater.flowerhouse.at which is handled by the ReverseProxy.

The Serial-IP-Konverter is reachable under 192.168.88.18 which is located in the ServerVLAN.

Basic Setup

Change locales to de_DE.UTF-8:

dpkg-reconfigure locales

libwebsockets

Install required packages:

apt install pkg-config cmake

Clone libwebsockets repo:

cd /usr/src
git clone https://libwebsockets.org/repo/libwebsockets

Create build directory:

cd libwebsockets
mkdir build

Run make to build libwebsockets:

cmake ..
make
make install

Create the necessary links and cache:

ldconfig

Delete unnecessary files:

cd /usr/src
rm -r libwebsockets

p4d daemon

Install required packages:

apt install build-essential libssl-dev libjansson-dev libxml2-dev libcurl4-openssl-dev libssl-dev libmariadbclient-dev libmariadb-dev-compat uuid-dev

Get p4d repo and build it:

cd /usr/src/
git clone https://github.com/horchi/linux-p4d/
cd linux-p4d
make clean all
make install

Create link for stylesheet:

ln -s /var/lib/p4/stylesheet-dark.css /var/lib/p4/stylesheet.css

Create database at DataBase and add credentials to p4d.conf:

nano /etc/p4d/p4d.conf

Start p4d:

systemctl start p4d

Serial-IP-Converter

Access the Serial-IP-Converter-UI under 192.168.88.18 with user: admin and pw: admin and set the UART-settings:

Serial settings.png

Connect to Serial-IP-Converter with:

socat pty,link=/dev/HeaterCOM,raw tcp:192.168.88.18:8899&

For it to connect at boot we have create an service:

nano /etc/systemd/system/socat.service

Add to file:

[Unit]
Description=SOCAT Listen Service
After=network.target redis.service
Wants=redis.service

[Service]
Type=simple
User=root
ExecStart=/bin/bash -c '/usr/bin/socat pty,link=/dev/HeaterCOM,raw tcp:192.168.88.18$
Restart=on-failure

[Install]
WantedBy=multi-user.target

Start and check if service is running:

systemctl start socat
systemctl status socat

Enable service to start at boot:

systemctl enable socat

Web Interface Setup

The default port of the web interface is 1111, the default username is p4 and the password is p4-3200.

Fist steps to enable data logging:

  1. Log in to the web interface
  2. Go to Setup and add to TTY Device: /dev/HeaterCOM
  3. Save and then click Init Messwerte
  4. Go to Aufzeichnung and select the values you like to record and store your selection and save
  5. Go to Setup and click 'Init Service Menü'

Additional Configuration

Mail

Sources