eBus Schaltung in Betrieb nehmen

Begonnen von Reinhart, 23 Dezember 2015, 15:19:45

Vorheriges Thema - Nächstes Thema

amunra

Gerne.
Dann kann es hier weiter gehen.
Viele Grüße
Arthur

christianh

irgendwie wills bei mir nicht....

(//)

amunra

#287
etwas mit deinem ebus(d) stimmt noch nicht.
was liefert ein (Kommando in der Konsole/im Terminal):
ebusctl r -f -c bai OutdoorstempSensor
Viele Grüße
Arthur

EDIT: Bitte auch noch:
ebusctl i
hier posten.

christianh


pi@raspberrypi ~ $ ebusctl r -f -c bai OutdoorstempSensor
3.25;ok

pi@raspberrypi ~ $ ebusctl i
version: ebusd 2.0.f5e218e
signal: acquired
symbol rate: 57
masters: 4
messages: 556
address 03: master #3
address 08: slave #3, scanned "MF=Vaillant;ID=BAI00;SW=0703;HW=7401", loaded "vaillant/08.bai.HW7401.csv"
address 10: master #6
address 15: slave #6, scanned "MF=Vaillant;ID=47000;SW=0420;HW=1403", loaded "vaillant/15.470.csv"
address 50: slave, scanned "MF=Vaillant;ID=V6100;SW=0418;HW=1902", loaded "vaillant/50.v61.csv"
address ff: master #25

amunra

etwas passt hier nicht zusammen, bitte ein log mit level 5 hier vom entsprechenden Zeitpunkt posten.
attr ebus1 verbose 5
Viele Grüße
Arthur

christianh

leider weiß ich nicht wie das geht....
(//)

amunra

jetzt nur noch in das fhem.log schauen und hier den entsprechenden Zeitraum (etwas davon und danach) hier posten.
Viele Grüße
Arthur

ms_9

#292
Vorschlag zur Überwachung des PRG's "ebusd" per cron:

Neue Datei im home-Verzeichnis erzeugen:
$ nano ~/ebusd_check.sh

Nachfolgenden Code eingeben:

#!/bin/bash
if [ ! "$(pidof ebusd)" ]
then
  sudo /etc/init.d/ebusd start &
fi


Mit CTRL-X beenden und mit "j" bestätigen.

Datei ausführbar machen:
$ chmod +x ~/ebusd_check.sh

Cronjob einrichten:
$ crontab -e

Folgende Zeile hinzufügen:
* * * * * /home/pi/ebusd_check.sh > /dev/null

Jetzt wird jede Minute das Vorhandensein des Prozesses "ebusd" geprüft. Wenn das
Programm aus irgendeinem Grund gestoppt wurde, erfolgt der Neustart.

amunra

#293
Hallo ms_9,
eine Lösung mit dem Watchdog wurde hier schon beschrieben.
Mit dem Cronjob geht es natürlich auch. ;o)
Viele Grüße
Arthur

Prof. Dr. Peter Henning

Das macht der eingebaute Watchdog des Raspberry Pi viel besser.
Dazu muss nur ein entsprechendes Skript nach /etc/watchdog.d geschrieben werden:.


#!/bin/sh
# description: watchdog helper file for ebusd 

case "$1" in
'test')
        #--- Test for ebusd
        if [ -s /var/run/ebusd.pid ] ; then
            RUN=`ps -ef | grep ebusd.*USB0 | grep -v grep`
            if [ "$RUN" != "" ] ; then           
               exit 0
            else
               echo "ebusd defunct at "`date`
               exit 1   
            fi
        else
            echo "ebusd not running, return 1 at "`date`
            exit 1   
        fi
        ;;
"repair")
        #-- Restarting ebusd
        echo "ebusd restarting at "`date`
        /etc/init.d/ebusd start
        RETVAL=$?
        exit 0
        ;;
*)
        exit 0
        ;;
esac


LG

pah

ms_9

@amunra,pah:
Soll nur ein Vorschlag sein  8)  und ist für Anfänger vermutlich eine sehr einfache Möglichkeit der PRG-Überwachung.

Es spricht ja nichts gegen den Hardware-Watchdog des pi, setzt aber noch einige weitere Kenntnisse und Einstellungen im System vorraus  ;)

christianh

2016.01.24 12:51:00 1: Including fhem.cfg
2016.01.24 12:51:00 3: telnetPort: port 7072 opened
2016.01.24 12:51:00 3: WEB: port 8083 opened
2016.01.24 12:51:00 3: WEBphone: port 8084 opened
2016.01.24 12:51:00 3: WEBtablet: port 8085 opened
2016.01.24 12:51:00 2: eventTypes: loaded 163 events from ./log/eventTypes.txt
2016.01.24 12:51:00 3: Opening TCM_ESP2_0 device /dev/ttyUSB0
2016.01.24 12:51:00 3: Setting TCM_ESP2_0 serial parameters to 9600,8,N,1
2016.01.24 12:51:00 3: TCM_ESP2_0 device opened
2016.01.24 12:51:01 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 12:51:01 3: GAEBUS device opened (ebus1)
2016.01.24 12:51:01 2: called GAEBUS_Attr(set,ebus1,userattr,<r~08.bai.HW7401~OutdoorstempSensor~d.47_Außentemperaturfühler r~15.470~OutsideTemp~Außentemp._Sensor>)
2016.01.24 12:51:01 2: called GAEBUS_Attr(set,ebus1,disable,<0>)
2016.01.24 12:51:01 2: called GAEBUS_Attr(set,ebus1,ebusWritesEnabled,<1>)
2016.01.24 12:51:01 2: called GAEBUS_Attr(set,ebus1,r~08.bai.HW7401~OutdoorstempSensor~d.47_Außentemperaturfühler,<Aussenfühler>)
2016.01.24 12:51:01 2: called GAEBUS_Attr(set,ebus1,r~15.470~OutsideTemp~Außentemp._Sensor,<Aussentemperatur>)
2016.01.24 12:51:01 2: called GAEBUS_Attr(set,ebus1,verbose,<5>)
2016.01.24 12:51:01 1: Including ./log/fhem.save
2016.01.24 12:51:01 3: WARNING: unsupported character in reading Aussenfühler (not A-Za-z/\d_\.-), notify the GAEBUS module maintainer.
2016.01.24 12:51:01 1: /dev/ttyUSB0 disconnected, waiting to reappear (TCM_ESP2_0)
2016.01.24 12:51:01 3: TCM set TCM_ESP2_0 reset
2016.01.24 12:51:01 2: TCM TCM_ESP2_0 No FD
2016.01.24 12:51:01 3: TCM get TCM_ESP2_0 baseID
2016.01.24 12:51:01 2: TCM TCM_ESP2_0 No FD
2016.01.24 12:51:01 2: TCM TCM_ESP2_0 initialized
2016.01.24 12:51:01 1: usb create starting
2016.01.24 12:51:02 3: Probing CUL device /dev/ttyAMA0
2016.01.24 12:51:02 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.01.24 12:51:02 3: Probing FRM device /dev/ttyAMA0
2016.01.24 12:51:08 1: usb create end
2016.01.24 12:51:08 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2016.01.24 12:51:08 0: Featurelevel: 5.7
2016.01.24 12:51:08 0: Server started with 12 defined entities (fhem.pl:10582/2016-01-21 perl:5.014002 os:linux user:fhem pid:2611)
2016.01.24 12:51:11 4: ebus1 start GetUpdates2
2016.01.24 12:51:11 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 12:51:11 3: GAEBUS device opened (ebus1)
2016.01.24 12:51:11 5: ebus1 GetUpdates: Aussenfühler:1

2016.01.24 13:25:16 4: ebus1 start GetUpdates2
2016.01.24 13:25:16 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 13:25:16 3: GAEBUS device opened (ebus1)
2016.01.24 13:25:16 5: ebus1 GetUpdates: Aussenfühler:1
2016.01.24 13:25:16 3: ebus1 execute r  -f -c 08.bai.HW7401 OutdoorstempSensor
2016.01.24 13:25:16 3: ebus1 answer r Aussenfühler ERR: element not found
2016.01.24 13:25:16 5: ebus1 GetUpdates: Aussentemperatur:1
2016.01.24 13:25:16 3: ebus1 execute r  -f -c 15.470 OutsideTemp
2016.01.24 13:25:16 3: ebus1 answer r Aussentemperatur ERR: element not found
2016.01.24 13:27:16 4: ebus1 start GetUpdates2
2016.01.24 13:27:16 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 13:27:16 3: GAEBUS device opened (ebus1)
2016.01.24 13:27:16 5: ebus1 GetUpdates: Aussenfühler:1
2016.01.24 13:27:16 3: ebus1 execute r  -f -c 08.bai.HW7401 OutdoorstempSensor
2016.01.24 13:27:16 3: ebus1 answer r Aussenfühler ERR: element not found
2016.01.24 13:27:16 5: ebus1 GetUpdates: Aussentemperatur:1
2016.01.24 13:27:16 3: ebus1 execute r  -f -c 15.470 OutsideTemp
2016.01.24 13:27:17 3: ebus1 answer r Aussentemperatur ERR: element not found
2016.01.24 13:29:17 4: ebus1 start GetUpdates2
2016.01.24 13:29:17 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 13:29:17 3: GAEBUS device opened (ebus1)
2016.01.24 13:29:17 5: ebus1 GetUpdates: Aussenfühler:1
2016.01.24 13:29:17 3: ebus1 execute r  -f -c 08.bai.HW7401 OutdoorstempSensor
2016.01.24 13:29:17 3: ebus1 answer r Aussenfühler ERR: element not found
2016.01.24 13:29:17 5: ebus1 GetUpdates: Aussentemperatur:1
2016.01.24 13:29:17 3: ebus1 execute r  -f -c 15.470 OutsideTemp
2016.01.24 13:29:17 3: ebus1 answer r Aussentemperatur ERR: element not found
2016.01.24 13:31:17 4: ebus1 start GetUpdates2
2016.01.24 13:31:17 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 13:31:17 3: GAEBUS device opened (ebus1)
2016.01.24 13:31:17 5: ebus1 GetUpdates: Aussenfühler:1
2016.01.24 13:31:17 3: ebus1 execute r  -f -c 08.bai.HW7401 OutdoorstempSensor
2016.01.24 13:31:17 3: ebus1 answer r Aussenfühler ERR: element not found
2016.01.24 13:31:17 5: ebus1 GetUpdates: Aussentemperatur:1
2016.01.24 13:31:17 3: ebus1 execute r  -f -c 15.470 OutsideTemp
2016.01.24 13:31:17 3: ebus1 answer r Aussentemperatur ERR: element not found
2016.01.24 13:33:17 4: ebus1 start GetUpdates2
2016.01.24 13:33:17 3: GAEBUS opening ebus1 device 127.0.0.1(8888)
2016.01.24 13:33:17 3: GAEBUS device opened (ebus1)
2016.01.24 13:33:17 5: ebus1 GetUpdates: Aussenfühler:1
2016.01.24 13:33:17 3: ebus1 execute r  -f -c 08.bai.HW7401 OutdoorstempSensor
2016.01.24 13:33:17 3: ebus1 answer r Aussenfühler ERR: element not found
2016.01.24 13:33:17 5: ebus1 GetUpdates: Aussentemperatur:1
2016.01.24 13:33:17 3: ebus1 execute r  -f -c 15.470 OutsideTemp
2016.01.24 13:33:17 3: ebus1 answer r Aussentemperatur ERR: element not found

amunra

@christianh

wir haben es! - du musst die Dateien (im Verzeichnis /opt/fhem/ebusd) umbenennen:

von 15.470.csv -> 470.csv
von 08.bai.HW7401.csv -> bai.csv

und andere CSV-Files die du im Einsatz hast.

Anschließend FHEM restart shutdown.

Die vorhandenen Attribute musst du löschen und neu anlegen.
Danach sollte es gehen.

Viele Grüße
Arthur

christianh

genau das wars...   also das umbenennen ist doch notwendig....


Das ist nun die Zusammenfassung was ich (durch Anleitung einiger hier im Forum) alles gemacht habe, dass Ebusd auf FHEM GAEBUS läuft!
Ich danke allen nochmals für die ausgesprochen gute Hilfe!

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install git autoconf automake g++ make
sudo apt-get install perl libdevice-serialport-perl libio-socket-ssl-perl libwww-perl libxml-simple-perl
sudo wget http://fhem.de/fhem-5.7.deb
sudo dpkg -i fhem-5.7.deb
cd /opt
sudo chmod -R a+w fhem && sudo usermod -a -G tty pi && sudo usermod -a -G tty fhem

wget https://github.com/john30/ebusd/releases/download/v2.0/ebusd-2.0_armhf.deb
wget https://github.com/john30/ebusd-configuration/releases/download/v2.0.1/ebusd-configuration-2.0.5aa482c-de_all.deb
sudo dpkg -i --force-overwrite ebusd-2.0_armhf.deb
sudo dpkg -i --force-overwrite ebusd-configuration-2.0.*.de

sudo git clone https://github.com/john30/ebusd.git
cd ebusd
sudo ./autogen.sh
sudo ./autogen.sh --prefix=/usr/local
sudo make
sudo make install

cd ebusd
sudo ./autogen.sh --prefix=/usr
sudo make
sudo make install
sudo update-rc.d ebusd defaults


USB ABfrage
sudo dmesg | grep -i tty


FHEM
service fhem status
service fhem start     oder  stop

EBUSD
ebusctl scan full     scan result    info

ergebnis ebusctl scan result
08;Vaillant;BAI00;0703;7401
15;Vaillant;47000;0420;1403
50;Vaillant;V6100;0418;1902

Abfrage temp
ebusctl read -m 10 outsidetemp


________________________________________________________________________________________________________________________-
FHEM

update
shutdown restart
define Wetter weather 547148 600 de
define LichtWetter twilight 48.0088985 13.9245608 547148
____________________________________________________________________________________________________________________________
GAEBUS

sudo wget http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/contrib/98_GAEBUS.pm?format=raw -O /opt/fhem/FHEM/98_GAEBUS.pm

define ebus1 GAEBUS 127.0.0.1:8888 900
attr ebus1 disable 0
attr ebus1 ebusWritesEnabled 1
attr ebus1 room Vaillant

cd /opt/fhem
mkdir ebusd
cp 08.bai.HW7401.csv /opt/fhem/ebusd/
cp 15.470.csv /opt/fhem/ebusd/
cp 50.v61.csv /opt/fhem/ebusd/

cd /opt/fhem/ebusd/
mv 08.bai.HW7401.csv bai00.csv
mv 15.470.scv 470.scv
mv 50.v61.csv v61.scv

christianh

#299
Weiss wer ob die bai00.cfg wie in der wiki beschrieben als download verfügbar ist?
Oder kann ich einfach unter windows die Codeschnipsel in eine Datei zusammenkopieren umbenennen und ins Verzeichnis /opt/fhem/FHEM/ kopieren?