OpenHAB and S7-300 from Siemens

Hello,
I´m looking for a solution making my home smarter with my Siemens S7-300.

So I googled and found OpenHAB for being the Master of most of the important “smart things”,
bute I don´t really found a way, how to connect with my S7-300 to read and write on it, to interact together.

Is there any way to be a part of OpenHab?
Because most of my switches, connectors etc. are wired to my S7.

Thank you
Thomas

Hi,
since I’m in a similar situation with S7 and OpenHAB, I am going to try to connect my existing S7-300 with TCP-Binding in OpenHAB using Open Communication Function on S7-300 (TSEND, TRCV, …).
I’m using OC Functions to communicate with a lot of other systems (not in my HA), so it should work with OpenHAB too.

If you intend to switch to the “new” PLCs like S7-1500 or 1200 (1200 should be enough für HA) you could easily use Modbus-TCP.

A third way could be MQTT. The advantage for me is, that I could use my existing MQTT setup (with OpenHAB and a view arduinos) in my HA and reduce the number of different protocols.
The disadvantage is, that the effort on S7 side is much higher to implement basic MQTT functionality.

So have fun finding your solution …

regards, Thomas

1 Like

Hi Thomas

I’m wondering about your third statement regarding the usage of MQTT. I mean it would be wonderful to address it that way. But how would you implement it on the “Device” side?

Kind regards
Stefan

Hi Stefan,

I’m wondering too :wink:

To be honest, I have not written a single line of code, since my last post to implement MQTT on S7 due to lack of time. My target is still an implementation of MQTT functionality on Simatic S7 1200/1500 series. But at the moment - no time!

I don’t know your PLC programming skills, but if you are going the same way then you could check this code . I found it a few days ago but didn’t have an eye on it yet.

If you are interested, I will let you know as soon as I have an MQTT implemetation for S7, but definitly not whithin the next 5-6 months - sorry.

regards
Thomas

Hi Thomas

Time is not important for me at the moment. The project I’m working on will anyway grow with the future.
On PLC I don’t have experience yet, but If I have some “spare” time to spend I could at least have a look into.

Regards
Stefan

Hello guys.
Did you manage to get the communication to the Plc up and running?

Hello All.
I’ve written a bit over PM with grugru…
We talked a bit about about how to setup the communcation with the blocks TSEND, TRCV, TCON & TDISC…
Also about that the MQTT is a good way for only sending values when the value changes…This can be programmed with something like when sending a value, then move the value to a shadow - and if the value again changes then send again.

But i was wondering if there’s a special way to assemble the message? We need a way to add a Header and a value.
I’ve seen a similar project, unfortunately it can’t compile on a S7-1200 but as i see it it can compile under a S7-1500 - since the 1200 system doesn’t accept “ANY” Data Type…

The project is pretty big, and i think a lot of it is made on a “non plc” way since it was compiled from a C Code… Maybe it was easier to build something self - then understand the meaning of it better :slight_smile: Always easier than to figure something out another has made.
Link for the sample they say works in a S7-300 environment:

Hello,
If there is still someone who is looking for communication with Simatic, you can try to test my binding:

Awesome - I definitely wanna test this… does it work for oh2?

Hello Vita
I will test this binding with with a S7300 and a Logo8 in the next 6 months

It works on OH2, tested with a Logo8. There is an issue on loading and on changing the items on the fly, I have built a working patch, needs a bit more testing (don’t know how it behaves with multiple plcs) and I will submit it to Vita.

some devices i can control other not.
also with the wiki for diagnostics i have some trouble to understand.

could somebody paste some real config here?

works:
Switch TestSimatic “momentary switch” { simatic=“plc:DB300.DBX4.6:byte:IO” }

works not:
Switch TestSimatic1 “light status” { simatic=“plc:DB300.DBX4.7:byte:IO” }

works not:
Number PortState “state [%s]” { simatic=“plc:DB300.DBX4.7:state” }

thanks

Hello @shorty707 ,

I tested it with S7-300, S7-400, S7-1200 and S7-1500 PLC. For @AchilleGR it works with Logo. If device not working totally, be sure you set correct rack/slot numbers.

In your first non working item configuration not sure why it does not work. It is something in log file? (…/userdata/logs/openhag.log)

Second case is wrong address configuration. For connection state correct is:
{ simatic="plc:info:state" }

Here is real binding config for OH2 (…/conf/services/simatic.cfg) with two plcs:

################################### Simatic Binding ######################################
#
# plc - define tagret PLC by IP address, cpu rack and slot. Definition look IP:rack.slot (ex.: 192.168.254.36:0.2). 
# Above that communication type can be optionally specify at the end separate by semicolon.
# Supported communication types : PG, OP and S7.
# It is possible defined more PLCs ex. plc, plc1, plc315,... 
# 
# refresh - check for new data interval - default 1000ms   
#
refresh=2000
plc417=192.168.254.124:0.2    
plc1515=192.168.254.127:0.1     

and items configuration (…/conf/items/simatic.items). :

Number 	S71515MB0	"MB0 [%d]"			{ simatic="plc1515:MB0:byte" }
Number 	S7417MB0	"MB0 [%d]"			{ simatic="plc417:MB0:byte" }

Color 	S71515MD1000	"MD1000"			{ simatic="plc1515:MD1000:rgbw:O" }
Color 	S71515MD2000	"MD2000"			{ simatic="plc1515:MD2000:rgbw:I" }

Switch 	S71515MB1004	"MB1004"			{ simatic="plc1515:MB1004:byte:O" }
Contact S71515MB2004	"MB2004"			{ simatic="plc1515:MB2004:byte:I" }

Number 	S71515_State	"PLC state [%s]"			{ simatic="plc1515:info:state" }
Number 	S71515_PrevState	"PLC previous state [%s]"	{ simatic="plc1515:info:previous_state" }
DateTime  S71515_StateChangeTime  "PLC changed [%1$tA, %1$td.%1$tm.%1$tY %1$tT]"    { simatic="plc1515:info:state_change_time" }

no actually nothing in the log for that item. I also set log level to DEBUG.
I will double check for config and update here with a log once I find some insights.

for that case… I first tried it with that exact syntax you provided… but there is no state value updated for this.

does that indicate more that my rack/slot config is wrong? is that possible at all if the log says the plc connection was established successfull?

If I understand the wiki here there is also the possibility to get the state for a “item/device”?

Item configuration is checked during loading. If it is wrong there should be record in log. But your item looks correct. So there shouldn’t be a problem. I device connected? (in DEBUG level there must be record in log). If it is connected and binding did not read the item it should be also logged. What kind of plc are u using? Are u reading only one item or more? If more could you provide your items configuration please? I’ll test it.

I checked wiki and there were mistakes. Sorry for that. Only device states could be obtained.

Hello @shorty707,

I tested your dysfunctional item and it works well for me.

Here are some log stuff, that should be presented in openhab.log:

Binding started:
2016-12-21 08:23:31.332 [DEBUG] [org.openhab.binding.simatic ] - BundleEvent STARTED - org.openhab.binding.simatic

PLC connected:
2016-12-21 08:23:35.071 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.127 - open() - connecting 2016-12-21 08:23:35.983 [INFO ] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.127 - connected

Read success:
2016-12-21 08:36:13.346 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.34 - Reading finished. Area=DB300.DBB4-DB300.DBB5 2016-12-21 08:36:13.346 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.34 - PostValue for item=TestSimatic1 (Device=plc MemAddress=DB300.DBX4.7/DB300.DBX4.7 DataType=BYTE Direction=0) 2016-12-21 08:36:13.346 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.254.34 - Incoming data - item:TestSimatic1/state:ON

Read error:
2016-12-21 08:36:13.597 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.34 - Read data area error (Area=DB464.DBB0-DB464.DBB9, Return code=0xa, Error=the desired item is not available in the PLC)

P.S.:tested on OH2.0b4 and latest binding (v.1.1.2)

Thanks for Helping!
I will try when I am back Home and update Log here.

Probably this will be saturday :frowning:

Thanks @vita

ok here we go:

simatic.cfg (It’s a S7-300)

simatic:refresh=2000
simatic:plc=192.168.0.200:0.2 

log:

2016-12-21 17:34:33.820 [DEBUG] [org.openhab.binding.simatic         ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=openhab/command/*, service.pid=org.openhab.simatic, refresh=2000, component.name=org.openhab.binding.simatic.binding, component.id=13, plc=192.168.0.200:0.2, service.id=262, service.bundleid=10, service.scope=bundle} - org.openhab.binding.simatic
2016-12-21 17:34:33.825 [DEBUG] [ding.simatic.internal.SimaticBinding] - allBindingsChanged(org.openhab.binding.simatic.internal.SimaticGenericBindingProvider@1593ec9) is called!
2016-12-21 17:34:33.826 [DEBUG] [ding.simatic.internal.SimaticBinding] - activate() method is called!
2016-12-21 17:34:33.826 [DEBUG] [ding.simatic.internal.SimaticBinding] - org.openhab.binding.simatic_1.9.0.201609230554 [10]
2016-12-21 17:34:33.832 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200 - readAreas:
2016-12-21 17:34:33.832 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - open() - connecting
2016-12-21 17:34:34.415 [INFO ] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - connected
2016-12-21 17:34:34.416 [DEBUG] [ding.simatic.internal.SimaticBinding] - setProperlyConfigured 
2016-12-21 17:34:34.454 [INFO ] [b.core.service.AbstractActiveService] - Simatic communication service has been started

items:

// Diagnose Items
Number    PortState            "PLC state [%s]"                 { simatic="plc:info:state" }
Number    PortPreviouState     "PLC previous state [%s]"        { simatic="plc:info:previous_state" }
DateTime  PortStateChangeTime  "PLC changed [%1$tA, %1$td.%1$tm.%1$tY %1$tT]"    { simatic="plc:info:state_change_time" }

// Test Items
Switch  TestSimatic		"Taster Gang"    { simatic="plc:DB300.DBX4.6:byte:IO" }
Contact  TestSimatic1		"Licht Gang"    { simatic="plc:DB300.DBX4.7:byte:IO" }

the 3 diagnosis items never get a value and stay NULL

2016-12-21 17:34:34.454 [DEBUG] [ding.simatic.internal.SimaticBinding] - execute() method is called!
2016-12-21 17:34:34.454 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:34:34.480 [DEBUG] [ternal.SimaticGenericBindingProvider] - processBindingConfiguration() method is called!
2016-12-21 17:34:34.481 [DEBUG] [ternal.SimaticGenericBindingProvider] - Item:PortState (Type=NumberItem, State=Uninitialized)/Config:plc:info:state
2016-12-21 17:34:34.482 [DEBUG] [ternal.SimaticGenericBindingProvider] - PortState (Device=plc InfoType=STATE)
2016-12-21 17:34:34.482 [DEBUG] [ding.simatic.internal.SimaticBinding] - bindingChanged(org.openhab.binding.simatic.internal.SimaticGenericBindingProvider@1593ec9,PortState) is called!
2016-12-21 17:34:34.483 [DEBUG] [ding.simatic.internal.SimaticBinding] - ItemsConfig: {}:0
2016-12-21 17:34:34.483 [DEBUG] [ternal.SimaticGenericBindingProvider] - processBindingConfiguration() method is called!
2016-12-21 17:34:34.483 [DEBUG] [ternal.SimaticGenericBindingProvider] - Item:PortPreviouState (Type=NumberItem, State=Uninitialized)/Config:plc:info:previous_state
2016-12-21 17:34:34.484 [DEBUG] [ternal.SimaticGenericBindingProvider] - PortPreviouState (Device=plc InfoType=PREVIOUS_STATE)
2016-12-21 17:34:34.484 [DEBUG] [ding.simatic.internal.SimaticBinding] - bindingChanged(org.openhab.binding.simatic.internal.SimaticGenericBindingProvider@1593ec9,PortPreviouState) is called!
2016-12-21 17:34:34.484 [DEBUG] [ding.simatic.internal.SimaticBinding] - ItemsConfig: {}:0
2016-12-21 17:34:34.485 [DEBUG] [ternal.SimaticGenericBindingProvider] - processBindingConfiguration() method is called!
2016-12-21 17:34:34.485 [DEBUG] [ternal.SimaticGenericBindingProvider] - Item:PortStateChangeTime (Type=DateTimeItem, State=Uninitialized)/Config:plc:info:state_change_time
2016-12-21 17:34:34.485 [DEBUG] [ternal.SimaticGenericBindingProvider] - PortStateChangeTime (Device=plc InfoType=STATE_CHANGE_TIME)
2016-12-21 17:34:34.486 [DEBUG] [ding.simatic.internal.SimaticBinding] - bindingChanged(org.openhab.binding.simatic.internal.SimaticGenericBindingProvider@1593ec9,PortStateChangeTime) is called!
2016-12-21 17:34:34.486 [DEBUG] [ding.simatic.internal.SimaticBinding] - ItemsConfig: {}:0
2016-12-21 17:34:34.486 [DEBUG] [ternal.SimaticGenericBindingProvider] - processBindingConfiguration() method is called!

the switch and the contact item when intially loaded:

2016-12-21 17:34:34.486 [DEBUG] [ternal.SimaticGenericBindingProvider] - Item:TestSimatic (Type=SwitchItem, State=Uninitialized)/Config:plc:DB300.DBX4.6:byte:IO
2016-12-21 17:34:34.489 [DEBUG] [ternal.SimaticGenericBindingProvider] - TestSimatic (Device=plc MemAddress=DB300.DBX4.6/DB300.DBX4.6 DataType=BYTE Direction=0)
2016-12-21 17:34:34.490 [DEBUG] [ding.simatic.internal.SimaticBinding] - bindingChanged(org.openhab.binding.simatic.internal.SimaticGenericBindingProvider@1593ec9,TestSimatic) is called!
2016-12-21 17:34:34.490 [DEBUG] [ding.simatic.internal.SimaticBinding] - ItemsConfig: {TestSimatic=TestSimatic (Device=plc MemAddress=DB300.DBX4.6/DB300.DBX4.6 DataType=BYTE Direction=0)}:1
2016-12-21 17:34:34.490 [DEBUG] [ternal.SimaticGenericBindingProvider] - processBindingConfiguration() method is called!
2016-12-21 17:34:34.491 [DEBUG] [ternal.SimaticGenericBindingProvider] - Item:TestSimatic1 (Type=ContactItem, State=Uninitialized)/Config:plc:DB300.DBX4.7:byte:IO
2016-12-21 17:34:34.491 [DEBUG] [ternal.SimaticGenericBindingProvider] - TestSimatic1 (Device=plc MemAddress=DB300.DBX4.7/DB300.DBX4.7 DataType=BYTE Direction=0)
2016-12-21 17:34:34.491 [DEBUG] [ding.simatic.internal.SimaticBinding] - bindingChanged(org.openhab.binding.simatic.internal.SimaticGenericBindingProvider@1593ec9,TestSimatic1) is called!
2016-12-21 17:34:34.492 [DEBUG] [ding.simatic.internal.SimaticBinding] - ItemsConfig: {TestSimatic=TestSimatic (Device=plc MemAddress=DB300.DBX4.6/DB300.DBX4.6 DataType=BYTE Direction=0), TestSimatic1=TestSimatic1 (Device=plc MemAddress=DB300.DBX4.7/DB300.DBX4.7 DataType=BYTE Direction=0)}:2

the switch works(in S7 config it is the button) the contact does not work (which is the output and reflects the status of the light. so if the switch is turning the light on the contact should get updated to 1 and if the light is turned of the contact item should show 0 … its a full star topology)

the log shows I push the switch button … and this also works! I would expect that the binding actually reads the contact item from the S7 and changes the state of this aswell

2016-12-21 17:39:34.473 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:39:46.249 [DEBUG] [ding.simatic.internal.SimaticBinding] - internalReceiveCommand(TestSimatic,ON) is called!
2016-12-21 17:39:46.249 [DEBUG] [imatic.internal.SimaticWriteDataArea] - create(): item:TestSimatic|datatype:BYTE
2016-12-21 17:39:46.249 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200: Adding command into queue
2016-12-21 17:39:46.249 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200 - Processing commandQueue - length 1. Thread=242
2016-12-21 17:39:46.249 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - Sending data to device
2016-12-21 17:39:46.249 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - writeBits(area=132,db=300,adr=38,len=1, data=1)
2016-12-21 17:39:46.250 [DEBUG] [.binding.simatic.internal.SimaticTCP] - 1,
2016-12-21 17:39:49.783 [DEBUG] [ding.simatic.internal.SimaticBinding] - internalReceiveCommand(TestSimatic,OFF) is called!
2016-12-21 17:39:49.783 [DEBUG] [imatic.internal.SimaticWriteDataArea] - create(): item:TestSimatic|datatype:BYTE
2016-12-21 17:39:49.783 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200: Adding command into queue
2016-12-21 17:39:49.783 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200 - Processing commandQueue - length 1. Thread=242
2016-12-21 17:39:49.784 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - Sending data to device
2016-12-21 17:39:49.784 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - writeBits(area=132,db=300,adr=38,len=1, data=1)
2016-12-21 17:39:49.784 [DEBUG] [.binding.simatic.internal.SimaticTCP] - 0,
2016-12-21 17:39:54.473 [DEBUG] [ding.simatic.internal.SimaticBinding] - execute() method is called!
2016-12-21 17:39:54.473 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:40:14.473 [DEBUG] [ding.simatic.internal.SimaticBinding] - execute() method is called!
2016-12-21 17:40:14.473 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:40:34.474 [DEBUG] [ding.simatic.internal.SimaticBinding] - execute() method is called!
2016-12-21 17:40:34.474 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:40:44.743 [DEBUG] [ding.simatic.internal.SimaticBinding] - internalReceiveCommand(TestSimatic,ON) is called!
2016-12-21 17:40:44.744 [DEBUG] [imatic.internal.SimaticWriteDataArea] - create(): item:TestSimatic|datatype:BYTE
2016-12-21 17:40:44.744 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200: Adding command into queue
2016-12-21 17:40:44.745 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200 - Processing commandQueue - length 1. Thread=242
2016-12-21 17:40:44.745 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - Sending data to device
2016-12-21 17:40:44.745 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - writeBits(area=132,db=300,adr=38,len=1, data=1)
2016-12-21 17:40:44.745 [DEBUG] [.binding.simatic.internal.SimaticTCP] - 1,
2016-12-21 17:40:54.474 [DEBUG] [ding.simatic.internal.SimaticBinding] - execute() method is called!
2016-12-21 17:40:54.474 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:41:14.474 [DEBUG] [ding.simatic.internal.SimaticBinding] - execute() method is called!
2016-12-21 17:41:14.474 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - checkNewData() is called
2016-12-21 17:41:32.476 [DEBUG] [ding.simatic.internal.SimaticBinding] - internalReceiveCommand(TestSimatic,OFF) is called!
2016-12-21 17:41:32.476 [DEBUG] [imatic.internal.SimaticWriteDataArea] - create(): item:TestSimatic|datatype:BYTE
2016-12-21 17:41:32.476 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200: Adding command into queue
2016-12-21 17:41:32.477 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.0.200 - Processing commandQueue - length 1. Thread=243
2016-12-21 17:41:32.477 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - Sending data to device
2016-12-21 17:41:32.477 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.0.200 - writeBits(area=132,db=300,adr=38,len=1, data=1)
2016-12-21 17:41:32.477 [DEBUG] [.binding.simatic.internal.SimaticTCP] - 0,

Hello @shorty707,

it looks strange, because your configuration (processBindingConfiguration() method) is loaded after binding activation (activate() method). Log should look like this:

2016-12-21 08:23:25.028 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'simatic.items'
2016-12-21 08:23:27.014 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'simatic.sitemap'
2016-12-21 08:23:30.916 [DEBUG] [org.openhab.binding.simatic         ] - BundleEvent STARTING - org.openhab.binding.simatic
2016-12-21 08:23:30.917 [DEBUG] [ng.simatic.internal.SimaticActivator] - Simatic binding has been started.
2016-12-21 08:23:31.331 [DEBUG] [org.openhab.binding.simatic         ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.simatic.SimaticBindingProvider}={component.name=org.openhab.binding.simatic.genericbindingprovider, component.id=114, service.id=238, service.bundleid=194, service.scope=bundle} - org.openhab.binding.simatic
2016-12-21 08:23:31.332 [DEBUG] [org.openhab.binding.simatic         ] - BundleEvent STARTED - org.openhab.binding.simatic
2016-12-21 08:23:32.651 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2016-12-21 08:23:32.930 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2016-12-21 08:23:33.664 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
2016-12-21 08:23:33.886 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2016-12-21 08:23:34.857 [DEBUG] [ternal.SimaticGenericBindingProvider] - processBindingConfiguration() method is called!
2016-12-21 08:23:34.858 [DEBUG] [ternal.SimaticGenericBindingProvider] - Item:TestSwitch (Type=SwitchItem, State=Uninitialized)/Config:plc:M0.0:byte
2016-12-21 08:23:34.878 [DEBUG] [ternal.SimaticGenericBindingProvider] - TestSwitch (Device=plc MemAddress=M0.0/M0.0 DataType=BYTE Direction=0)
...
2016-12-21 08:23:35.019 [DEBUG] [ding.simatic.internal.SimaticBinding] - activate() method is called!
2016-12-21 08:23:35.019 [DEBUG] [ding.simatic.internal.SimaticBinding] - org.openhab.binding.simatic_1.9.0.201612130945 [194]
...
2016-12-21 08:23:35.069 [DEBUG] [imatic.internal.SimaticGenericDevice] - Locking
2016-12-21 08:23:35.071 [DEBUG] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.254.127 - readAreas:
2016-12-21 08:23:35.071 [DEBUG] [imatic.internal.SimaticGenericDevice] - M0-M1
2016-12-21 08:23:35.071 [DEBUG] [imatic.internal.SimaticGenericDevice] - M104-M108
2016-12-21 08:23:35.071 [DEBUG] [imatic.internal.SimaticGenericDevice] - M2000-M2009
2016-12-21 08:23:35.071 [DEBUG] [imatic.internal.SimaticGenericDevice] - Unlocking
2016-12-21 08:23:35.071 [DEBUG] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.127 - open() - connecting
2016-12-21 08:23:35.983 [INFO ] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.254.127 - connected

This problem was there in previous version and Achilles solved it. Did you use latest binding version (https://github.com/docbender/openHAB-Simatic/releases/download/1.1.2/org.openhab.binding.simatic-1.9.0-SNAPSHOT.jar)? Not accorging to your log:

2016-12-21 17:34:33.826 [DEBUG] [ding.simatic.internal.SimaticBinding] - activate() method is called!
2016-12-21 17:34:33.826 [DEBUG] [ding.simatic.internal.SimaticBinding] - org.openhab.binding.simatic_1.9.0.201609230554 [10]

It should be:
2016-12-21 08:34:20.813 [DEBUG] [ding.simatic.internal.SimaticBinding] - org.openhab.binding.simatic_1.9.0.201612130945 [194]

Ok Oh seems to cache the old jar somewhere. I had 2 versions … I uninstalled the old manually with Bundle uninstall. Seems better now.

Since Most of my physical light “switches” are actually Push Buttons … How can I do that in OH Not a Switch but a ‘pushbutton’?

Thanks @vita

EDIT: ok I found the trick in the wiki …
{autoupdate=“false”} does it :smiley: