Absturtz Heizungs PI Gefährlich

Begonnen von MichaelK-T, 10 April 2015, 15:41:08

Vorheriges Thema - Nächstes Thema

MichaelK-T

Hallo Gemeinde,

ich habe mal wieder eine Frage. Und zwar habe ich einen Raspberry PI B+ daran hängt ein USB zu Serial Adapter mit 5 Sensoren (DS1820) der PI bekommt seinen Strom über ein Meanwell Hutschienennetzteil welches auf 5,05 V Eingestellt ist. Gerade eben hatte ich das Problem das ich meine Forster Heizung angefeuert habe um Badewasser zu machen ja aber der PI hat die Pumpen mittels Relais nicht geschalten ihr könnt euch denken was passiert ist, ich habe Wasserdampf gemacht  :o
Nun ist meine Frage warum war FHEM/PI in einer Art starre verfallen ich habe vor drei Tagen das letzte mal geheizt.

Hier das LOG:

2015.04.06 10:18:58 3: WEB: port 8083 opened
2015.04.06 10:18:58 3: WEBphone: port 8084 opened
2015.04.06 10:18:58 3: WEBtablet: port 8085 opened
2015.04.06 10:18:59 2: eventTypes: loaded 166 events from ./log/eventTypes.txt
2015.04.06 10:19:01 3: Opening OWio1 device /dev/ttyUSB0
2015.04.06 10:19:01 3: Setting OWio1 baudrate to 9600
2015.04.06 10:19:01 3: OWio1 device opened
2015.04.06 10:19:01 1: OWX: Serial device /dev/ttyUSB0 defined
2015.04.06 10:19:54 1: Including fhem.cfg
2015.04.06 10:19:55 1: telnetPort: Can't open server port at 7072: Address already in use. Exiting.
2015.04.06 10:20:02 3: OWTHERM: Device OWX_10_E49DE7020800 defined.
2015.04.06 10:20:02 3: OWTHERM: Device OWX_10_D216E7020800 defined.
2015.04.06 10:20:02 3: OWTHERM: Device OWX_10_CA1BE8020800 defined.
2015.04.06 10:20:03 3: OWTHERM: Device OWX_10_AE5EB5020800 defined.
2015.04.06 10:20:03 3: OWTHERM: Device OWX_10_3344B5020800 defined.
2015.04.06 10:20:04 1: Including ./log/fhem.save
2015.04.06 10:20:04 1: OWX: 1-Wire bus OWio1: interface passive DS9097 detected
2015.04.06 10:20:04 1: usb create starting
2015.04.06 10:20:06 3: Probing CUL device /dev/ttyAMA0
2015.04.06 10:20:06 3: Can't open /dev/ttyAMA0: Permission denied
2015.04.06 10:20:06 1: usb create end
2015.04.06 10:20:06 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.04.06 10:20:06 0: Server started with 24 defined entities (version $Id: fhem.pl 8207 2015-03-14 13:01:30Z rudolfkoenig $, os linux, user fhem, pid 2311)
2015.04.06 10:21:27 1: OWX: 1-Wire devices found on bus OWio1 (OWX_10_E49DE7020800,OWX_10_D216E7020800,OWX_10_CA1BE8020800,OWX_10_AE5EB5020800,OWX_10_3344B5020800)
2015.04.10 14:15:17 1: PERL WARNING: Use of uninitialized value $count_out in numeric ne (!=) at ./FHEM/00_OWX.pm line 1807.
2015.04.10 14:15:17 1: PERL WARNING: Use of uninitialized value $count_out in concatenation (.) or string at ./FHEM/00_OWX.pm line 1807.
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: PERL WARNING: Use of uninitialized value $res in substr at ./FHEM/00_OWX.pm line 1849.
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: PERL WARNING: Use of uninitialized value $res in substr at ./FHEM/00_OWX.pm line 2073.
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
2015.04.10 14:15:17 1: OWX: Write incomplete  ne 1
[b](Ich habe das ganze mal gekürzt)[/b]
2015.04.10 14:46:52 1: OWX: Write incomplete  ne 1
2015.04.10 14:46:52 1: OWX: Write incomplete  ne 1
2015.04.10 14:46:52 1: OWX: Write incomplete  ne 1
2015.04.10 14:46:52 1: OWX: Write incomplete  ne 1
2015.04.10 14:51:52 1: OWX: Write incomplete  ne 1
2015.04.10 14:56:57 1: Including fhem.cfg
2015.04.10 14:56:57 3: telnetPort: port 7072 opened
2015.04.10 14:56:59 3: WEB: port 8083 opened
2015.04.10 14:56:59 3: WEBphone: port 8084 opened
2015.04.10 14:56:59 3: WEBtablet: port 8085 opened
2015.04.10 14:57:00 2: eventTypes: loaded 166 events from ./log/eventTypes.txt
2015.04.10 14:57:02 3: Opening OWio1 device /dev/ttyUSB0
2015.04.10 14:57:02 3: Setting OWio1 baudrate to 9600
2015.04.10 14:57:02 3: OWio1 device opened
2015.04.10 14:57:02 1: OWX: Serial device /dev/ttyUSB0 defined
2015.04.10 14:57:56 1: Including fhem.cfg
2015.04.10 14:57:56 1: telnetPort: Can't open server port at 7072: Address already in use. Exiting.
2015.04.10 14:58:03 3: OWTHERM: Device OWX_10_E49DE7020800 defined.
2015.04.10 14:58:03 3: OWTHERM: Device OWX_10_D216E7020800 defined.
2015.04.10 14:58:03 3: OWTHERM: Device OWX_10_CA1BE8020800 defined.
2015.04.10 14:58:03 3: OWTHERM: Device OWX_10_AE5EB5020800 defined.
2015.04.10 14:58:03 3: OWTHERM: Device OWX_10_3344B5020800 defined.
2015.04.10 14:58:05 1: Including ./log/fhem.save
2015.04.10 14:58:05 1: OWX: 1-Wire bus OWio1: interface passive DS9097 detected
2015.04.10 14:58:05 1: usb create starting
2015.04.10 14:58:07 3: Probing CUL device /dev/ttyAMA0
2015.04.10 14:58:07 3: Can't open /dev/ttyAMA0: Permission denied
2015.04.10 14:58:07 1: usb create end
2015.04.10 14:58:07 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.04.10 14:58:07 0: Server started with 24 defined entities (version $Id: fhem.pl 8207 2015-03-14 13:01:30Z rudolfkoenig $, os linux, user fhem, pid 2312)
2015.04.10 15:00:31 1: OWX: 1-Wire devices found on bus OWio1 (OWX_10_E49DE7020800,OWX_10_D216E7020800,OWX_10_CA1BE8020800,OWX_10_AE5EB5020800,OWX_10_3344B5020800)
2015.04.10 15:11:47 1: Including fhem.cfg
2015.04.10 15:11:48 3: telnetPort: port 7072 opened
2015.04.10 15:11:50 3: WEB: port 8083 opened
2015.04.10 15:11:50 3: WEBphone: port 8084 opened
2015.04.10 15:11:50 3: WEBtablet: port 8085 opened
2015.04.10 15:11:51 2: eventTypes: loaded 166 events from ./log/eventTypes.txt
2015.04.10 15:11:52 3: Opening OWio1 device /dev/ttyUSB0
2015.04.10 15:11:53 3: Setting OWio1 baudrate to 9600
2015.04.10 15:11:53 3: OWio1 device opened
2015.04.10 15:11:53 1: OWX: Serial device /dev/ttyUSB0 defined
2015.04.10 15:12:50 1: Including fhem.cfg
2015.04.10 15:12:51 1: telnetPort: Can't open server port at 7072: Address already in use. Exiting.
2015.04.10 15:13:07 3: OWTHERM: Device OWX_10_E49DE7020800 defined.
2015.04.10 15:13:07 3: OWTHERM: Device OWX_10_D216E7020800 defined.
2015.04.10 15:13:07 3: OWTHERM: Device OWX_10_CA1BE8020800 defined.
2015.04.10 15:13:07 3: OWTHERM: Device OWX_10_AE5EB5020800 defined.
2015.04.10 15:13:07 3: OWTHERM: Device OWX_10_3344B5020800 defined.
2015.04.10 15:13:09 1: Including ./log/fhem.save
2015.04.10 15:13:09 1: OWX: 1-Wire bus OWio1: interface passive DS9097 detected
2015.04.10 15:13:09 1: usb create starting
2015.04.10 15:13:13 3: Probing CUL device /dev/ttyAMA0
2015.04.10 15:13:13 3: Can't open /dev/ttyAMA0: Permission denied
2015.04.10 15:13:13 1: usb create end
2015.04.10 15:13:13 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.04.10 15:13:13 0: Server started with 24 defined entities (version $Id: fhem.pl 8207 2015-03-14 13:01:30Z rudolfkoenig $, os linux, user fhem, pid 2317)
2015.04.10 15:14:32 1: OWX: 1-Wire devices found on bus OWio1 (OWX_10_E49DE7020800,OWX_10_D216E7020800,OWX_10_CA1BE8020800,OWX_10_AE5EB5020800,OWX_10_3344B5020800)


Hier die Config:
attr global userattr devStateIcon devStateStyle icon sortby webCmd widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global motd SecurityCheck:\
\
WEB,WEBphone,WEBtablet has no basicAuth attribute.\
telnetPort has no password/globalpassword attribute.\
\
Restart FHEM for a new check if the problem is fixed,\
or set the global attribute motd to none to supress this message.\

attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global verbose 3

define telnetPort telnet 7072 global

define WEB FHEMWEB 8083 global

define WEBphone FHEMWEB 8084 global
attr WEBphone stylesheetPrefix smallscreen

define WEBtablet FHEMWEB 8085 global
attr WEBtablet stylesheetPrefix touchpad

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog

define autocreate autocreate
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify FRM_0:reinit.*|global:INITIALIZED|initialUsbCheck:addRegexpPart.* usb create
define OWio1 OWX /dev/ttyUSB0
attr OWio1 verbose 4
define OWX_10_E49DE7020800 OWTHERM DS1820 E49DE7020800
attr OWX_10_E49DE7020800 IODev OWio1
attr OWX_10_E49DE7020800 alias Heizung Rücklauf
attr OWX_10_E49DE7020800 model DS1820
attr OWX_10_E49DE7020800 room Heizungsraum
attr OWX_10_E49DE7020800 tempHigh 75
attr OWX_10_E49DE7020800 tempLow 70
define OWX_10_D216E7020800 OWTHERM DS1820 D216E7020800
attr OWX_10_D216E7020800 IODev OWio1
attr OWX_10_D216E7020800 alias Ofen Vorlauf
attr OWX_10_D216E7020800 loglevel 1
attr OWX_10_D216E7020800 model DS1820
attr OWX_10_D216E7020800 room Heizungsraum
attr OWX_10_D216E7020800 tempHigh 75
attr OWX_10_D216E7020800 tempLow 70
define OWX_10_CA1BE8020800 OWTHERM DS1820 CA1BE8020800
attr OWX_10_CA1BE8020800 IODev OWio1
attr OWX_10_CA1BE8020800 alias Heizung Vorlauf
attr OWX_10_CA1BE8020800 model DS1820
attr OWX_10_CA1BE8020800 room Heizungsraum
attr OWX_10_CA1BE8020800 tempHigh 75
attr OWX_10_CA1BE8020800 tempLow 70
define OWX_10_AE5EB5020800 OWTHERM DS1820 AE5EB5020800
attr OWX_10_AE5EB5020800 IODev OWio1
attr OWX_10_AE5EB5020800 alias Pufferspeicher
attr OWX_10_AE5EB5020800 model DS1820
attr OWX_10_AE5EB5020800 room Heizungsraum
attr OWX_10_AE5EB5020800 tempHigh 75
attr OWX_10_AE5EB5020800 tempLow 70
define OWX_10_3344B5020800 OWTHERM DS1820 3344B5020800
attr OWX_10_3344B5020800 IODev OWio1
attr OWX_10_3344B5020800 alias Boiler/Badewasser
attr OWX_10_3344B5020800 icon sani_supply_temp
attr OWX_10_3344B5020800 model DS1820
attr OWX_10_3344B5020800 room Heizungsraum
attr OWX_10_3344B5020800 tempHigh 75
attr OWX_10_3344B5020800 tempLow 70
define FileLog_OWX_10_D216E7020800 FileLog ./log/OWX_10_D216E7020800-%Y.log OWX_10_3344B5020800:temperature:.*|OWX_10_AE5EB5020800:temperature:.*|OWX_10_CA1BE8020800:temperature:.*|OWX_10_D216E7020800|OWX_10_D216E7020800:temperature:.*|OWX_10_E49DE7020800:temperature:.*
attr FileLog_OWX_10_D216E7020800 logtype text
attr FileLog_OWX_10_D216E7020800 room Heizungsraum
define SVG_FileLog_OWX_10_D216E7020800_1 SVG FileLog_OWX_10_D216E7020800:SVG_FileLog_OWX_10_D216E7020800_1:CURRENT
attr SVG_FileLog_OWX_10_D216E7020800_1 room Heizungsraum
define Pumpe_klein RPI_GPIO 2
attr Pumpe_klein direction output
attr Pumpe_klein poll_interval 5
attr Pumpe_klein room Heizungsraum
define Pumpe__Kreislauf_klein DOIF ([OWX_10_D216E7020800:temperature] > 30) (set Pumpe_klein on) DOELSE (set Pumpe_klein off)
attr Pumpe__Kreislauf_klein devStateIcon cmd_1:FS20.on cmd_2:FS20.off
attr Pumpe__Kreislauf_klein icon sani_pump
attr Pumpe__Kreislauf_klein room Heizungsraum
define Pumpe_Pufferspeicher RPI_GPIO 3
attr Pumpe_Pufferspeicher direction output
attr Pumpe_Pufferspeicher poll_interval 5
attr Pumpe_Pufferspeicher room Heizungsraum
define Puffer_automatisch DOIF ([OWX_10_D216E7020800:temperature] > 70) (set Pumpe_Pufferspeicher on) DOELSE (set Pumpe_Pufferspeicher off)
attr Puffer_automatisch devStateIcon cmd_1:FS20.on cmd_2:FS20.off
attr Puffer_automatisch icon sani_buffer_temp_all
attr Puffer_automatisch room Heizungsraum
define FileLog_Pumpe_Pufferspeicher FileLog ./log/Pumpe_Pufferspeicher-%Y.log Pumpe_Pufferspeicher|Pumpe_Pufferspeicher:state:.*|Pumpe__Kreislauf_klein:state:.*|Pumpe_klein:Pinlevel:.*|Pumpe_klein:state:.*
attr FileLog_Pumpe_Pufferspeicher logtype text
attr FileLog_Pumpe_Pufferspeicher room Heizungsraum
define PumpePufferNachtStart at *05:00:00 {  { fhem("define PumpePufferNachtInterval at +*{16}00:15:00 set Pumpe_Pufferspeicher on-for-timer 300") } }
attr PumpePufferNachtStart room Heizungsraum
define SVG_FileLog_Pumpe_Pufferspeicher_1 SVG FileLog_Pumpe_Pufferspeicher:SVG_FileLog_Pumpe_Pufferspeicher_1:CURRENT


Wenn ihr noch mehr Files braucht ich stelle gern alles zur Verfügung ich kann mir nicht erklären warum der Raspi oder FHEM sich aufgehängt haben......

Vielen Dank für euere Hilfe und Zeit.....

franky08

#1
Hallo, auch wenn dir meine Antwort nicht weiterhilft, solltest du darüber nachdenken eine solche Steuerung abhängig von einem experimentellen System wie einem Raspi mit fhem zu machen. Wenn schon, dann im Fehlerfall das Ganze in einen sicheren Zustand bringen.
Mit OWX kenne ich mich leider nicht aus, da kann ich dir nicht weiterhelfen. Was mir auffällt ist das usb create, das solltest du besser disablen .
usb create starting
2015.04.06 10:20:06 3: Probing CUL device /dev/ttyAMA0
2015.04.06 10:20:06 3: Can't open /dev/ttyAMA0: Permission denied
2015.04.06 10:20:06 1: usb create end


# Disable this to avoid looking for new USB devices on startup
#define initialUsbCheck notify global:INITIALIZED usb create


VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

Doggiebert

...und vor allem solltest Du Dich mal mit den Code-Tags vom Forum beschäftigen, sonst scrollt man sich hier zu Tode...
SW: FHEM 5.5, Raspian, XBMC, Testinstallation auf Win7
HW: Raspi B, 32GB SD, enocean Pi, RFXTRX433E, BSC - MwC-32, Onkyo TX-NR709, Samsung UE55F8090, Jung LS-Eno, permundo SmartPlug, KDG-FB 6490cable (ohne FHEM)

MichaelK-T

#3
Hallo, Danke für die schnelle Antwort. Ich wollte ja mit Code Arbeiten jedoch habe ich erst zu spät gelesen das es Wartungsarbeiten gibt deswegen kann ich derzeit nichts ändern...... :-[

(Update: So Code wurde eingefügt und gekürzt)

Wenn ich jetzt aber das USB ding ausschalte dann findet der bei einem Neustart doch den OWX nicht mehr oder?

franky08

ZitatWenn ich jetzt aber das USB ding ausschalte dann findet der bei einem Neustart doch den OWX nicht mehr oder?

Doch, ist ja definiert:
define OWio1 OWX /dev/ttyUSB0
attr OWio1 verbose 4
define OWX_10_E49DE7020800 OWTHERM DS1820 E49DE7020800


VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

MichaelK-T

okay vielen Dank ich werde das mal Ausprobieren...

Prof. Dr. Peter Henning

An einer Stelle sieht das so aus, als ob es zwei verschiedene FHEM-Instanzen gäbe (telnet port ... address in use). Deuten auch die wilden Fehlermeldungen aus OWX hin.

Außerdem stimmen offenbar die permissions nicht.

Das bestärkt mich ferner in einer Forderung, die ich hier immer immer wieder erhebe: Sicherheitskritische Systeme dürfen nicht abhängig von FHEM sein, sondern müssen autonom laufen.

Also: Zweiten Raspberry kaufen, der nur für die Pumpemsteuerung zuständig ist. Oder besser noch, dies mit einem Arduino implementieren.

LG

pah

Puschel74

Deswegen laufen bei uns in der Firma kritische Steuerungen autonom und melden ihre Zustände nur.
Wobei auch dann der "Programmierer" selbst für sein Programm verantwortlich ist.

Zitat von: Prof. Dr. Peter Henning am 10 April 2015, 20:56:39
Also: Zweiten Raspberry kaufen, der nur für die Pumpemsteuerung zuständig ist. Oder besser noch, dies mit einem Arduino implementieren.
LG
pah
Die Heizung kann der TE auch mit einem Arduino zum "überkochen" bringen  8)
Oder er installiert auf dem zweiten RasPi auch FHEM - wobei ich hier nicht unbedingt der Software die Schuld geben würde.

Ich bevorzuge für solch "kritischen" Systeme gerne Hardware End-,Abschalter.
Es geht eben nichts über einen poppeligen Hardware-Thermostat der bei überschreiten der eingestellten Temperatur die Energiezufuhr unterbricht und sich NICHT selbst zurückstellt.
Warum nicht?
Lieber kühlt mir das System aus als das ständig der Thermostat eingreifen muss.
Ausserdem will ich wissen wenn was nicht passt und/oder klappt und auch da reagier ich schneller wenn das System auskühlt als wenn ich nur eine Meldung bekomme.
Zotac BI323 als Server mit DBLog
CUNO für FHT80B, 3 HM-Lan per vCCU, RasPi mit CUL433 für Somfy-Rollo (F2F), RasPi mit I2C(LM75) (F2F), RasPi für Panstamp+Vegetronix +SONOS(F2F)
Ich beantworte keine Supportanfragen per PM! Bitte im Forum suchen oder einen Beitrag erstellen.

MichaelK-T

Abend habe gerade mal geschaut ob 2 FHEM Instanzen laufen und es schaut mir auch danach aus.
Siehe
root@raspberrypi:~# ps aux | grep fhem
fhem      2317  1.6  3.7  19388 16652 ?        S    15:11   6:49 perl fhem.pl fhem.cfg
root      2318  0.0  0.1   1700   564 ?        Ss   15:11   0:00 startpar -f -- fhem
root      9129  0.0  0.1   3604   864 pts/0    S+   22:08   0:00 grep fhem
root@raspberrypi:~#


Jetzt muss ich das zweite nur noch finden....

MichaelK-T

Hallo Gemeinde,

also das USB Auto dings ist nun aus und der Raspi mit Fehm läuft immer noch stabil sehr schön. Vielen Dank für eure Hilfe

Gruß Micha