Hi Alexander,
is there any limit to the amount of the things for the binding?
After testing the binding and finding the rules i need to get the functions i want, i began to setup all my thingās.
As i have 4 Logoās that made this these configuration files:
Logo.things
Bridge plclogo:device:Logo1 [ address="192.168.0.181", family="0BA7", localTSAP="0x1000", remoteTSAP="0x2000", refresh ="1000" ]
{
Thing plclogo:digital:Logo_1_Q_1 [ block="Q1" ]
Thing plclogo:digital:Logo_1_Q_2 [ block="Q2" ]
Thing plclogo:digital:Logo_1_Q_3 [ block="Q3" ]
Thing plclogo:digital:Logo_1_Q_4 [ block="Q4" ]
Thing plclogo:digital:Logo_1_Q_5 [ block="Q5" ]
Thing plclogo:digital:Logo_1_Q_6 [ block="Q6" ]
Thing plclogo:digital:Logo_1_Q_7 [ block="Q7" ]
Thing plclogo:digital:Logo_1_Q_8 [ block="Q8" ]
Thing plclogo:digital:Logo_1_Q_9 [ block="Q9" ]
Thing plclogo:digital:Logo_1_Q_10 [ block="Q10" ]
Thing plclogo:digital:Logo_1_Q_11 [ block="Q11" ]
Thing plclogo:digital:Logo_1_Q_12 [ block="Q12" ]
Thing plclogo:digital:Logo_1_Q_13 [ block="Q13" ]
Thing plclogo:digital:Logo_1_Q_14 [ block="Q14" ]
Thing plclogo:digital:Logo_1_Q_15 [ block="Q15" ]
Thing plclogo:digital:Logo_1_Q_16 [ block="Q16" ]
Thing plclogo:digital:Logo_1_VB_101_0 [ block="VB101.0" ]
Thing plclogo:digital:Logo_1_VB_102_0 [ block="VB102.0" ]
Thing plclogo:digital:Logo_1_VB_103_0 [ block="VB103.0" ]
Thing plclogo:digital:Logo_1_VB_104_0 [ block="VB104.0" ]
Thing plclogo:digital:Logo_1_VB_105_0 [ block="VB105.0" ]
Thing plclogo:digital:Logo_1_VB_106_0 [ block="VB106.0" ]
Thing plclogo:digital:Logo_1_VB_107_0 [ block="VB107.0" ]
Thing plclogo:digital:Logo_1_VB_108_0 [ block="VB108.0" ]
Thing plclogo:digital:Logo_1_VB_109_0 [ block="VB109.0" ]
Thing plclogo:digital:Logo_1_VB_110_0 [ block="VB110.0" ]
Thing plclogo:digital:Logo_1_VB_111_0 [ block="VB111.0" ]
Thing plclogo:digital:Logo_1_VB_112_0 [ block="VB112.0" ]
Thing plclogo:digital:Logo_1_VB_113_0 [ block="VB113.0" ]
Thing plclogo:digital:Logo_1_VB_114_0 [ block="VB114.0" ]
Thing plclogo:digital:Logo_1_VB_115_0 [ block="VB115.0" ]
Thing plclogo:digital:Logo_1_VB_116_0 [ block="VB116.0" ]
Thing plclogo:analog:Logo_1_VW_452 [ block="452", threshold="1" ]
Thing plclogo:analog:Logo_1_VW_456 [ block="456", threshold="1" ]
Thing plclogo:analog:Logo_1_VW_460 [ block="460", threshold="1" ]
Thing plclogo:analog:Logo_1_VW_464 [ block="464", threshold="1" ]
}
Bridge plclogo:device:Logo2 [ address="192.168.0.182", family="0BA7", localTSAP="0x1000", remoteTSAP="0x2000", refresh ="1000" ]
{
Thing plclogo:digital:Logo_2_Q_1 [ block="Q1" ]
...
had to cut some text out because of post limitations
...
Thing plclogo:digital:Logo_2_Q_16 [ block="Q16" ]
Thing plclogo:digital:Logo_2_VB_201_0 [ block="VB201.0" ]
...
had to cut some text out because of post limitations
...
Thing plclogo:digital:Logo_2_VB_216_0 [ block="VB216.0" ]
Thing plclogo:analog:Logo_2_VW_452 [ block="VW452", threshold="1" ]
Thing plclogo:analog:Logo_2_VW_456 [ block="VW456", threshold="1" ]
}
Bridge plclogo:device:Logo3 [ address="192.168.0.183", family="0BA7", localTSAP="0x1000", remoteTSAP="0x2000", refresh ="1000" ]
{
Thing plclogo:digital:Logo_3_Q_1 [ block="Q1" ]
...
had to cut some text out because of post limitations
...
Thing plclogo:digital:Logo_3_Q_16 [ block="Q16" ]
Thing plclogo:digital:Logo_3_VB_301_0 [ block="VB301.0" ]
...
had to cut some text out because of post limitations
...
Thing plclogo:digital:Logo_3_VB_316_0 [ block="VB316.0" ]
Thing plclogo:analog:Logo_3_VW_352 [ block="VW352", threshold="1" ]
Thing plclogo:analog:Logo_3_VW_356 [ block="VW356", threshold="1" ]
}
Bridge plclogo:device:Logo4 [ address="192.168.0.184", family="0BA7", localTSAP="0x1000", remoteTSAP="0x2000", refresh ="1000" ]
{
Thing plclogo:digital:Logo_4_Q_1 [ block="Q1" ]
...
had to cut some text out because of post limitations
...
Thing plclogo:digital:Logo_4_Q_16 [ block="Q16" ]
Thing plclogo:digital:Logo_4_VB_401_0 [ block="VB401.0" ]
...
had to cut some text out because of post limitations
...
Thing plclogo:digital:Logo_4_VB_416_0 [ block="VB416.0" ]
Thing plclogo:analog:Logo_4_VW_452 [ block="452", threshold="1" ]
Thing plclogo:analog:Logo_4_VW_456 [ block="456", threshold="1" ]
Thing plclogo:analog:Logo_4_VW_460 [ block="460", threshold="1" ]
}
// vim: syntax=Xtend
Logo.items
Switch Logo_1_state_Q_1 {channel="plclogo:digital:Logo_1_Q_1:state"}
Switch Logo_1_state_Q_2 {channel="plclogo:digital:Logo_1_Q_2:state"}
Switch Logo_1_state_Q_3 {channel="plclogo:digital:Logo_1_Q_3:state"}
Switch Logo_1_state_Q_4 {channel="plclogo:digital:Logo_1_Q_4:state"}
Switch Logo_1_state_Q_5 {channel="plclogo:digital:Logo_1_Q_5:state"}
Switch Logo_1_state_Q_6 {channel="plclogo:digital:Logo_1_Q_6:state"}
Switch Logo_1_state_Q_7 {channel="plclogo:digital:Logo_1_Q_7:state"}
Switch Logo_1_state_Q_8 {channel="plclogo:digital:Logo_1_Q_8:state"}
Switch Logo_1_state_Q_9 {channel="plclogo:digital:Logo_1_Q_9:state"}
Switch Logo_1_state_Q_10 {channel="plclogo:digital:Logo_1_Q_10:state"}
Switch Logo_1_state_Q_11 {channel="plclogo:digital:Logo_1_Q_11:state"}
Switch Logo_1_state_Q_12 {channel="plclogo:digital:Logo_1_Q_12:state"}
Switch Logo_1_state_Q_13 {channel="plclogo:digital:Logo_1_Q_13:state"}
Switch Logo_1_state_Q_14 {channel="plclogo:digital:Logo_1_Q_14:state"}
Switch Logo_1_state_Q_15 {channel="plclogo:digital:Logo_1_Q_15:state"}
Switch Logo_1_state_Q_16 {channel="plclogo:digital:Logo_1_Q_16:state"}
Switch Logo_1_state_VB_101_0 {channel="plclogo:digital:Logo_1_VB_101_0:state"}
Switch Logo_1_state_VB_102_0 {channel="plclogo:digital:Logo_1_VB_102_0:state"}
Switch Logo_1_state_VB_103_0 {channel="plclogo:digital:Logo_1_VB_103_0:state"}
Switch Logo_1_state_VB_104_0 {channel="plclogo:digital:Logo_1_VB_104_0:state"}
Switch Logo_1_state_VB_105_0 {channel="plclogo:digital:Logo_1_VB_105_0:state"}
Switch Logo_1_state_VB_106_0 {channel="plclogo:digital:Logo_1_VB_106_0:state"}
Switch Logo_1_state_VB_107_0 {channel="plclogo:digital:Logo_1_VB_107_0:state"}
Switch Logo_1_state_VB_108_0 {channel="plclogo:digital:Logo_1_VB_108_0:state"}
Switch Logo_1_state_VB_109_0 {channel="plclogo:digital:Logo_1_VB_109_0:state"}
Switch Logo_1_state_VB_110_0 {channel="plclogo:digital:Logo_1_VB_110_0:state"}
Switch Logo_1_state_VB_111_0 {channel="plclogo:digital:Logo_1_VB_111_0:state"}
Switch Logo_1_state_VB_112_0 {channel="plclogo:digital:Logo_1_VB_112_0:state"}
Switch Logo_1_state_VB_113_0 {channel="plclogo:digital:Logo_1_VB_113_0:state"}
Switch Logo_1_state_VB_114_0 {channel="plclogo:digital:Logo_1_VB_114_0:state"}
Switch Logo_1_state_VB_115_0 {channel="plclogo:digital:Logo_1_VB_115_0:state"}
Switch Logo_1_state_VB_116_0 {channel="plclogo:digital:Logo_1_VB_116_0:state"}
Switch Logo_2_state_Q_1 {channel="plclogo:digital:Logo_2_Q_1:state"}
...
had to cut some text out because of post limitations
...
Switch Logo_2_state_Q_16 {channel="plclogo:digital:Logo_2_Q_16:state"}
Switch Logo_2_state_VB_201_0 {channel="plclogo:digital:Logo_2_VB_201_0:state"}
...
had to cut some text out because of post limitations
...
Switch Logo_2_state_VB_216_0 {channel="plclogo:digital:Logo_2_VB_216_0:state"}
Contact Logo_2_state_I_1 {channel="plclogo:digital:Logo_2_I_1:state"}
Contact Logo_2_state_I_2 {channel="plclogo:digital:Logo_2_I_2:state"}
Contact Logo_2_state_I_3 {channel="plclogo:digital:Logo_2_I_3:state"}
Contact Logo_2_state_I_4 {channel="plclogo:digital:Logo_2_I_4:state"}
Contact Logo_2_state_I_5 {channel="plclogo:digital:Logo_2_I_5:state"}
Contact Logo_2_state_I_6 {channel="plclogo:digital:Logo_2_I_6:state"}
Contact Logo_2_state_I_7 {channel="plclogo:digital:Logo_2_I_7:state"}
Contact Logo_2_state_I_8 {channel="plclogo:digital:Logo_2_I_8:state"}
Contact Logo_2_state_I_9 {channel="plclogo:digital:Logo_2_I_9:state"}
Contact Logo_2_state_I_10 {channel="plclogo:digital:Logo_2_I_10:state"}
Contact Logo_2_state_I_11 {channel="plclogo:digital:Logo_2_I_11:state"}
Contact Logo_2_state_I_12 {channel="plclogo:digital:Logo_2_I_12:state"}
Contact Logo_2_state_I_13 {channel="plclogo:digital:Logo_2_I_13:state"}
Contact Logo_2_state_I_14 {channel="plclogo:digital:Logo_2_I_14:state"}
Contact Logo_2_state_I_15 {channel="plclogo:digital:Logo_2_I_15:state"}
Contact Logo_2_state_I_16 {channel="plclogo:digital:Logo_2_I_16:state"}
Contact Logo_2_state_I_17 {channel="plclogo:digital:Logo_2_I_17:state"}
Contact Logo_2_state_I_18 {channel="plclogo:digital:Logo_2_I_18:state"}
Contact Logo_2_state_I_19 {channel="plclogo:digital:Logo_2_I_19:state"}
Contact Logo_2_state_I_20 {channel="plclogo:digital:Logo_2_I_20:state"}
Contact Logo_2_state_I_21 {channel="plclogo:digital:Logo_2_I_21:state"}
Contact Logo_2_state_I_22 {channel="plclogo:digital:Logo_2_I_22:state"}
Contact Logo_2_state_I_23 {channel="plclogo:digital:Logo_2_I_23:state"}
Contact Logo_2_state_I_24 {channel="plclogo:digital:Logo_2_I_24:state"}
Switch Logo_3_state_Q_1 {channel="plclogo:digital:Logo_3_Q_1:state"}
...
had to cut some text out because of post limitations
...
Switch Logo_3_state_Q_16 {channel="plclogo:digital:Logo_3_Q_16:state"}
Switch Logo_3_state_VB_301_0 {channel="plclogo:digital:Logo_3_VB_301_0:state"}
...
had to cut some text out because of post limitations
...
Switch Logo_3_state_VB_316_0 {channel="plclogo:digital:Logo_3_VB_316_0:state"}
Switch Logo_4_state_Q_1 {channel="plclogo:digital:Logo_4_Q_1:state"}
...
had to cut some text out because of post limitations
...
Switch Logo_4_state_Q_16 {channel="plclogo:digital:Logo_4_Q_16:state"}
Switch Logo_4_state_VB_401_0 {channel="plclogo:digital:Logo_4_VB_401_0:state"}
...
had to cut some text out because of post limitations
...
Switch Logo_4_state_VB_416_0 {channel="plclogo:digital:Logo_4_VB_416_0:state"}
Number Roll_state_1_Q_1_Q_2 {channel="plclogo:analog:Logo_1_VW_452:value"}
Number Roll_state_1_Q_5_Q_6 {channel="plclogo:analog:Logo_1_VW_456:value"}
Number Roll_state_1_Q_7_Q_8 {channel="plclogo:analog:Logo_1_VW_460:value"}
Number Roll_state_1_Q_14_Q_13 {channel="plclogo:analog:Logo_1_VW_464:value"}
Number Roll_state_2_Q_7_Q_8 {channel="plclogo:analog:Logo_2_VW_452:value"}
Number Roll_state_2_Q_9_Q_10 {channel="plclogo:analog:Logo_2_VW_456:value"}
Number Roll_state_3_Q_7_Q_8 {channel="plclogo:analog:Logo_3_VW_352:value"}
Number Roll_state_3_Q_10_Q_11 {channel="plclogo:analog:Logo_3_VW_356:value"}
Number Roll_state_4_Q_5_Q_6 {channel="plclogo:analog:Logo_4_VW_452:value"}
Number Roll_state_4_Q_7_Q_8 {channel="plclogo:analog:Logo_4_VW_456:value"}
Number Roll_state_4_Q_9_Q_10 {channel="plclogo:analog:Logo_4_VW_460:value"}
Rollershutter Proxy_LogoRollo_1_Q_1_Q_2 "Kinder Schlafzimmer [%d %%]" <rollershutter> (gObergeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_1_Q_5_Q_6 "Kinder Spielzimmer Fenster [%d %%]" <rollershutter> (gObergeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_1_Q_7_Q_8 "Kinder Spielzimmer TĆ¼r [%d %%]" <rollershutter> (gObergeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_1_Q_14_Q_13 "GƤstezimmer [%d %%]" <rollershutter> (gObergeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_2_Q_7_Q_8 "Eltern [%d %%]" <rollershutter> (gDachgeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_2_Q_9_Q_10 "Eltern 2 [%d %%]" <rollershutter> (gDachgeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_3_Q_7_Q_8 "GƤste WC [%d %%]" <rollershutter> (gErdgeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_3_Q_10_Q_11 "Bad OG [%d %%]" <rollershutter> (gObergeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_4_Q_5_Q_6 "KĆ¼che [%d %%]" <rollershutter> (gErdgeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_4_Q_7_Q_8 "Wohnzimmer [%d %%]" <rollershutter> (gErdgeschoss, gLogoRollProxySwitch) {autoupdate="false"}
Rollershutter Proxy_LogoRollo_4_Q_9_Q_10 "Wohnzimmer 2 [%d %%]" <rollershutter> (gErdgeschoss, gLogoRollProxySwitch) {autoupdate="false"}
// Logo 1
Switch Proxy_Logo_1_Q_3 "Kinder Schlafzimmer SD" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_1_Q_4 "Kinder Schlafzimmer Licht" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_1_Q_9 "Kinder Spielzimmer Licht" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_1_Q_10 "Kinder Spielzimmer SD" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_1_Q_15 "GƤstezimmer SD" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_1_Q_16 "GƤstezimmer Licht" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
// Logo 2
Switch Proxy_Logo_2_Q_1 "Terrasse Licht" <light> (gTerrasse, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_2 "Terrasse SD" <light> (gTerrasse, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_5 "Gr. Keller Licht" <light> (gKellergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_6 "Schrank Licht" <light> (gDachgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_11 "Bett Licht" <light> (gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_12 "PC Licht" <light> (gDachgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_13 "Bett Licht Li" <light> (gDachgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_14 "Bett Licht Re" <light> (gDachgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_15 "Werkstatt Licht" <light> (gKellergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_2_Q_16 "Garage Licht" <light> (gKellergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
// Logo 3
Switch Proxy_Logo_3_Q_1 "KG Flur Licht" <light> (gKellergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_2 "EG Flur Licht" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_3 "EG Flur SD" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_4 "OG Flur Licht" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_5 "OG Flur SD" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_6 "DG Flur" <light> (gDachgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_9 "GƤsteWC Licht" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_12 "Bad Licht" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_3_Q_13 "Bad SpiegelLicht" <light> (gObergeschoss, gLogoLightProxySwitch) [ "Lighting" ]
// Logo 4
Switch Proxy_Logo_4_Q_1 "Esszimmer" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_2 "Esszimmer SD" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_3 "KĆ¼che" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_4 "KĆ¼che SD" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_11 "Wohnzimmer" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_12 "Wohnzimmer SD1" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_13 "Wohnzimmer SD2" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_15 "Wohnzimmer SD3" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
Switch Proxy_Logo_4_Q_16 "Wohnzimmer SD4" <light> (gErdgeschoss, gLogoLightProxySwitch) [ "Lighting" ]
// vim: syntax=Xtend
with these rules:
Logo_Switches.rules
import org.eclipse.smarthome.core.library.items.SwitchItem
import org.eclipse.xtext.xbase.lib.Functions
val Functions.Function4 LogoSwitchLogic = [
org.openhab.core.types.Command Command, SwitchItem RuleProxySwitch, SwitchItem RuleReadLogo, SwitchItem RuleSwitch |
logWarn("DebugOutput", "Rule start with:" + RuleProxySwitch.name.toString + " " + RuleReadLogo.name.toString + " " + RuleSwitch.name.toString )
switch(Command)
{
case ON: {
logWarn("DebugOutput", "Rule case ON")
if (RuleReadLogo.state != Command) { // only if state changed
logWarn("DebugOutput", "Rule case ON:switching")
RuleSwitch.sendCommand(ON)
Thread::sleep(400)
RuleSwitch.sendCommand(OFF)
}
}
case OFF: {
logWarn("DebugOutput", "Rule case OFF")
if (RuleReadLogo.state != Command) { // only if state changed
logWarn("DebugOutput", "Rule case OFF:switching")
RuleSwitch.sendCommand(ON)
Thread::sleep(400)
RuleSwitch.sendCommand(OFF)
}
}
default: {
logWarn("DebugOutput", "Rule case default")
Thread::sleep(350)
if (RuleReadLogo.state != RuleProxySwitch.state) { // if state changed really
logWarn("DebugOutput", "Rule case default:state changed externally")
RuleProxySwitch.postUpdate(RuleReadLogo.state) // update the state without triggering the rule
}
}
}
]
// Logo 1
rule "Switch Light through Logo 1_Q_3" when Item Logo_1_state_Q_3 changed or Item Proxy_Logo_1_Q_3 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_1_Q_3, Logo_1_state_Q_3, Logo_1_state_VB_103_0) end
rule "Switch Light through Logo 1_Q_4" when Item Logo_1_state_Q_4 changed or Item Proxy_Logo_1_Q_4 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_1_Q_4, Logo_1_state_Q_4, Logo_1_state_VB_104_0) end
rule "Switch Light through Logo 1_Q_9" when Item Logo_1_state_Q_9 changed or Item Proxy_Logo_1_Q_9 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_1_Q_9, Logo_1_state_Q_9, Logo_1_state_VB_109_0) end
rule "Switch Light through Logo 1_Q_10" when Item Logo_1_state_Q_10 changed or Item Proxy_Logo_1_Q_10 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_1_Q_10, Logo_1_state_Q_10, Logo_1_state_VB_110_0) end
rule "Switch Light through Logo 1_Q_15" when Item Logo_1_state_Q_15 changed or Item Proxy_Logo_1_Q_15 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_1_Q_15, Logo_1_state_Q_15, Logo_1_state_VB_115_0) end
rule "Switch Light through Logo 1_Q_16" when Item Logo_1_state_Q_16 changed or Item Proxy_Logo_1_Q_16 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_1_Q_16, Logo_1_state_Q_16, Logo_1_state_VB_116_0) end
// Logo 2
rule "Switch Light through Logo 2_Q_1" when Item Logo_2_state_Q_1 changed or Item Proxy_Logo_2_Q_1 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_1, Logo_2_state_Q_1, Logo_2_state_VB_201_0) end
rule "Switch Light through Logo 2_Q_2" when Item Logo_2_state_Q_2 changed or Item Proxy_Logo_2_Q_2 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_2, Logo_2_state_Q_2, Logo_2_state_VB_202_0) end
rule "Switch Light through Logo 2_Q_5" when Item Logo_2_state_Q_5 changed or Item Proxy_Logo_2_Q_5 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_5, Logo_2_state_Q_5, Logo_2_state_VB_205_0) end
rule "Switch Light through Logo 2_Q_6" when Item Logo_2_state_Q_6 changed or Item Proxy_Logo_2_Q_6 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_6, Logo_2_state_Q_6, Logo_2_state_VB_206_0) end
rule "Switch Light through Logo 2_Q_11" when Item Logo_2_state_Q_11 changed or Item Proxy_Logo_2_Q_11 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_11, Logo_2_state_Q_11, Logo_2_state_VB_211_0) end
// PC-Licht Anfang
rule "Switch Light through Logo 2_Q_12" when Item Logo_2_state_Q_12 changed or Item Proxy_Logo_2_Q_12 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_12, Logo_2_state_Q_12, Logo_2_state_VB_212_0) end
// PC-Licht Ende
rule "Switch Light through Logo 2_Q_13" when Item Logo_2_state_Q_13 changed or Item Proxy_Logo_2_Q_13 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_13, Logo_2_state_Q_13, Logo_2_state_VB_213_0) end
rule "Switch Light through Logo 2_Q_14" when Item Logo_2_state_Q_14 changed or Item Proxy_Logo_2_Q_14 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_14, Logo_2_state_Q_14, Logo_2_state_VB_214_0) end
rule "Switch Light through Logo 2_Q_15" when Item Logo_2_state_Q_15 changed or Item Proxy_Logo_2_Q_15 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_15, Logo_2_state_Q_15, Logo_2_state_VB_215_0) end
rule "Switch Light through Logo 2_Q_16" when Item Logo_2_state_Q_16 changed or Item Proxy_Logo_2_Q_16 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_2_Q_16, Logo_2_state_Q_16, Logo_2_state_VB_216_0) end
// Logo 3
rule "Switch Light through Logo 3_Q_1" when Item Logo_3_state_Q_1 changed or Item Proxy_Logo_3_Q_1 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_1, Logo_3_state_Q_1, Logo_3_state_VB_301_0) end
rule "Switch Light through Logo 3_Q_2" when Item Logo_3_state_Q_2 changed or Item Proxy_Logo_3_Q_2 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_2, Logo_3_state_Q_2, Logo_3_state_VB_302_0) end
rule "Switch Light through Logo 3_Q_3" when Item Logo_3_state_Q_3 changed or Item Proxy_Logo_3_Q_3 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_3, Logo_3_state_Q_3, Logo_3_state_VB_303_0) end
rule "Switch Light through Logo 3_Q_4" when Item Logo_3_state_Q_4 changed or Item Proxy_Logo_3_Q_4 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_4, Logo_3_state_Q_4, Logo_3_state_VB_304_0) end
rule "Switch Light through Logo 3_Q_5" when Item Logo_3_state_Q_5 changed or Item Proxy_Logo_3_Q_5 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_5, Logo_3_state_Q_5, Logo_3_state_VB_305_0) end
rule "Switch Light through Logo 3_Q_6" when Item Logo_3_state_Q_6 changed or Item Proxy_Logo_3_Q_6 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_6, Logo_3_state_Q_6, Logo_3_state_VB_306_0) end
rule "Switch Light through Logo 3_Q_9" when Item Logo_3_state_Q_9 changed or Item Proxy_Logo_3_Q_9 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_9, Logo_3_state_Q_9, Logo_3_state_VB_309_0) end
rule "Switch Light through Logo 3_Q_12" when Item Logo_3_state_Q_12 changed or Item Proxy_Logo_3_Q_12 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_12, Logo_3_state_Q_12, Logo_3_state_VB_312_0) end
rule "Switch Light through Logo 3_Q_13" when Item Logo_3_state_Q_13 changed or Item Proxy_Logo_3_Q_13 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_3_Q_13, Logo_3_state_Q_13, Logo_3_state_VB_313_0) end
// Logo 4
rule "Switch Light through Logo 4_Q_1" when Item Logo_4_state_Q_1 changed or Item Proxy_Logo_4_Q_1 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_1, Logo_4_state_Q_1, Logo_4_state_VB_401_0) end
rule "Switch Light through Logo 4_Q_2" when Item Logo_4_state_Q_2 changed or Item Proxy_Logo_4_Q_2 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_2, Logo_4_state_Q_2, Logo_4_state_VB_402_0) end
rule "Switch Light through Logo 4_Q_3" when Item Logo_4_state_Q_3 changed or Item Proxy_Logo_4_Q_3 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_3, Logo_4_state_Q_3, Logo_4_state_VB_403_0) end
rule "Switch Light through Logo 4_Q_4" when Item Logo_4_state_Q_4 changed or Item Proxy_Logo_4_Q_4 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_4, Logo_4_state_Q_4, Logo_4_state_VB_404_0) end
rule "Switch Light through Logo 4_Q_11" when Item Logo_4_state_Q_11 changed or Item Proxy_Logo_4_Q_11 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_11, Logo_4_state_Q_11, Logo_4_state_VB_411_0) end
rule "Switch Light through Logo 4_Q_12" when Item Logo_4_state_Q_12 changed or Item Proxy_Logo_4_Q_12 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_12, Logo_4_state_Q_12, Logo_4_state_VB_412_0) end
rule "Switch Light through Logo 4_Q_13" when Item Logo_4_state_Q_13 changed or Item Proxy_Logo_4_Q_13 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_13, Logo_4_state_Q_13, Logo_4_state_VB_413_0) end
rule "Switch Light through Logo 4_Q_15" when Item Logo_4_state_Q_15 changed or Item Proxy_Logo_4_Q_15 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_15, Logo_4_state_Q_15, Logo_4_state_VB_415_0) end
rule "Switch Light through Logo 4_Q_16" when Item Logo_4_state_Q_16 changed or Item Proxy_Logo_4_Q_16 received command then LogoSwitchLogic.apply(receivedCommand, Proxy_Logo_4_Q_16, Logo_4_state_Q_16, Logo_4_state_VB_416_0) end
// vim: syntax=Xtend
Logo_Shutters.rules
import org.eclipse.smarthome.core.library.items.SwitchItem
import org.eclipse.xtext.xbase.lib.Functions
val Functions.Function5 LogoRolloLogic = [
org.openhab.core.types.Command Command, SwitchItem RuleProxySwitch, SwitchItem RuleRollState, SwitchItem RuleSwitchUp, SwitchItem RuleSwitchDown |
switch(Command)
{
case UP: {
RuleSwitchUp.sendCommand(ON)
Thread::sleep(150)
RuleSwitchUp.sendCommand(OFF)
}
case DOWN: {
RuleSwitchDown.sendCommand(ON)
Thread::sleep(150)
RuleSwitchDown.sendCommand(OFF)
}
case STOP: {
if(RuleRollState.state == 2 || RuleRollState.state==0){
RuleSwitchDown.sendCommand(ON)
Thread::sleep(1300)
RuleSwitchDown.sendCommand(OFF)
}
else
{
RuleSwitchUp.sendCommand(ON)
Thread::sleep(150)
RuleSwitchUp.sendCommand(OFF)
}
}
default: {
switch RuleRollState.state {
case 0 : RuleProxySwitch.postUpdate(100)
case 1 : RuleProxySwitch.postUpdate(50)
case 2 : RuleProxySwitch.postUpdate(0)
default : RuleProxySwitch.postUpdate(0)
}
}
}
]
rule "Rollershutter up_down Logo_1_Q1_Q2" when Item Roll_state_1_Q_1_Q_2 changed or Item Proxy_LogoRollo_1_Q_1_Q_2 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_1_Q_1_Q_2, Roll_state_1_Q_1_Q_2, Logo_1_state_VB_101_0, Logo_1_state_VB_102_0 ) end
rule "Rollershutter up_down Logo_1_Q5_Q6" when Item Roll_state_1_Q_5_Q_6 changed or Item Proxy_LogoRollo_1_Q_5_Q_6 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_1_Q_5_Q_6, Roll_state_1_Q_5_Q_6, Logo_1_state_VB_105_0, Logo_1_state_VB_106_0 ) end
rule "Rollershutter up_down Logo_1_Q7_Q8" when Item Roll_state_1_Q_7_Q_8 changed or Item Proxy_LogoRollo_1_Q_7_Q_8 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_1_Q_7_Q_8, Roll_state_1_Q_7_Q_8, Logo_1_state_VB_107_0, Logo_1_state_VB_108_0 ) end
rule "Rollershutter up_down Logo_1_Q14_Q13" when Item Roll_state_1_Q_14_Q_13 changed or Item Proxy_LogoRollo_1_Q_14_Q_13 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_1_Q_14_Q_13, Roll_state_1_Q_14_Q_13, Logo_1_state_VB_114_0, Logo_1_state_VB_113_0 ) end
rule "Rollershutter up_down Logo_2_Q7_Q8" when Item Roll_state_2_Q_7_Q_8 changed or Item Proxy_LogoRollo_2_Q_7_Q_8 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_2_Q_7_Q_8, Roll_state_2_Q_7_Q_8, Logo_2_state_VB_207_0, Logo_2_state_VB_208_0 ) end
rule "Rollershutter up_down Logo_2_Q9_Q10" when Item Roll_state_2_Q_9_Q_10 changed or Item Proxy_LogoRollo_2_Q_9_Q_10 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_2_Q_9_Q_10, Roll_state_2_Q_9_Q_10, Logo_2_state_VB_209_0, Logo_2_state_VB_210_0 ) end
rule "Rollershutter up_down Logo_3_Q7_Q8" when Item Roll_state_3_Q_7_Q_8 changed or Item Proxy_LogoRollo_3_Q_7_Q_8 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_3_Q_7_Q_8, Roll_state_3_Q_7_Q_8, Logo_3_state_VB_307_0, Logo_3_state_VB_308_0 ) end
rule "Rollershutter up_down Logo_3_Q10_Q11" when Item Roll_state_3_Q_10_Q_11 changed or Item Proxy_LogoRollo_3_Q_10_Q_11 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_3_Q_10_Q_11, Roll_state_3_Q_10_Q_11, Logo_3_state_VB_310_0, Logo_3_state_VB_311_0 ) end
rule "Rollershutter up_down Logo_4_Q5_Q6" when Item Roll_state_4_Q_5_Q_6 changed or Item Proxy_LogoRollo_4_Q_5_Q_6 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_4_Q_5_Q_6, Roll_state_4_Q_5_Q_6, Logo_4_state_VB_405_0, Logo_4_state_VB_406_0 ) end
rule "Rollershutter up_down Logo_4_Q7_Q8" when Item Roll_state_4_Q_7_Q_8 changed or Item Proxy_LogoRollo_4_Q_7_Q_8 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_4_Q_7_Q_8, Roll_state_4_Q_7_Q_8, Logo_4_state_VB_407_0, Logo_4_state_VB_408_0 ) end
rule "Rollershutter up_down Logo_4_Q9_Q10" when Item Roll_state_4_Q_9_Q_10 changed or Item Proxy_LogoRollo_4_Q_9_Q_10 received command then LogoRolloLogic.apply(receivedCommand, Proxy_LogoRollo_4_Q_9_Q_10, Roll_state_4_Q_9_Q_10, Logo_4_state_VB_409_0, Logo_4_state_VB_410_0 ) end
// vim: syntax=Xtend
I put the ProxyItems in my sitemap.
But somehow the binding seems to stop getting updates from Logoāsā¦
I can still trigger a proxy switch and the Logo will change the output Q, but i do not get the updated status of the logoās Q back. Now if i trigger a light externally (wall push button) i wonāt see it in openhab at all and i am out of syncā¦
I already reduced the refresh time to 1000ms, that seemed to make more things possible but some time later it stopās working too. If i go without:
Thing plclogo:analog:Logo_1_VW_452 [ block="452", threshold="1" ]
the status updates are working even longer, but stop working nevertheless.
I didnāt see any errors, but as i am not very experienced in openhab, maybe i was looking at the wrong log. I did:
log:set TRACE org.openhab.binding.plclogo
but there is no messages indicating a errorā¦
Do you have any Idea? If you need any logās, tell me. You can PM me, if you like (iām german ). Iām really interested i going deeper into itā¦
Thanks and greets
Jens
ps. hehe had to cut some text out due to input field limit of 32000 charactersā¦