On every howTo I find, it is explained, that I should copy the JAR file to the addon folder, but I can not find any JAR for that addon, do I have to complile it by myself? In this package is also a Moka7 package, do I have to make a JAR file for that too? Is there a configuration for Moka7 necessary?

Thank you very much for the .Jar file.
Openhab loads the addon, but after that, I get this Error:
[org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=276, bundle=205/file:/usr/share/openhab2/addons/org.openhab.binding.plclogo-1.10.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.plclogo
java.lang.IllegalArgumentException: hostname can’t be null

In the file /etc/openhab2/services/plc.cfg I have the following configuration:

Try to delete the plclogo: in front of every parameter and please rename the file to plclogo.cfg, now it should look like:

# plclogo:.host= IP address of the LOGO! PLC
bcu.host=192.168.1.11
# plclogo:.remoteTSAP= the TSAP (in hex) of the remote LOGO! PLC, as configured by LogoSoft Comfort. Common used value is 0x0200.
bcu.remoteTSAP=0x0200
# plclogo::localTSAP= the TSAP (in hex) to be used by the local instance. Common used value is 0x0300.
bcu.localTSAP=0x0100
# plclogo:refresh= polling interval in milliseconds to be used when querying the LOGO!. Default is 5000mS
refresh=5000

If this does not work, try the old configuration way, move plclogo.cfg to openhab.cfg (you then will have to add plclogo: in each row, because openHAB needs to know to which binding the parameter belongs…)

Probably it would be best to clear all the settings through karaf and renew the settings from the file (/etc/openhab2/services/plclogo.cfg) by at least commenting out all garbage and save the file (openHAB should reread the config instantly, so the settings will reappear in the karaf console with

i have a similar problems or at least i’m trying to get my 4x Logo 7 to connect with openhab too.
Currently i have LogoControl running with the Logo’s and want to switch to openHAB.
I’d like to jump on your topic, as Siemens Logo with openHAB don’t seem to be that common and i’m glad i found some other’s working on it.

I had the bcu, too, but it wasn’t in my plclogo.cfg. So i removed the plclogo.jar and cfg file - restartet openHAB and now i only have the logos from my plclogo.cfg file.

# plclogo:.host= IP address of the LOGO! PLC
Logo1.host=192.168.0.181
Logo2.host=192.168.0.182
Logo3.host=192.168.0.183
Logo4.host=192.168.0.184
# 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
Logo3.remoteTSAP=0x0200
Logo4.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
Logo3.localTSAP=0x0100
Logo4.localTSAP=0x0100
# plclogo:refresh= polling interval in milliseconds to be used when querying the LOGO!. Default is 5000mS
refresh=1000
Logo1.model=0BA7
Logo2.model=0BA7
Logo3.model=0BA7
Logo4.model=0BA7

The lazy way would be to use the expire binding to reset the input, but unfortunately you would need two buttons to switch on/off.
How do you get feedback from Logo! to openHAB? openHAB should know wether the lights are switched on or off…

This might be useful - but it does rely on OpenHAB knowing the real state of the rellay

rossko57:

That's not what autoupdate does. Example: autoupdate=false will stop (say) a rule-generated myswitch.sendCommand(ON) from setting the Item state to ON automatically by Openhab. If the binding of the switch receives an update from the hardware that the switch is really now on, the Item still gets updated by the binding. So autoupdate=false allows you to monitor the actual state of device, while autoupdate=true allows more faster display of the expected state in a sitemap. In your case the ti…

rule "Switch Light through Logo"
when
Item ReadOutputQ6 changed or // light changed external
Item MyProxySwitch received command // light changed internal
then
if(receivedCommand==ON ||receivedCommand==OFF) { // ensure there was a received command, so second item triggered rule
if (ReadOutputQ6.state != receivedCommand) { // only if state changed
TestSwitchQ6.sendCommand(ON) // send an ON
TestSwitchQ6.sendCommand(OFF) // send an OFF
}
}
else // no trigger from proxy switch, so state changed externally
if (ReadOutputQ6.state != MyProxySwitch.state) { // if state changed really
MyProxySwitch.postUpdate(ReadOutputQ6.state) // update the state without triggering the rule
}
end

You could do the jobs in two rules, but I’m pretty sure one rule would work either.

So I were able to delete all unnecessary configs through the karaf console with:

config:delete org.openhab.plc

My plc.cfg looks now like that:

# 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

The information, that Logocontrol and openhab can`t connect at the same time, was very very useful!

So unfortunately I still was not able to connect to the logo with the following items: