Giter Club home page Giter Club logo

openhab-simatic's People

Contributors

achillegr avatar docbender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhab-simatic's Issues

OH3 send Number value not working

Hi,

looks like send and write Number value to the PLC not working:

After set some value for Rollershutter position and running the rule nothing happens on the PLC site, the value stil unchanged.
Here the rule:

rule "Roleta biuro"
when
    Item PietroBiuroRoleta received command
then
    if (!(receivedCommand instanceof Number))
        switch receivedCommand {
            case UP :    if (PLC_PietroBiuroRoletaStany.state <=1) {
                                 PietroBiuroRoleta.sendCommand(STOP) }
                            else
                                { PLC_PietroBiuroRoletaOtworz.sendCommand(ON)
                                 PLC_PietroBiuroRoletaOtworz.sendCommand(OFF) }
            case DOWN :  if (PLC_PietroBiuroRoletaStany.state <=1) {
                                 PietroBiuroRoleta.sendCommand(STOP) }  
                            else 
                                { PLC_PietroBiuroRoletaZamknij.sendCommand(ON)
                                 PLC_PietroBiuroRoletaZamknij.sendCommand(OFF) }
            case STOP :  if (PLC_PietroBiuroRoletaStany.state == 0) { 
                             PLC_PietroBiuroRoletaOtworz.sendCommand(ON)
                             PLC_PietroBiuroRoletaOtworz.sendCommand(OFF) }  
                         else if (PLC_PietroBiuroRoletaStany.state == 1) { 
                             PLC_PietroBiuroRoletaZamknij.sendCommand(ON)
                             PLC_PietroBiuroRoletaZamknij.sendCommand(OFF) }     
        }
    else
        if (receivedCommand instanceof Number && (PLC_PietroBiuroRoletaStany.state >= 2))
                       PLC_PietroBiuroRoletaPozycjaZ.sendCommand(receivedCommand)
end

Log:

2020-11-21 12:35:53.651 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'PietroBiuroRoleta' received command 57
2020-11-21 12:35:54.702 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'PLC_PietroBiuroRoletaPozycjaZ' received command 57
2020-11-21 12:35:54.717 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PietroBiuroRoleta' changed from 81 to 57
2020-11-21 12:35:54.877 [INFO ] [rthome.event.ItemStatePredictedEvent] - Item 'PLC_PietroBiuroRoletaPozycjaZ' predicted to become 57
2020-11-21 12:35:54.927 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_PietroBiuroRoletaPozycjaZ' changed from 0 to 57
2020-11-21 12:35:55.216 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_PietroBiuroRoletaPozycjaZ' changed from 57 to 0

Also same behaviour if want to change target temp. for Thermostat but here the item is connected direct with PLC channel without rule:

2020-11-21 12:43:08.149 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'BiuroTermTrybZadanySlowo' received command Chłodzenie
2020-11-21 12:43:10.167 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'PLC_BiuroTempZ' received command 22.0
2020-11-21 12:43:10.311 [INFO ] [rthome.event.ItemStatePredictedEvent] - Item 'PLC_BiuroTempZ' predicted to become 22.0
2020-11-21 12:43:10.373 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_BiuroTempZ' changed from 21.0 °C to 22.0 °C
2020-11-21 12:43:11.248 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_BiuroTempZ' changed from 22.0 °C to 21.0 °C

Support OH.4.x.x

Hi,

in OH.4.x.x we see strange INFO in log, however binding is working correct. Will you support OH.4.x.x?

2023-03-05 13:46:19.091 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:bridge:b5f2a79e5c' changed from UNINITIALIZED (HANDLER_MISSING_ERROR): Handler factory not found to UNINITIALIZED (NOT_YET_READY)
2023-03-05 13:46:19.102 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:635e89005f' changed from UNINITIALIZED (HANDLER_MISSING_ERROR): Handler factory not found to UNINITIALIZED (NOT_YET_READY)
2023-03-05 13:46:19.990 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:bridge:b5f2a79e5c' changed from UNINITIALIZED (NOT_YET_READY) to INITIALIZING
2023-03-05 13:46:20.012 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:bridge:b5f2a79e5c' changed from INITIALIZING to UNKNOWN
2023-03-05 13:46:20.113 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:635e89005f' changed from UNINITIALIZED (NOT_YET_READY) to INITIALIZING
2023-03-05 13:46:20.299 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:635e89005f' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR

Thanks
Grzegorz

UNKNOWN error on the bridge

I just updated to openhab 4.0.1. On my previous version (3.4) I worked with the simatic bridge to connect to my S7-1500 PLC. I just installed the new simatic binding and I keep having the issure that the simatic bridge stays in state "UNKNOWN" instead of going online. Thanks in advance for the support! Let me know if more information is needed.

Slow response and system faulty

Hi,

I have regularly updated OH2 to latest snapshot now I’m on 2.5.0-1596, from less than two months simatic binding is a terrible slower complete system and consequently leads to a total system failure. I thing this behavior corespondent with latest changes in OH2. Downgrade to 2.5.0-M1 or remove Simatic binding solves this problem.

Can U check this behavior and fixed if possible?

2019-05-20 23:51:06.198 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.io.rest.sse.internal.listeners.SseEventSubscriber@1f62a26' takes more than 5000ms.
 ==> /var/log/openhab2/events.log <==
2019-05-20 23:56:16.096 [vent.ItemStateChangedEvent] - PLC_EnergiaNapL1L2 changed from 417.510009765625 to 418.1199951171875
==> /var/log/openhab2/openhab.log <==
2019-05-20 23:56:16.108 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.io.monitor.internal.EventLogger@f4b49c' takes more than 5000ms.
==> /var/log/openhab2/events.log <==
2019-05-20 23:56:35.824 [vent.ItemStateChangedEvent] - PLC_EnergiaNapL2L3 changed from 416.3399963378906 to 416.80999755859375
==> /var/log/openhab2/openhab.log <==
2019-05-20 23:56:40.338 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.io.monitor.internal.EventLogger@f4b49c' takes more than 5000ms.
2019-05-20 23:58:49.982 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 3e76f50c-1d22-4c29-8b2c-b4236812eb51, base URL = http://localhost:8080)
2019-05-21 00:05:48.464 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@1a318b4' takes more than 5000ms.
2019-05-21 00:11:25.660 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.io.monitor.internal.EventLogger@f4b49c' takes more than 5000ms.
2019-05-21 00:12:13.450 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.openhab.core.events.internal.EventBridge@1bfc064' takes more than 5000ms.
2019-05-21 00:18:46.567 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) ~[?:?]
 	at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) ~[?:?]
 	at sun.nio.cs.StreamDecoder.<init>(StreamDecoder.java:251) ~[?:?]
 	at sun.nio.cs.StreamDecoder.<init>(StreamDecoder.java:231) ~[?:?]
 	at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:69) ~[?:?]
 	at java.io.InputStreamReader.<init>(InputStreamReader.java:74) ~[?:?]
 	at org.openhab.binding.exec.internal.handler.ExecHandler$1.run(ExecHandler.java:181) ~[?:?]
 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
 	at java.lang.Thread.run(Thread.java:748) [?:?]
 2019-05-21 00:21:37.208 [INFO ] [control.internal.WebSocketConnection] - Web Socket close 1006. Reason: WebSocket Read EOF
 2019-05-21 00:22:59.618 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.io.rest.sse.internal.listeners.SseEventSubscriber@1f62a26' takes more than 5000ms.
 2019-05-21 00:26:28.586 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - 
 java.lang.OutOfMemoryError: Java heap space
 2019-05-21 00:26:24.137 [ERROR] [org.apache.felix.fileinstall        ] - In main loop, we have serious trouble
 java.lang.OutOfMemoryError: Java heap space
 2019-05-21 00:27:46.575 [WARN ] [me.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.eclipse.smarthome.core.internal.items.ItemUpdater@1a318b4' takes more than 5000ms.
 2019-05-21 00:31:29.203 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
 java.lang.OutOfMemoryError: Java heap space
 2019-05-21 00:32:55.394 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
 java.lang.OutOfMemoryError: Java heap space
 2019-05-21 00:40:25.140 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
 java.lang.OutOfMemoryError: Java heap space
 2019-05-21 01:23:19.709 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
 java.lang.NullPointerException: null
 	at org.openhab.binding.denonmarantz.internal.connector.telnet.DenonMarantzTelnetConnector.dispose(DenonMarantzTelnetConnector.java:100) ~[?:?]
 	at org.openhab.binding.denonmarantz.internal.handler.DenonMarantzHandler.connectionError(DenonMarantzHandler.java:417) ~[?:?]
 	at org.openhab.binding.denonmarantz.internal.DenonMarantzState.connectionError(DenonMarantzState.java:64) ~[?:?]
 	at org.openhab.binding.denonmarantz.internal.connector.telnet.DenonMarantzTelnetConnector.telnetClientConnected(DenonMarantzTelnetConnector.java:79) ~[?:?]
 	at org.openhab.binding.denonmarantz.internal.connector.telnet.DenonMarantzTelnetClient.connectTelnetSocket(DenonMarantzTelnetClient.java:146) ~[?:?]
 	at org.openhab.binding.denonmarantz.internal.connector.telnet.DenonMarantzTelnetClient.run(DenonMarantzTelnetClient.java:66) ~[?:?]
 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
 	at java.lang.Thread.run(Thread.java:748) [?:?]
 2019-05-21 02:18:40.478 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
 java.lang.OutOfMemoryError: Java heap space
 2019-05-21 02:18:45.173 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
 java.lang.OutOfMemoryError: Java heap space

Thank
Grzegorz

BufferUnderflowException - Read data error OH3.0

Hi,

After create more as 152 Channels get communications error with PLC,
only first 152 Channels are read correct all over not:

==> /var/log/openhab/events.log <==
2020-09-28 16:45:55.136 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_OczkoLampaUvCzasOdliczanie' changed from 2464731 to 2463959
2020-09-28 16:45:55.138 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'OczkoPompaCzasOdliczanieSec' changed from 2464.73100000 to 2463.95900000
2020-09-28 16:45:55.143 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'OczkoLampaUvCzasOdliczanieSec' changed from 2464.73100000 to 2463.95900000
2020-09-28 16:45:55.672 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_WodaCis' changed from 3.6024956703186035 to 3.6010489463806152

==> /var/log/openhab/openhab.log <==
2020-09-28 16:45:55.923 [ERROR] [nternal.simatic.SimaticGenericDevice] - 192.168.1.30 - Read data error
java.nio.BufferUnderflowException: null
        at java.nio.Buffer.nextGetIndex(Buffer.java:650) ~[?:?]
        at java.nio.HeapByteBuffer.getFloat(HeapByteBuffer.java:504) ~[?:?]
        at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.postValue(SimaticGenericDevice.java:544) ~[bundleFile:?]
        at org.openhab.binding.simatic.internal.simatic.SimaticTCP.readDataArea(SimaticTCP.java:320) ~[bundleFile:?]
        at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.checkNewData(SimaticGenericDevice.java:389) [bundleFile:?]
        at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.execute(SimaticGenericDevice.java:136) [bundleFile:?]
        at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.lambda$0(SimaticGenericDevice.java:109) [bundleFile:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

==> /var/log/openhab/events.log <==
2020-09-28 16:45:55.926 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_OczkoPompaCzasOdliczanie' changed from 2463959 to 2463166
2020-09-28 16:45:55.930 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_OczkoLampaUvCzasOdliczanie' changed from 2463959 to 2463166
2020-09-28 16:45:55.931 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'OczkoPompaCzasOdliczanieSec' changed from 2463.95900000 to 2463.16600000
2020-09-28 16:45:55.935 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'OczkoLampaUvCzasOdliczanieSec' changed from 2463.95900000 to 2463.16600000
2020-09-28 16:45:56.458 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'PLC_CwuTemp' changed from 32.61357116699219 to 32.6171875

Performance Issues - CPU/Memory

Hi,

First of all, much love for this addon. Helped me a lot with my home automation system.

I run my openhab in a docker container on a RPI4.
And sometimes (1-3 times a month) my CPU starts to spike and I can see a high memory use.

I have logged this on the forums if there is a way to find the issue:
https://community.openhab.org/t/oh3-ramping-cpu-issue/126692

By analyzing I have found out that the simatic addon is taking a lot of CPU and keeps ramping up, same as memory.
I have around +-185 items connected to a simatic state. Polling is default and all of them using the DB addresses except 7 items that read state of an I address.

image

Before red is with simatic, between red and orange I was trying to set a different polling rate.
This didn't work, if I set a polling of +2s my switches would go on, but I couldn't turn them off.
After orange is without simatic addon.

System Info:

  • Hardware: Raspberry Pi 4B - 4 Gb - 2.4 GHz
  • Runtime: Docker Engine - Community Version 19.03.13
  • Openhab: 3.2.0.M2 (Also happened on 3.1.0.M5)

write a DoubleWord in the PLC, it seems that High and Low words are reversed.

Hi,

if I write a Doubleword in the PLC, it seems that High and Low words are reversed.

sample: Type chNumber: SPS_S7_300_Set_Uhrzeit [ stateAddress="DB1.DBD132", commandAddress="DB1.DBD132"]
State Adress is correct.
rule:

var Number x = SPS_S7_300_Set_Uhrzeit .state
// when I now sent the same value back:
SPS_S7_300_Set_Uhrzeit .sendCommand(x)

than the value (DBD132 ) of DW 132 is in DW 134 and DW134 in DW132

Best regards
Martin

Port status sometimes displayed incorrectly

Right now my connection PortState is 2 - Closed and PortPreviousState is 1 - Listening, but this is not true because the connection still alive and read and write data to the PLC is correct.

2019-11-29 11:32:28.084 [vent.ItemStateChangedEvent] - PLC_EnergiaNapL1 changed from 243.6999969482422 to 243.7100067138672 2019-11-29 11:32:28.085 [vent.ItemStateChangedEvent] - PLC_EnergiaNapL2 changed from 245.16000366210938 to 244.30999755859375 2019-11-29 11:32:28.087 [vent.ItemStateChangedEvent] - PLC_EnergiaNapL3 changed from 242.67999267578125 to 243.10000610351562 2019-11-29 11:32:28.089 [vent.ItemStateChangedEvent] - PLC_EnergiaMocCzynna changed from 0.23999999463558197 to 0.25

This behavior was also before update the binding to the latest release, just I report this right now.
Sometimes the connection state is reported OK, sometime not OK.

RPI4
S7-1200 1215C
OH2.5

Thanks
Grzegorz

Binding stops working in different connection cases

Hello Docbender,
i found some issues with the binding when there are connection problems or after the restart of the complete openhab.

My setup:

  • OpenHab in a docker container in the version 3.1.0 release build
  • Simatic S7-300 PLC with CP for ethernet connection
  • Everything with static IP-Adresses and wired with ethernet cables (no wireless connection)
  • Main PLC as bridge in openhab
  • Five generic devices, each for a DB in the PLC with different functions

Issue description:
In some cases the binding stops working. In the openhab bindings page it still shows "online" in the bridge and also on the devices, but it doesn't send or read data to and from the plc. I also got that issue sometimes on only one device and other ones still work as normal.

Cases where this does happen:

  • On friday i made an firmware update on my router, so my network dns was down for a few minutes. After the server was online again, the binding doesn't get back to work but shows online.
  • It also happend sometimes if i restart my openhab docker

So for me it looks like, if there was a connection issue during a data transfer, the binding then freezes and had to restart again manualy to get back working.

Fast solution for get it working again:
Pause and start the bridge first, then do the same thing on all the devices.

Maybe you could take a look into your binding and get this problem fixed. If i could help you with logs or something else, let me know what you need :-)

Thank you for keeping this binding alive!

Best regards,
Marcel

connection lost

Hi all,

Had installed a fresh debian 10 with openhab3 and receive the following error. I followed the installation instructions on website

2021-01-14 21:40:59.664 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:8b6542dbda:f228471487' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

==> /var/log/openhab/openhab.log <==
2021-01-14 21:44:50.083 [ERROR] [nternal.simatic.SimaticGenericDevice] - 192.168.25.101 -
org.openhab.binding.simatic.internal.simatic.SimaticReadException: Read data area error (Area=M0-M1, Return code=0xffffff7d, Error=No data returned. Connection lost?})
at org.openhab.binding.simatic.internal.simatic.SimaticTCP.readDataArea(SimaticTCP.java:309) ~[bundleFile:?]
at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.checkNewData(SimaticGenericDevice.java:425) [bundleFile:?]
at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.execute(SimaticGenericDevice.java:159) [bundleFile:?]
at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.lambda$0(SimaticGenericDevice.java:113) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2021-01-14 21:44:51.094 [INFO ] [nternal.simatic.SimaticGenericDevice] - 192.168.25.101 - Trying to reconnect

==> /var/log/openhab/events.log <==
2021-01-14 21:44:51.096 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:bridge:8b6542dbda' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2021-01-14 21:44:51.100 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:8b6542dbda:f228471487' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2021-01-14 21:44:51.101 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:2f77a90a34' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

Problem with Rollershutter

Hi Docbender,

i use your great binding in Openhab 3. Now i have a little problem with the Rollershutter. I have created a Rollershutter item in my things file.

Thing generic_device Gaestebad "S7 SPS - 101 - EG Gästebad" { Channels: Type chRollershutter: Jalousie "Jalousie" [ stateAddress="DB2001.DBB104", commandAddress="DB2001.DBB104" ] }

At in the items file

Rollershutter Jalousie "Jalousie" {channel="simatic:generic_device:S7-Home:Gaestebad:Jalousie"}

But if i save the items file i will see the follow error in the log and the item status is "NULL"

2021-04-05 20:33:49.394 [WARN ] [ternal.handler.SimaticGenericHandler] - S7 SPS - 101 - EG Gästebad - cannot get value to refresh. Channel simatic:generic_device:S7-Home:Gaestebad:Jalousie not found.

I have try it with DBW104 with the same error. On the PLC i can see the right data.

Can not write byte, word, dword, float

Hi,

I also want to write byte, word, dword, float variables in the PLC system. For a bit variable it no problem. But all other are not working.

example:

Type chNumber: SPS_S7_Heizung_Prozent_absenken_Urlaub [ stateAddress="DB3.DBW106" ]

also tested:
Type chNumber: SPS_S7_Heizung_Prozent_absenken_Urlaub [ stateAddress="DB3.DBW106", commandAddress="DB3.DBW106" ]

ITEM:
Number SPS_S7_Heizung_Prozent_absenken_Urlaub "Prozent absenken [%d]" {channel="simatic:generic_device:S7-300:Energie:SPS_S7_Heizung_Prozent_absenken_Urlaub"}

Any advice??

Thanks in advanc
Martin

Channel as chButton... OH3

Hi,

it is possible that U add as type of channel chButton which will be send after button press commands ON(1) and OFF(0).
Right now I need to create for every button input extra rule in OH to send this two commands.

Some times send data value GenericDevice get error

Hi,
I get sometimes this error after send value to PLC:

2020-11-08 11:11:34.353 [ERROR] [nternal.simatic.SimaticGenericDevice] - 192.168.1.30 - at org.openhab.binding.simatic.internal.simatic.SimaticWriteDataArea.create(SimaticWriteDataArea.java:48) ~[bundleFile:?] at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.sendData(SimaticGenericDevice.java:287) [bundleFile:?] at org.openhab.binding.simatic.internal.handler.SimaticGenericHandler.handleCommand(SimaticGenericHandler.java:178) [bundleFile:?] at jdk.internal.reflect.GeneratedMethodAccessor144.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?] at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?] at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?] at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?] at jdk.internal.reflect.GeneratedMethodAccessor142.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?] at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

Feature request Unit

Hi,
can U add to The Things Channel possibility to set Unit for Number value?
For example The possibility is already implemented in http binding

Thanks

how to install on openhab 2.2

sorry for use of issue, I'm new to openhab and interested to connect it to my home plc.
I don't uderstant from you wiki how to add the config file since they are not used anymore from openhab.
Is it possible to use your addon with openhab 2.2?
Thanks in advance
Walter

switch Channel set all 8 bytes to ON and report wrong state

H,

problem with Channel(switch), I have set stateAddress=DB6.DBX42.0 and commandAddres=DB6.DBX42.0 then after toggle the correspondent switch the PLC set all 8bytes (0,1,2,3,4,5,6,7) to ON. Also the state is wrong reported for the address.

Number value does not send if use item with type...

Hi,

i have observed if we use item with type like Number:Temperature then binding always get error, this is also related to #24:

==> /var/log/openhab/openhab.log <==
2021-01-08 10:16:07.803 [ERROR] [nternal.simatic.SimaticGenericDevice] - 192.168.1.30 - ChannelUID=simatic:generic_device:635e89005f:DB6_DBD52. Cannot create WriteDataArea. Command for ChannelType=chNumber must be DecimalType.
java.lang.Exception: Cannot create WriteDataArea. Command for ChannelType=chNumber must be DecimalType
        at org.openhab.binding.simatic.internal.simatic.SimaticWriteDataArea.create(SimaticWriteDataArea.java:55) ~[bundleFile:?]
        at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.sendData(SimaticGenericDevice.java:285) [bundleFile:?]
        at org.openhab.binding.simatic.internal.handler.SimaticGenericHandler.handleCommand(SimaticGenericHandler.java:187) [bundleFile:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
        at com.sun.proxy.$Proxy429.handleCommand(Unknown Source) [?:?]
        at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
        at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

Error message in Openhab

Hi, first thank you so much for this binding. I use it a long time and now i want read some values more and i have a problem. In the log from OH 2 i see thome faults. Here a example

2019-07-26 01:21:51.066 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.178.200 - Read data area error (Area=DB2001.DBB1400-DB2001.DBB1425, Return code=0xffffff7d, Error=No data returned. Connection lost?)

Here my items from this error log

`// Leuchten
Switch Leuchte_B_Bad {simatic="plc:DB2001.DBB1400"}
Switch Leuchte_ST_Bad {simatic="plc:DB2001.DBB1401"}
Switch Leuchte_B_Bad_Dusche {simatic="plc:DB2001.DBB1402"}
Switch Leuchte_ST_Bad_Dusche {simatic="plc:DB2001.DBB1403"}
Switch Leuchte_B_Bad_Spiegel {simatic="plc:DB2001.DBB1404"}
Switch Leuchte_ST_Bad_Spiegel {simatic="plc:DB2001.DBB1405"}

// Kontakte
Number Status_Fenster_Bad_Ost {simatic="plc:DB2001.DBX1406.0"}
Number Status_Fenster_Bad_Nord {simatic="plc:DB2001.DBX1406.1"}

//Jalousie Ost
Rollershutter Jalousie_Steuerung_Bad_Ost {simatic="plc:DB2001.DBW1408"}
Number JalousieIstposition_Bad_Ost {simatic="plc:DB2001.DBW1410"}
Number JalousieSollposition_Bad_Ost {simatic="plc:DB2001.DBW1412"}
Switch Setup_Bad_Ost_auto_close
{simatic="plc:DB2001.DBX1414.0"}
Switch Setup_Bad_Ost_auto_open {simatic="plc:DB2001.DBX1414.1"}

//Jalousie Nord
Rollershutter Jalousie_Steuerung_Bad_Nord {simatic="plc:DB2001.DBW1418"}
Number JalousieIstposition_Bad_Nord
{simatic="plc:DB2001.DBW1420"}
Number JalousieSollposition_Bad_Nord {simatic="plc:DB2001.DBW1422"}
Switch Setup_Bad_Nord_auto_close {simatic="plc:DB2001.DBX1424.0"}
Switch Setup_Bad_Nord_auto_open {simatic="plc:DB2001.DBX1424.1"}`

And here my simatic.cfg for a S7 1500 CPU is the follow

simatic:refresh=200
simatic:plc=192.168.0.1:0.1

The DB and the values in the SPS are available.

Thanks for help

Channels not saved in config OH 3.0

Hi,

i have installed latest binding beta1 and establish connection to PLC but create channels in generic_device is not possible, after create it and exit to main menu all Chanels are removed.

2020-09-25 20:40:07.909 [ERROR] [ternal.handler.SimaticGenericHandler] - {} - command: RefreshType not implemented
2020-09-25 20:40:07.911 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'SimaticPLCiDom_testswitch-simatic:generic_device:dbf12fbaa9:test' has been added.

2020-09-27 16:25:00.875 [DEBUG] [ternal.handler.SimaticGenericHandler] - Simatic PLC (iDom) - Command REFRESH(class org.openhab.core.types.RefreshType) for channel simatic:generic_device:dbf12fbaa9:chNumber
2020-09-27 16:25:00.877 [ERROR] [ternal.handler.SimaticGenericHandler] - {} - command: RefreshType not implemented

Rollershutter state

Hi docbender,

thanks for support. Now i have a problem with my Rollerschutter.

I have define this Things for Rollershutter and i can see the 2 for Stop, 4 for UP and 8 for down. But i don´t understand the StateAdress. How i can see the State. If i write to the stateadress from PLC nothing happend.

Can you help me ?

Things:

Type chRollershutter: Jalousie "Jalousie Steuerung" [ stateAddress="DB2001.DBB1106",commandAddress="DB2001.DBB1107" ]

recurring connections issue

Hi all,

Had installed a fresh debian 10 with openhab3 and receive the following error. I followed the installation instructions on website

2021-01-14 21:40:59.664 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:8b6542dbda:f228471487' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

==> /var/log/openhab/openhab.log <==
2021-01-14 21:44:50.083 [ERROR] [nternal.simatic.SimaticGenericDevice] - 192.168.25.101 -
org.openhab.binding.simatic.internal.simatic.SimaticReadException: Read data area error (Area=M0-M1, Return code=0xffffff7d, Error=No data returned. Connection lost?})
at org.openhab.binding.simatic.internal.simatic.SimaticTCP.readDataArea(SimaticTCP.java:309) ~[bundleFile:?]
at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.checkNewData(SimaticGenericDevice.java:425) [bundleFile:?]
at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.execute(SimaticGenericDevice.java:159) [bundleFile:?]
at org.openhab.binding.simatic.internal.simatic.SimaticGenericDevice.lambda$0(SimaticGenericDevice.java:113) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2021-01-14 21:44:51.094 [INFO ] [nternal.simatic.SimaticGenericDevice] - 192.168.25.101 - Trying to reconnect

==> /var/log/openhab/events.log <==
2021-01-14 21:44:51.096 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:bridge:8b6542dbda' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2021-01-14 21:44:51.100 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:8b6542dbda:f228471487' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2021-01-14 21:44:51.101 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'simatic:generic_device:2f77a90a34' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

Read data aera error

Hi,

I use Openhab 2.4 with the simatic binding 1.9.0. It runs stable and I haven´t any problems till I add an new variable. If I refresh the items with the added variable it runs in an circle:

2019-01-27 17:49:40.143 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'plc.items'
2019-01-27 17:49:44.302 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.2.50 - Read data area error (Area=I8-I26, Return code=0xffffff7e, Error=Buffer size insufficient while readBytes)
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:44.454 [vent.ItemStateChangedEvent] - PortState changed from 1 to 6
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:46.311 [INFO ] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.2.50: Trying to reconnect
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:46.323 [vent.ItemStateChangedEvent] - PortState changed from 6 to 2
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:46.822 [INFO ] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.2.50 -
connected
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:46.831 [vent.ItemStateChangedEvent] - PortState changed from 2 to 1
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:47.869 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.2.50 - Read data area error (Area=I8-I26, Return code=0xffffff7e, Error=Buffer size insufficient while readBytes)
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:47.936 [vent.ItemStateChangedEvent] - PortState changed from 1 to 6
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:49.873 [INFO ] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.2.50: Trying to reconnect
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:49.883 [vent.ItemStateChangedEvent] - PortState changed from 6 to 2
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:50.382 [INFO ] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.2.50 - connected
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:50.391 [vent.ItemStateChangedEvent] - PortState changed from 2 to 1
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:51.422 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.2.50 - Read data area error (Area=I8-I26, Return code=0xffffff7e, Error=Buffer size insufficient while readBytes)
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:51.531 [vent.ItemStateChangedEvent] - PortState changed from 1 to 6
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:53.426 [INFO ] [imatic.internal.SimaticGenericDevice] - isoTCP:192.168.2.50: Trying to reconnect
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:53.442 [vent.ItemStateChangedEvent] - PortState changed from 6 to 2
==> /var/log/openhab2/openhab.log <==
2019-01-27 17:49:53.941 [INFO ] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.2.50 - connected
==> /var/log/openhab2/events.log <==
2019-01-27 17:49:53.947 [vent.ItemStateChangedEvent] - PortState changed from 2 to 1

my simatic.cfg:

Konfigurations Datei für Simatic binding

refresh-time in ms

simatic:refresh=2000
simatic:plc=192.168.2.50:0.1:S7

The problem exists only if I add an new inputvariable. I think if I add more outputvariable, it will take the same problem with the writebuffer. I have round about 200 variables and a lot of them are MD's.

Thanks!

OpenHAB2 needs several restarts to start polling values, polling stops if items are refreshed

Hello,

I am testing your binding on an OpenHAB2, connected to a Siemens Logo 8 in S7 mode. Nice work by the way, apart from this issue, your binding seems to work OK!

I am running openhab on a raspberry pi 3 which is somewhat underpowered, so timing issues are easier to reproduce.
I need to restart openhab several times until polling works OK, and if I do any changes in the items file, polling stops altogether. tcpdump shows that no info is being sent to the plc, which resets the connection afterwards.

I think this is an issue with bindingChanged which doesn't refresh the polling list properly. Also, if this happens while polling, you get stuck in a busy-wait loop.

Please tell me if I can be of further assistance in debugging this issue.

openhab-simatic-items-refresh-issue.txt
openhab-simatic-normal-startup.txt
openhab-simatic-startup-issue.txt
tcpdump.txt

removed 1.x compatibility layer #1284

Hi,

OH will removed 1.x compatibility layer #1284 in upcoming release, what is the future of the binding? will be adapted to the new system? or we need still in OH2.x version.

Thanks

Beginner question: how to determine stateAddress and commandAddress (from existing TIA Portal project)

I am a beginner in the PLC world and am trying to transfer an existing TIA Portal project (not my build) to OpenHab.

I wanted to start with a simple light switch, but I am already stuck at finding the right stateAddress and commandAddress for the switch to function in OpenHab.

I have already tried every possible combination for the adresses I could think of, but nothing seems to work.

I have added a screenshot from the TIA Portal for this switch and posted my .things file below.

Can someone please point me in the right direction?

Bridge simatic:bridge:PLC-1200 "PLC "  [ address="xxx.xxx.xx.xxx", rack="0", slot="1"] {
    Thing generic_device plcState "Lights" {
        Channels:
            Type chSwitch: kantoor_achter [ stateAddress="DB9.DBQ0.0", commandAddress="DB9.DBI0.0" ]
}
}

DB9

Number value NULL after OH update/restart

Hi,

I have observed that after every update/restart OH the Number value are not updated on first run, the values remain NULL as long as the value not changed on S7 or I’m restart the thing manually from UI.
It looks like the values are not updated on first start.

Unresolved requirement: Import-Package: org.openhab.core.binding

Hi,
I have following error in my log file:
2019-12-28 20:43:15.897 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/C:/Program%20Files/OpenHab/addons/org.openhab.binding.simatic-1.14.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.simatic [222]
Unresolved requirement: Import-Package: org.openhab.core.binding
Also, with the command:
openhab> list | grep -i binding
136 │ Active │ 80 │ 2.5.0 │ openHAB Core :: Bundles :: Binding XML
211 │ Active │ 80 │ 2.5.0 │ openHAB Add-ons :: Bundles :: hue Binding
215 │ Active │ 80 │ 2.5.0 │ openHAB Add-ons :: Bundles :: Network Binding
222 │ Installed │ 80 │ 1.14.0.201911280848 │ openHAB Simatic Binding
I see the Simatic binding is installed but not running.

Can somebody help me out please?
Thanks,
Tom.

Response of values is very slow

Hi,
first I want to thank you for the great binding. I use openHAB 2.4 and binding version 1.9.0.201901290812 with a PLC 1513F.
I use about 240 Items at the moment. If I send a command to the PLC, for example I switch on a light by a dimmer, it reacts always immediately. But the status of the Item takes between 1 and 15 seconds to update, as you can see in the eventlog:

2019-11-24 18:19:59.057 [ome.event.ItemCommandEvent] - Item 'OG_Li_Wohnen_Esstisch' received command 0
2019-11-24 18:20:06.813 [vent.ItemStateChangedEvent] - OG_Li_Wohnen_Esstisch changed from 63 to 0
2019-11-24 18:22:42.397 [ome.event.ItemCommandEvent] - Item 'OG_Li_Wohnen_Esstisch' received command 59
2019-11-24 18:22:52.607 [vent.ItemStateChangedEvent] - OG_Li_Wohnen_Esstisch changed from 0 to 59
2019-11-24 18:24:53.049 [ome.event.ItemCommandEvent] - Item 'OG_Li_Wohnen_Esstisch' received command 0
2019-11-24 18:25:04.919 [vent.ItemStateChangedEvent] - OG_Li_Wohnen_Esstisch changed from 59 to 0
2019-11-24 18:25:36.890 [ome.event.ItemCommandEvent] - Item 'OG_Li_Wohnen_Esstisch' received command 47
2019-11-24 18:25:38.488 [vent.ItemStateChangedEvent] - OG_Li_Wohnen_Esstisch changed from 0 to 47
2019-11-24 18:25:40.049 [ome.event.ItemCommandEvent] - Item 'OG_Li_Wohnen_Esstisch' received command 0
2019-11-24 18:25:55.355 [vent.ItemStateChangedEvent] - OG_Li_Wohnen_Esstisch changed from 47 to 0

The refresh-time is set to 200ms. But the behavior doesn’t chance if I change the refresh-rime to 20ms or 5000ms. There are no errors in the log-file.
Is that behavior normally, or is there a way to make the response quicker? Or is there any error in my configuration?

My binding-configuration looks like this:
simatic:refresh=200
simatic:plc=192.168.178.54:0.1

And my Items I attached.

Thanks in advance
th3elk

items.txt

I can´t read the Data Type Time from PLC

Hello Docbender,

i want read a value with the Datatype "Time" from the PLC (32 bit). Example i want read the actual Time Value from a IEC Timer. Then i have connect the Data Point DB2001.DBD3028 in the Things Data Table. I only received 0 in the value Dammerung_Restzeitms.

All other data Points working correctly.

 Thing generic_device gobal {
        Channels:                          
            Type chNumber: Dammerung_Restzeitms         "Dämmerung Restzeit"            [ stateAddress="DB2001.DBD3028"]
    }

Thanks a lot for your support and thank for the great binding.

Martin

Rollershutter item explanation.

Hello to all!
Could somebody explain to me how the DB works with Rollershutter item.
If word has two bytes, 16 bits together and first byte is for status Stop, Move, Up, Down, second is for command 1-Move,2-Stop,4-Up,8-Down, that is 8 bits together.
If I understand correctly, in first byte (status), bits are:
0-Stop
1-Move
3-Up
7-Down
2,4,5,6-are empty?

In second byte (command), bits are:
0-Move
1-Stop
3-Up
7-Down
2,4,5,6-are empty?

In sitemap, commands are presented with ^ x ˇ simbols. How is status presented? With Stop, Up, etc. text?
If I create FB with 4bits for status and 4 bits for commands in Static section of Block interface, how do I fill the gap between them?

Let's say that my first bit starts with address %DB27.DBX4.0 and my last ends with %DB27.DBX5.7.
What is exact definition of item, something like {simatic="plc:DB27.DBW4:word:IO"} ?

Thank you for your anwsers!

Binding stop working if Mail Action remove

Hello,

I have strange problem, after remove Mail Action from openHAB simatic bindings stop working with error:

2018-02-19 16:22:54.128 [ERROR] [org.openhab.binding.simatic ] - FrameworkEvent ERROR - org.openhab.binding.simatic
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.simatic [222]
Unresolved requirement: Import-Package: org.openhab.core.binding
at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

after install Mail Action again ,simatic start working correct.

Value don't Update

Hi docbender First big thanks for your work i use the Binding for openhab for a Long Time. Now i have a Little Problem with the Binding. Some value don't Update. But If i Teach the value from
Openhab the value change but If i change the value in the sps it don't change in openhab. Can you give ne a tip why ?

Error while starting SIMATIC binding

I have ERROR while starting SIMATIC binding after put it in openhab2-addons folder,

bottom some logs:

2018-07-15 11:01:25.192 [INFO ] [org.apache.felix.fileinstall        ] - Installing bundle org.openhab.binding.simatic / 1.9.0.201802051130
2018-07-15 11:01:25.320 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.simatic-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.simatic [205]
  Unresolved requirement: Import-Package: org.openhab.core.binding
	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]


2018-07-15 11:09:21.514 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.simatic-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.simatic [205]
  Unresolved requirement: Import-Package: org.openhab.core.binding
	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]

Thanks for any help.
Grzegorz

Binding stop working with latest OH snapshots

Hi,

in latest OH snapshots The binding stop working with:

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.simatic [265]
  Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"
        at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.8]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

==> /var/log/openhab/events.log <==

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.