ZB: Über ein notify wird ein Befehl abgesetzt das von einen I2C_MCP23017 Ausgang ausgeführt werden soll.
list mcp23017_B2_HZR
Internals:
CFGFN /media/hdd/fhem/mycfg/AD_Controller/I2C_MCP23017_rasp02.cfg
DEF 0x21
FUUID 5c4500f8-f33f-41f9-1824-e42cb29342825cf1
I2C_Address 33
IODev RpiI2C_1
NAME mcp23017_B2_HZR
NR 307
RpiI2C_1_SENDSTAT Ok
STATE Ok
TYPE I2C_MCP23017
READINGS:
2019-09-04 15:52:03 PortA0 on
2019-09-04 10:54:50 PortA1 on
2019-09-04 10:54:50 PortA2 on
2019-09-04 10:54:50 PortA3 on
2019-09-04 12:40:00 PortA4 on
2019-09-04 18:01:00 PortA5 on
2019-09-04 18:45:30 PortA6 on
2019-09-04 18:55:00 PortA7 on
2019-09-04 10:54:50 PortB0 on
2019-09-04 13:12:04 PortB1 on
2019-09-04 13:13:04 PortB2 on
2019-09-04 10:54:50 PortB3 on
2019-09-04 10:54:50 PortB4 on
2019-09-04 18:55:00 PortB5 on
2019-09-04 10:54:50 PortB6 on
2019-09-04 10:54:50 PortB7 on
2019-09-04 19:12:45 state Ok
Attributes:
IODev RpiI2C_1
OnStartup A0=on,A1=on,A2=on,A3=on,A4=on,A5=on,A6=on,A7=on,B0=on,B1=on,B2=on,B3=on,B4=on,B5=on,B6=on,B7=on
OutputPorts A0,A1,A2,A3,A4,A5,A6,A7,B0,B1,B2,B3,B4,B5,B6,B7
alias Digital I/O Bank 2 | Port A0-A7,B0-B7 (Output)
devStateIcon Ok:it_net@0CFB0C Initialized:it_net@yellow defined:it_net@yellow disconnected:it_net@red error:it_net@red
group MCP23017
icon it_net
poll_interval 1
room _IO
list AB_P_ST_V2N
Internals:
CFGFN /media/hdd/fhem/myprogram/solarthermie_rasp02.pm
DEF AB_P_ST_V2D:(OEFFNEN|SCHLIESEN) set AB_P_ST_V2 $EVENT
FUUID 5c4500fc-f33f-9ca1-be27-0abf8ac0718b5579
NAME AB_P_ST_V2N
NR 1219
NTFY_ORDER 50-AB_P_ST_V2N
REGEXP AB_P_ST_V2D:(OEFFNEN|SCHLIESEN)
STATE 2019-09-03 16:11:22
TRIGGERTIME 1567519882.85844
TYPE notify
READINGS:
2019-09-03 00:15:13 state active
Attributes:
alias AB Pool - SolarThermie - Pool primär Ventile V2
group AB Pool - SolarThermie
icon sani_pump
room AB-Pool,SolarThermie
sortby 07.04
list AB_P_ST_V2
Internals:
CFGFN /media/hdd/fhem/mycfg/AD_Controller/I2C_MCP23017_rasp02.cfg
DEF mcp23017_B2_HZR:PortA6
DEVICE mcp23017_B2_HZR
FUUID 5c4500f9-f33f-b4eb-b1f5-6dc6dfe6b2a31fb1
NAME AB_P_ST_V2
NOTIFYDEV mcp23017_B2_HZR,global
NR 406
NTFY_ORDER 50-AB_P_ST_V2
READING PortA6
STATE SCHLIESEN
TYPE readingsProxy
CONTENT:
mcp23017_B2_HZR 1
READINGS:
2019-09-03 13:08:48 lastCmd on
2019-09-03 13:08:48 state off
Attributes:
alias AB Pool - SolarThermie - Pool primär Ventile V2
cmdIcon OEFFNEN:remotecontrol/black_btn_CHUP SCHLIESEN:remotecontrol/black_btn_CHDOWN
devStateIcon OEFFNEN:control_arrow_up@yellow SCHLIESEN:control_arrow_down@yellow
devStateStyle style="text-align:left;;font-weight:bold;;"
eventMap on:OEFFNEN off:SCHLIESEN
group AB Pool - SolarThermie
icon sani_pump
room AB-Pool,SolarThermie,_IO
setFn {($CMD eq "off")?"PortA6 on":"PortA6 off"}
setList on off
sortby 07.05
valueFn {($VALUE eq "off")?"on":"off"}
webCmd ::OEFFNEN:SCHLIESEN
Man sieht das der Befehl gesendet wurde, 2019-09-03 13:08:48 lastCmd on
aber vom Device MCP23017 Ausgang nicht ausgeführt wurde. 2019-09-03 13:08:48 state off
Dieser Status wiederspricht sich.
Was mir dabei noch aufgefallen ist, ist das bei einem Status on und lastCmd off kein weiteres off reagiert. Es muss erst ein on Cmd und dann ein off Cmd folgen. oder auch umgekehrt.
Diese Situationen habe ich bei einigen Ausgängen des MCP23017 Moduls beobachten können. Egal ob notify oder DOIF.
Nur warum dies geschieht ist mir noch ein Rätsel. Änderungen führte ich schon lange keine mehr durch.
Dieses Fehlverhalten ist mir in den letzten Monaten erst aufgefallen, weil es zu Problemen bei manchen Regelungen kam die nicht nachvollziehbar waren.
Ich finde diesen Fehler des MCP23017 Moduls nicht, warum die Ausgänge auf die Steuerbefehle manchmal nicht reagieren.
List AB_P_ST_V2
Internals:
CFGFN /media/hdd/fhem/mycfg/AD_Controller/I2C_MCP23017_rasp02.cfg
DEF mcp23017_B2_HZR:PortA6
DEVICE mcp23017_B2_HZR
FUUID 5c4500f9-f33f-b4eb-b1f5-6dc6dfe6b2a31fb1
NAME AB_P_ST_V2
NOTIFYDEV mcp23017_B2_HZR,global
NR 406
NTFY_ORDER 50-AB_P_ST_V2
READING PortA6
STATE SCHLIESEN
TYPE readingsProxy
CONTENT:
mcp23017_B2_HZR 1
READINGS:
2019-09-15 09:41:17 lastCmd on
2019-09-15 09:41:17 state off
Attributes:
alias AB Pool - SolarThermie - Pool primär Ventile V2
cmdIcon OEFFNEN:remotecontrol/black_btn_CHUP SCHLIESEN:remotecontrol/black_btn_CHDOWN
devStateIcon OEFFNEN:control_arrow_up@yellow SCHLIESEN:control_arrow_down@yellow
devStateStyle style="text-align:left;;font-weight:bold;;"
eventMap on:OEFFNEN off:SCHLIESEN
group AB Pool - SolarThermie
icon sani_pump
room AB-Pool,SolarThermie,_IO
setFn {($CMD eq "on")?"PortA6 off":"PortA6 on"}
setList on off
sortby 07.05
valueFn {($VALUE eq "on")?"off":"on"}
webCmd ::OEFFNEN:SCHLIESEN
Da ist schon das Reading unlogisch weil es diesen Zustand nicht geben dürfte.
READINGS:
2019-09-15 09:41:17 lastCmd on
2019-09-15 09:41:17 state off
Entweder habe ich einen Fehler bei der Konfigurierung des MCP23017 Moduls, oder im Modul selbst ist ein Fehler der es zulässt, das bei kurzen Impulsen der Ausgang nicht richtig funktioniert.
Das lastCmd wird durch ein DOIF angestoßen.
List AB_P_ST_V2ST
Internals:
CFGFN /media/hdd/fhem/myprogram/solarthermie_rasp02.pm
DEF ([AB_P_ST_PPPA2] ne "AUS" and [AB_P_ST_V2_LOCK] ne "LOOK")
(set AB_P_ST_V2 OEFFNEN)
DOELSEIF
([AB_P_ST_PPPA2] ne "EIN" and [AB_P_ST_V2_LOCK] ne "UNLOOK")
(set AB_P_ST_V2 SCHLIESEN)
DOELSEIF
([?AB_P_ST_PPPA2] eq "AUS" and ([17:00] or
[19:00] or
[21:00]))
(set AB_P_ST_V2 OEFFNEN)(set AB_P_ST_V2 SCHLIESEN)
FUUID 5c4500fc-f33f-40d1-4fb6-caabaf3abe9fe18a
MODEL FHEM
NAME AB_P_ST_V2ST
NOTIFYDEV global,AB_P_ST_PPPA2,AB_P_ST_V2_LOCK
NR 1222
NTFY_ORDER 50-AB_P_ST_V2ST
STATE OEFFNEN
TYPE DOIF
VERSION 20157 2019-09-13 21:08:50
READINGS:
2019-09-15 11:29:27 cmd 1
2019-09-15 11:29:27 cmd_event AB_P_ST_V2ST
2019-09-15 11:29:27 cmd_nr 1
2019-09-15 11:27:01 mode enabled
2019-09-15 11:29:27 state cmd_1
2019-09-15 11:27:01 timer_01_c03 15.09.2019 17:00:00
2019-09-15 11:27:01 timer_02_c03 15.09.2019 19:00:00
2019-09-15 11:27:01 timer_03_c03 15.09.2019 21:00:00
Regex:
accu:
cond:
AB_P_ST_PPPA2:
0:
&STATE ^AB_P_ST_PPPA2$
1:
&STATE ^AB_P_ST_PPPA2$
AB_P_ST_V2_LOCK:
0:
&STATE ^AB_P_ST_V2_LOCK$
1:
&STATE ^AB_P_ST_V2_LOCK$
attr:
cmdState:
wait:
0:
0
1:
0
2:
0
60
waitdel:
condition:
0 ::InternalDoIf($hash,'AB_P_ST_PPPA2','STATE') ne "AUS" and ::InternalDoIf($hash,'AB_P_ST_V2_LOCK','STATE') ne "LOOK"
1 ::InternalDoIf($hash,'AB_P_ST_PPPA2','STATE') ne "EIN" and ::InternalDoIf($hash,'AB_P_ST_V2_LOCK','STATE') ne "UNLOOK"
2 ::InternalDoIf($hash,'AB_P_ST_PPPA2','STATE') eq "AUS" and (::DOIF_time_once($hash,0,$wday) or ::DOIF_time_once($hash,1,$wday) or ::DOIF_time_once($hash,2,$wday))
days:
do:
0:
0 set AB_P_ST_V2 OEFFNEN
1:
0 set AB_P_ST_V2 SCHLIESEN
2:
0 set AB_P_ST_V2 OEFFNEN
1 set AB_P_ST_V2 SCHLIESEN
3:
helper:
globalinit 1
last_timer 3
sleeptimer -1
timerdev
timerevent
timerevents
timereventsState
triggerDev
DOIF_eventas:
cmd_nr: 1
cmd: 1
cmd_event: AB_P_ST_V2ST
state: cmd_1
internals:
all AB_P_ST_PPPA2:STATE AB_P_ST_V2_LOCK:STATE
intervalfunc:
localtime:
0 1568559600
1 1568566800
2 1568574000
realtime:
0 17:00:00
1 19:00:00
2 21:00:00
time:
0 17:00:00
1 19:00:00
2 21:00:00
timeCond:
0 2
1 2
2 2
timer:
0 0
1 0
2 0
timers:
2 0 1 2
triggertime:
1568559600:
localtime 1568559600
hash:
1568566800:
localtime 1568566800
hash:
1568574000:
localtime 1568574000
hash:
uiState:
uiTable:
Attributes:
alias AB Pool - SolarThermie - Pool primär Ventile V2
devStateIcon initialize.*:control_minus OEFFNEN:control_arrow_up@yellow SCHLIESEN:control_arrow_down@yellow
devStateStyle style="text-align:left;;font-weight:bold;;"
do always
eventMap cmd_1:OEFFNEN
cmd_2:SCHLIESEN
cmd_3:SCHLIESEN cmd_3_1:OEFFNEN cmd_3_2:SCHLIESEN
group AB Pool - SolarThermie
icon sani_pump
room SolarThermie,AB-Pool
sortby 07.02
wait 0:0:0,60
Hier die vollständige Konfiguration des MCP23017 Moduls.
List INT
Internals:
CFGFN /media/hdd/fhem/mycfg/AD_Controller/I2C_MCP23017_rasp02.cfg
DEF 21
EXCEPT_FD 15
FUUID 5c4500f9-f33f-c019-b5f0-dfc1c428017fdc7e
GPIO_Basedir /sys/class/gpio
GPIO_Nr 21
NAME INT
NR 329
STATE AUS
TYPE RPI_GPIO
WiringPi_gpio /usr/local/bin/gpio
lasttrg 1568533247.36649
READINGS:
2019-09-15 09:40:47 Dblclick off
2019-09-15 09:40:47 Longpress off
2019-09-15 11:25:09 Pinlevel low
2019-09-15 11:25:09 interrupt egal
2019-09-15 11:25:09 state off
fhem:
interfaces switch
Attributes:
active_low yes
alias RPI_GIPO 21 Interrupt für MCP23017 Modul
devStateIcon EIN:control_on_off@0CFB0C AUS:control_home@red
direction input
eventMap on:EIN off:AUS
icon control_on_off
interrupt both
poll_interval 1
room _GPIO,_IO
userReadings interrupt {fhem ("get mcp23017_B1_HZR,mcp23017_B2_HZR");;"egal"}
List RpiI2C_1
Internals:
CFGFN /media/hdd/fhem/mycfg/schnittstellen_rasp02.cfg
DEF 1
DeviceName /dev/i2c-1
FUUID 5c4500f8-f33f-0c18-aee2-ea64a31c2c05d42c
NAME RpiI2C_1
NOTIFYDEV global
NR 191
NTFY_ORDER 50-RpiI2C_1
STATE Ok
TYPE RPII2C
ioctl_ph_exists 1
Attributes:
alias I²C Schnittstelle
devStateIcon Ok:it_net@0CFB0C initialized:it_net@yellow disconnected:it_net@red error:it_net@red
group Schnittstellen I2C
icon it_net
room _IO,_RxTx,_USV
List mcp23017_B1_HZR
Internals:
CFGFN /media/hdd/fhem/mycfg/AD_Controller/I2C_MCP23017_rasp02.cfg
DEF 0x20
FUUID 5c4500f8-f33f-48ad-afee-c59582979e67026e
I2C_Address 32
IODev RpiI2C_1
NAME mcp23017_B1_HZR
NR 302
RpiI2C_1_SENDSTAT Ok
STATE Ok
TYPE I2C_MCP23017
READINGS:
2019-09-15 09:40:47 PortA0 on
2019-05-19 12:27:35 PortA1 on
2019-09-14 13:12:16 PortA2 off
2019-09-02 01:19:50 PortA3 on
2019-08-17 19:17:48 PortA4 on
2019-07-30 17:20:47 PortA5 off
2019-07-30 17:22:11 PortA6 off
2019-07-30 17:21:14 PortA7 off
2019-07-30 17:23:03 PortB0 off
2019-07-30 17:23:59 PortB1 off
2019-07-30 17:23:05 PortB2 off
2019-07-30 17:18:00 PortB3 off
2019-07-30 17:11:05 PortB4 off
2019-07-30 17:11:08 PortB5 off
2018-05-04 14:20:05 PortB6 on
2018-05-04 14:20:05 PortB7 on
2019-09-15 11:22:28 state Ok
Attributes:
IODev RpiI2C_1
Interrupt A0,A1,A2,A3,A4,A5,A6,A7,B0,B1,B2,B3,B4,B5,B6,B7
InterruptOut connected_active-low
Pullup A0,A1,A2,A3,A4,A5,A6,A7,B0,B1,B2,B3,B4,B5,B6,B7
alias Digital I/O Bank 1 | Port A0-A7,B0-B7 (Input)
devStateIcon Ok:it_net@0CFB0C Initialized:it_net@yellow defined:it_net@yellow disconnected:it_net@red error:it_net@red
group MCP23017
icon it_net
invert_input A0,A1,A2,A3,A4,A5,A6,A7,B0,B1,B2,B3,B4,B5,B6,B7
poll_interval 1
room _IO
List mcp23017_B2_HZR
Internals:
CFGFN /media/hdd/fhem/mycfg/AD_Controller/I2C_MCP23017_rasp02.cfg
DEF 0x21
FUUID 5c4500f8-f33f-41f9-1824-e42cb29342825cf1
I2C_Address 33
IODev RpiI2C_1
NAME mcp23017_B2_HZR
NR 307
RpiI2C_1_SENDSTAT Ok
STATE Ok
TYPE I2C_MCP23017
READINGS:
2019-09-15 10:18:16 PortA0 off
2019-09-15 00:15:13 PortA1 on
2019-09-15 00:15:13 PortA2 on
2019-09-15 00:15:13 PortA3 on
2019-09-15 09:51:24 PortA4 off
2019-09-15 08:51:07 PortA5 off
2019-09-15 09:41:17 PortA6 on
2019-09-15 09:50:54 PortA7 off
2019-09-15 00:15:13 PortB0 on
2019-09-15 00:15:13 PortB1 on
2019-09-15 00:15:13 PortB2 on
2019-09-15 00:15:13 PortB3 on
2019-09-15 00:15:13 PortB4 on
2019-09-15 09:50:47 PortB5 off
2019-09-15 00:15:13 PortB6 on
2019-09-15 00:15:13 PortB7 on
2019-09-15 11:23:07 state Ok
Attributes:
IODev RpiI2C_1
OnStartup A0=on,A1=on,A2=on,A3=on,A4=on,A5=on,A6=on,A7=on,B0=on,B1=on,B2=on,B3=on,B4=on,B5=on,B6=on,B7=on
OutputPorts A0,A1,A2,A3,A4,A5,A6,A7,B0,B1,B2,B3,B4,B5,B6,B7
alias Digital I/O Bank 2 | Port A0-A7,B0-B7 (Output)
devStateIcon Ok:it_net@0CFB0C Initialized:it_net@yellow defined:it_net@yellow disconnected:it_net@red error:it_net@red
group MCP23017
icon it_net
room _IO
Ich hoffe das jemand einen Fehler findet.
Hat wirklich keiner eine Idee zu diesen Fehler?
Das unsichere schalten der Ausgänge ist ein großes Problem.
Die Eingänge schalten ohne Probleme.