Ebus: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Nick (Diskussion | Beiträge) |
Nick (Diskussion | Beiträge) (→ebus) |
||
| Zeile 14: | Zeile 14: | ||
ebusd -f -c /tmp --logareas bus --loglevel info --lograwdata=bytes | ebusd -f -c /tmp --logareas bus --loglevel info --lograwdata=bytes | ||
==Script read Register== | |||
[https://github.com/john30/ebusd/blob/master/contrib/scripts/readallvaillantregisters.sh 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 | |||
readallvaillantregisters.sh -a SLAVEADDRESS -p PORT | |||
Beispiel (in 08.log schreiben): | |||
readallvaillantregisters.sh -a 08 >> 08.log | |||
Version vom 10. Januar 2022, 17:04 Uhr
ebus
Anleitung installation:
Konfiguration:
vim /etc/default/ebusd service ebusd start cat /var/log/ebusd.log
Autostart daemon:
sudo update-rc.d ebusd enable
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"
ebusd -f -c /tmp --logareas bus --loglevel info --lograwdata=bytes
Script read Register
#!/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
readallvaillantregisters.sh -a SLAVEADDRESS -p PORT
Beispiel (in 08.log schreiben):
readallvaillantregisters.sh -a 08 >> 08.log