Ebus: Unterschied zwischen den Versionen

Aus Nicki Wiki
Zur Navigation springen Zur Suche springen
 
(16 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 4: Zeile 4:


Konfiguration:
Konfiguration:
  vim /etc/default/ebusd
  sudo vim /etc/default/ebusd
  service ebusd start
 
EBUSD_OPTS="--scanconfig=full -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --httpport=8889 --htmlpath=/var/ebusd/html --accesslevel=* --answer --mqtthost=localhost --mqttport=1883 --mqttjson"
oder
  EBUSD_OPTS="--scanconfig=full -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --accesslevel=* --answer --mqtthost=10.0.0.20 --mqttport=1883 --mqttuser=mqtt-user --mqttpass=mqtt-pass987 --mqttjson --configpath=/etc/openhab2/ebusd-configuration/ebusd-2.1.x/de"
oder
EBUSD_OPTS="--scanconfig=full -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --accesslevel=* --answer --mqtthost=10.0.0.20 --mqttport=1883 --mqttuser=mqtt-user --mqttpass=mqtt-pass987 --mqttjson --configpath=/etc/openhab2/ebusd-configuration/latest"
Autostart daemon:
sudo systemctl enable ebusd
Start:
sudo service ebusd start
Log:
  cat /var/log/ebusd.log
  cat /var/log/ebusd.log
Test:
ebusd -f -c /tmp --logareas bus --loglevel info --lograwdata=bytes
== Service ==
sudo systemctl start ebusd
sudo systemctl stop ebusd
sudo systemctl restart ebusd
sudo systemctl status ebusd
== Befehle ==
ebusctl info
ebusctl find


Autostart daemon:
==Script Vaillant==
sudo update-rc.d ebusd enable
Skript um Vaillant Register zu lesen.<br>
[https://github.com/john30/ebusd/blob/master/contrib/scripts/readallvaillantregisters.sh readallvaillantregisters.sh]


  /usr/bin/ebusd --pidfile /var/run/ebusd.pid -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --scanconfig=full --httpport=8889 --htmlpath=/var/ebusd/html --accesslevel=* --answer --mqtthost=localhost --mqttport=1883 --mqttjson
  #!/bin/bash
port=8888
if [ "x$1" = "x-p" ]; then
  shift
  port=$1
  shift
fi
addr=08
if [ "x$1" = "x-a" ]; then
  shift
  addr=$1
  shift
fi
for (( i=0; i<512; i++ )) ; do
  h=`printf "%4.4X" $i`
  ret=`echo "hex ${addr}b509030d${h##??}${h%%??}"|nc -q 1 localhost $port|head -n 1`
  echo $i "=" $ret
done
Befehl um Slave Adressen zu erfahren:
ebusctl scan result
readallvaillantregisters.sh skript:
readallvaillantregisters.sh -a SLAVEADDRESS -p PORT
Beispiel (in 08.log schreiben):
readallvaillantregisters.sh -a 08 >> 08.log

Aktuelle Version vom 23. Februar 2025, 06:22 Uhr

ebus

Anleitung installation:

Konfiguration:

sudo vim /etc/default/ebusd
EBUSD_OPTS="--scanconfig=full -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --httpport=8889 --htmlpath=/var/ebusd/html --accesslevel=* --answer --mqtthost=localhost --mqttport=1883 --mqttjson"

oder

EBUSD_OPTS="--scanconfig=full -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --accesslevel=* --answer --mqtthost=10.0.0.20 --mqttport=1883 --mqttuser=mqtt-user --mqttpass=mqtt-pass987 --mqttjson --configpath=/etc/openhab2/ebusd-configuration/ebusd-2.1.x/de"

oder

EBUSD_OPTS="--scanconfig=full -d /dev/ttyEBUS -p 8888 -l /var/log/ebusd.log --accesslevel=* --answer --mqtthost=10.0.0.20 --mqttport=1883 --mqttuser=mqtt-user --mqttpass=mqtt-pass987 --mqttjson --configpath=/etc/openhab2/ebusd-configuration/latest"

Autostart daemon:

sudo systemctl enable ebusd

Start:

sudo service ebusd start

Log:

cat /var/log/ebusd.log

Test:

ebusd -f -c /tmp --logareas bus --loglevel info --lograwdata=bytes

Service

sudo systemctl start ebusd
sudo systemctl stop ebusd
sudo systemctl restart ebusd
sudo systemctl status ebusd

Befehle

ebusctl info
ebusctl find

Script Vaillant

Skript um Vaillant Register zu lesen.
readallvaillantregisters.sh

#!/bin/bash
port=8888
if [ "x$1" = "x-p" ]; then
  shift
  port=$1
  shift
fi
addr=08
if [ "x$1" = "x-a" ]; then
  shift
  addr=$1
  shift
fi
for (( i=0; i<512; i++ )) ; do
  h=`printf "%4.4X" $i`
  ret=`echo "hex ${addr}b509030d${h##??}${h%%??}"|nc -q 1 localhost $port|head -n 1`
  echo $i "=" $ret
done

Befehl um Slave Adressen zu erfahren:

ebusctl scan result

readallvaillantregisters.sh skript:

readallvaillantregisters.sh -a SLAVEADDRESS -p PORT

Beispiel (in 08.log schreiben):

readallvaillantregisters.sh -a 08 >> 08.log