Web-Anzeige falsch bei manuellem Schalten

Begonnen von axel, 27 November 2016, 20:39:33

Vorheriges Thema - Nächstes Thema

axel

Hallo

Sicher ein Anfängerfehler. RTFM und Forum Hab ich versucht. Die ,,SZ_Schrank_LED" lässt sich mittels Taten oder aus dem WEB bedienen. Schalte ich mit den Tasten ändert sich der Status im WEB nicht. Egal ob die ,,SZ_Schrank_LED" an oder aus ist. Hab das Wochenende mit dem Aufbau und den ersten Schritten zur Konfiguration verbracht. fhem.cfg im Anhang

Verwende ein PI3 und eine eigene I2C IO Erweiterung (MCP23017). Alle A Port sind Eingänge und alle Ausgänge. Die Elektronik mit Interrupt funktioniert.

Werde mich gleich an den Aufbau der CULs machen.



Ausschnitt aus der fhem.cfg


define i2c RPII2C 1
attr i2c alias Onboard I2C Controller 1
attr i2c room ops

define i2c20 I2C_MCP23017 0x20
attr i2c20 IODev i2c
attr i2c20 Interrupt A0,A1,A2,A3,A4,A5,A6,A7
attr i2c20 InterruptOut connected_active-low
attr i2c20 OutputPorts B0,B1,B2,B3,B4,B5,B6,B7
attr i2c20 Pullup A0,A1,A2,A3,A4,A5,A6,A7
attr i2c20 invert_input A0,A1,A2,A3,A4,A5,A6,A7
attr i2c20 room ops

define int2 RPI_GPIO 20
attr int2 active_low yes
attr int2 direction input
attr int2 interrupt both
attr int2 pud_resistor up
attr int2 userReadings get_i2c20 {fhem ("get i2c20")}

# I2C Output

define SZ_Schrank_LED readingsProxy i2c20:PortB0
attr SZ_Schrank_LED alias SZ Schrank LED
attr SZ_Schrank_LED devStateIcon on:on:off off:off:on
attr SZ_Schrank_LED room SZ
attr SZ_Schrank_LED setFn {($CMD eq "off")?"PortB0 off":"PortB0 on"}
attr SZ_Schrank_LED setList on off


define SZ_Steckdose1 readingsProxy i2c20:PortB6
attr SZ_Steckdose1 alias SZ Steckdose 1
attr SZ_Steckdose1 devStateIcon on:on:off off:off:on
attr SZ_Steckdose1 room SZ
attr SZ_Steckdose1 setFn {($CMD eq "off")?"PortB6 off":"PortB6 on"}
attr SZ_Steckdose1 setList on off

# I2C Input dummy Taster

define SZ_Taster_A10 readingsProxy i2c20:PortA2
attr SZ_Taster_A10 alias SZ Taster A10
attr SZ_Taster_A10 room SZ

define SZ_Taster_A11 readingsProxy i2c20:PortA3
attr SZ_Taster_A11 alias SZ Taster A11
attr SZ_Taster_A11 room SZ

# Funktionen

# Schalt-Logik
define LED_on notify SZ_Taster_A10:on set SZ_Schrank_LED on
define LED_off notify SZ_Taster_A11:on set SZ_Schrank_LED off
Raspberry PI 3B; 2*NanoCUL 868MHz; 2* Homematic Ventile; 1* Homematic Türschalter; fremdes AussenTermometer, Eigenbau Erweiterung für I2C für 4 Taster und 5 SSRelais. Es folgern noch NanoCUL für 433MHz für InnenTermometer und Dimmer sowie Steckdosen. Vorhanden Osziloskop, Multimeter, Lötstation usw