I think that something is wrong with the jar that you donwloaded (size is smaller than what is available online)
Maybe you grabbed the blob, not the raw entry
i just published new Version of the binding with new pulse thing. New version can be download here. Additionally a lot of things are happend inside due to PR - Review.
I am glad there are so many others involved to this topic and there are now so many helpful informations.
I wanted to summarize this information into a “HowTo” and tried a totally new installation, but unfortunately, I don’t get it working again, so I am not able to do the “HowTo”
# plclogo:.host= IP address of the LOGO! PLC
Logo1.host=192.168.1.11
Logo2.host=192.168.1.12
# plclogo:.remoteTSAP= the TSAP (in hex) of the remote LOGO! PLC, as configured by LogoSoft Comfort. Common used value is 0x0200.
Logo1.remoteTSAP=0x0200
Logo2.remoteTSAP=0x0200
# plclogo::localTSAP= the TSAP (in hex) to be used by the local instance. Common used value is 0x0300.
Logo1.localTSAP=0x0100
Logo2.localTSAP=0x0100
# plclogo:refresh= polling interval in milliseconds to be used when querying the LOGO!. Default is 5000mS
refresh=1000
Logo1.model=0BA8
Logo2.model=0BA8
But I think this config file is not necessary anymore?
After that, I found the PLC Logo in the bindings and my two logos in the things.
So I changed the Local TSAP to 0x0100 and the remote TSAP to 0x0200 and set the LogoFamily to 0BA8.
there no need for plc.cfg. This file is need for the openhab1 version of binding. Please remove it. Then create logo.things file in things subdirectory:
rule "Switch Light through Logo_1"
when
Item ReadOutput01 changed or // light changed external
Item ruleSwitch01 received command // light changed internal
then
if(receivedCommand==ON ||receivedCommand==OFF) { // ensure there was a received command, so second item triggered rule
if (ReadOutput01.state != receivedCommand) { // only if state changed
invisibleSwitch01.sendCommand(ON) // send an ON
invisibleSwitch01.sendCommand(OFF) // send an OFF
}
}
else { // no trigger from proxy switch, so state changed externally
if (ReadOutput01.state != ruleSwitch01.state) { // if state changed really
ruleSwitch01.postUpdate(ReadOutput01.state) // update the state without triggering the rule
}
}
end
logo.things:
Bridge plclogo:device:Logo1 [ address="192.168.1.11", family="0BA8", localTSAP="0x0100", remoteTSAP="0x0200", refresh=100 ]
{
Thing digital VB200_2 [ block="VB200.2" ]
Thing digital VB201_2 [ block="VB201.2" ]
Thing digital Q1 [ block="Q1" ]
Thing digital Q9 [ block="Q9" ]
}
Good afternoon
is there anyone who’s using the PLC logo binding together with the latest unstable release of OH2 (at the moment 2.2.0-SNAPSHOT Build #1075).
PLC logo has worked well since last week, but now “PLC Logo” is listed as “installed” in Karaf consol, but when i try to start it, I’m getting the following error:
Error executing command: Error executing command on bundles:
Error starting bundle 15: Could not resolve module: org.openhab.binding.plclogo [15]
Unresolved requirement: Import-Package: org.apache.commons.net.util
Anyone with the same issue? Or even better: Does anyone have an advise how to resolve this issue?
Thanks!
after long time, i rewrote the binding: Now much less things are need. Sadly, changes in configuration are not backward compatible to previous version. Updated readme can be found here. And prebuild binary here.
I am new to openhab2 and try to configure my openhab2 by examples.
I have 2 0ba8 for my shutters. Can someone help me with examples of his working configuratiuon.
I use the composition with zPos variant on my logo.My two logos are already online in the PaperUI,
but the configuration of the inputs and outputs is on UNINITIALIZED - HANDLER_CONFIGURATION_PENDING.
I used the example from the documentation and adapted it to my situation.
According to error message, some required parameter are missing or have invalid format. It’s a little bit hard to provide more information about error without your configuration. If you send configuration, at least *.things file, as well binding version via PM, i’ll try to figure out what the problem is.
// things
Thing digital Outputs [ kind="Q" ]
Thing memory VB0_2 [ block="VB0.2" ]
// items
Switch Relay3 "Relay#3" (LOGO1) { channel="plclogo:digital:PLC01:Outputs:Q4" }
Switch PLC01_NI2 "PLC01_NI2" (LOGO1) { channel="plclogo:memory:PLC01:VB0_2:state" }
Switch VButton2 "VButton2" (LOGO1)
// rules
rule "forward VButton2 command to logo NI"
when
Item VButton2 received command
then
// short pulse
sendCommand(PLC01_NI2, ON)
sendCommand(PLC01_NI2, OFF)
end
rule "update VButton2 from logo relay"
when
Item Relay3 received update
then
postUpdate(VButton2, Relay3.state)
end
with this:
// things
Thing digital Outputs [ kind="Q" ]
Thing pulse VB0_1 [ block="VB0.1", pulse=100 ]
// items
Switch Relay1 "Relay#1" (LOGO1) { channel="plclogo:digital:PLC01:Outputs:Q2" }
Switch PLC01_NI1 "PLC01_NI1" (LOGO1) { channel="plclogo:pulse:PLC01:VB0_1:state" }
// rules
rule "forward Relay1 command to logo NI1"
when
Item Relay1 received command
then
sendCommand(PLC01_NI1, ON) // short pulse
end
to make my light switches work as I expect (physical click on the wall and virtual click in habpanel).
Best Regards and happy new year to you too!
Jacek
PS. I know that the base version was overcomplicated but still… the pulse thing made me re-think this and get a simpler solution.
cool One thing i didn’t catch:
Has sendCommand(PLC01_NI1, ON) any effect on Logo? I failed to set network inputs on Logo this way:
I simply connected NI1 and NI2 to RS-trigger and took a look into online simulation in LogoSoft. Trigger had not changed it state. Should be there any special mapping for NI-blocks in LogoSoftComfort?
How would you trigger the pulse if not by sendCommand(PLC01_NI1, ON)?
I had one case where the things would not react as they should but restarting openhab solved it. I was testing different approaches and I think I changed too many things too quickly so openhab was not able to properly re-wire all pieces.
Grrr… I didn’t match your items to things properly yesterday: PLC01_NI1 modifies the address VB0.1 and not memory address of NI1 directly. This way it works. I hoped, that you found a way to write the NI1 address directly without additional mapping to “normal” memory. Seems, that NI-Blocks memory range is read-only. Strange is, that directly write to marker (M-Blocks) memory range works…