docbender / openHAB-Simatic

openHAB binding for Siemens Simatic S7 PLC
Eclipse Public License 2.0
20 stars 4 forks source link

Establish Openhab2 readiness and merge to Openhab officially #2

Closed thesebastianf closed 6 years ago

docbender commented 7 years ago

Now binding is ready to use in OH2

thesebastianf commented 7 years ago

cool. are you planning full oh2 support?

and merge to openhab that it can installed via paperui etc?

docbender commented 7 years ago

Right now OH2 is supported in 1.x compatibility mode. About pure OH2 support? I will think about it when stable OH2 version will be released.

Yea installation via paper ui is cool thing. No doubt. And installation without it is a bit of pain, till you find where to copy configuration... But since my last binding pull request passed 11 month till someone began review. So yes installation through paperui is cool, but here is the most recent version.

jogibear9988 commented 7 years ago

As 2.x is released, do you still have plans to work on paperui installation support!

docbender commented 7 years ago

I had it in plan but now I do not have time for it. And as I know there is already S7 binding in review for PaperUI (https://github.com/openhab/openhab2-addons/pull/1606). So there would be no reason to build new one if this one would be merged.

grzegorz914 commented 6 years ago

Hi, I get communications error if want to read or write to Area above 304. Simatic S7 1215C, openHab 2.2/2.3

2018-01-18 11:23:08.172 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.1.30 - Read data area error (Area=DB19.DBB208-DB19.DBB374, Return code=0xffffff80, Error=Unexpected function code in answer)

any solution for this

docbender commented 6 years ago

Hi, I tested it with PLC 1212C in datablock address area 0-1023 and all values are read. So there should not be problem. I see you read large area (DBB208-DBB374). Probably there is problem. Are you need all bytes in this area? Quick solution could be compress (put together) all readed data (there is optimization to read data at once if there is gap between then less or equal than 32 bytes). Or another solution is split data into more datablocks or areas with 32bytes gap.

grzegorz914 commented 6 years ago

Hi,

thanks for Your help, Yes I need all bytes in this area (my project is really big) temporary I have set optional "O" for all Data above 304 and communications work OK but in this state I cannot write data to PLC abowe this memory area. { simatic="plc:DB19.DBD318:float:O" }. 1215C is little different and have much more memory as 1212C. It will be nice if this bindings can be extended to support more memory area.

Bottom tail from my Items:

Group PrzedpokojMalyTemp "Przedpokój mały" [ "Thermostat" ] Number PLC_PrzedpokojMalyTempA "Przedpokój mały" (PrzedpokojMalyTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD2:float" } Number PLC_PrzedpokojMalyTempZ "Przedpokój mały" (PrzedpokojMalyTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD220:float" } String PLC_PrzedpokojMalyTempTryb "Przedpokój mały" (PrzedpokojMalyTemp) [ "homekit:HeatingCoolingMode" ]
Number PLC_PrzedpokojMalyTermostatStan "Przedpokój mały" { simatic="plc:DB19.DBB219:byte" }

Group PrzedpokojDuzyTemp "Przedpokój duży" [ "Thermostat" ] Number PLC_PrzedpokojDuzyTempA "Przedpokój duży" (PrzedpokojDuzyTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD6:float" } Number PLC_PrzedpokojDuzyTempZ "Przedpokój duży" (PrzedpokojDuzyTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD234:float" } String PLC_PrzedpokojDuzyTempTryb "Przedpokój duży" (PrzedpokojDuzyTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_PrzedpokojDuzyTermostatStan "Przedpokój duży" { simatic="plc:DB19.DBB233:byte" }

Group PokojParterTemp "Pokój parter" [ "Thermostat" ] Number PLC_PokojParterTempA "Pokój parter" (PokojParterTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD10:float" } Number PLC_PokojParterTempZ "Pokój parter" (PokojParterTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD248:float" } String PLC_PokojParterTempTryb "Pokoj parter" (PokojParterTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_PokojParterTermostatStan "Pokoj parter" { simatic="plc:DB19.DBB247:byte" }

Group SalonTemp "Salon" [ "Thermostat" ] Number PLC_SalonTempA "Salon" (SalonTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD14:float" } Number PLC_SalonTempZ "Salon" (SalonTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD262:float" } String PLC_SalonTempTryb "Salon" (SalonTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_SalonTermostatStan "Salon" { simatic="plc:DB19.DBB261:byte" }

Group JadalniaTemp "Jadalnia" [ "Thermostat" ] Number PLC_JadalniaTempA "Jadalnia" (JadalniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD14:float" } Number PLC_JadalniaTempZ "Jadalnia" (JadalniaTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD276:float" } String PLC_JadalniaTempTryb "Jadalnia" (JadalniaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_JadalniaTermostatStan "Jadalnia" { simatic="plc:DB19.DBB261:byte" }

Group KuchniaTemp "Kuchnia" [ "Thermostat" ] Number PLC_KuchniaTempA "Kuchnia" (KuchniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD18:float" } Number PLC_KuchniaTempZ "Kuchnia" (KuchniaTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD290:float" } String PLC_KuchniaTempTryb "Kuchnia" (KuchniaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_KuchniaTermostatStan "Kuchnia" { simatic="plc:DB19.DBB289:byte" }

Group LazienkaParterTemp "Łazienka parter" [ "Thermostat" ] Number PLC_LazienkaParterTempA "Łazienka parter" (LazienkaParterTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD22:float" } Number PLC_LazienkaParterTempZ "Łazienka parter" (LazienkaParterTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD304:float" } String PLC_LazienkaParterTempTryb "Łazienka parter" (LazienkaParterTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_LazienkaParterTermostatStan "Łazienka parter" { simatic="plc:DB19.DBB303:byte" }

Group GarderobaTemp "Garderoba" [ "Thermostat" ] Number PLC_GarderobaTempA "Garderoba" (GarderobaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD26:float" } Number PLC_GarderobaTempZ "Garderoba" (GarderobaTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD318:float:O" } String PLC_GarderobaTempTryb "Garderoba" (GarderobaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_GarderobaTermostatStan "Garderoba" { simatic="plc:DB19.DBB317:byte:O" }

Group BiuroTemp "Biuro" [ "Thermostat" ] Number PLC_BiuroTempA "Biuro" (BiuroTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD30:float" } Number PLC_BiuroTempZ "Biuro" (BiuroTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD332:float:O" } String PLC_BiuroTempTryb "Biuro" (BiuroTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_BiuroTermostatStan "Biuro" { simatic="plc:DB19.DBB331:byte:O" }

Group KamilaTemp "Kamila" [ "Thermostat" ] Number PLC_KamilaTempA "Kamila" (KamilaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD34:float" } Number PLC_KamilaTempZ "Kamila" (KamilaTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD346:float:O" } String PLC_KamilaTempTryb "Kamila" (KamilaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_KamilaTermostatStan "Kamila" { simatic="plc:DB19.DBB345:byte:O" }

Group SypialniaTemp "Sypialnia" [ "Thermostat" ] Number PLC_SypialniaTempA "Sypialnia" (SypialniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD38:float" } Number PLC_SypialniaTempZ "Sypialnia" (SypialniaTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD360:float:O" } String PLC_SypialniaTempTryb "Sypialnia" (SypialniaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_SypialniaTermostatStan "Sypialnia" { simatic="plc:DB19.DBB359:byte:O" }

Group LazienkaPietroTemp "Łazienka piętro" [ "Thermostat" ] Number PLC_LazienkaPietroTempA "Łazienka piętro" (LazienkaPietroTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD42:float" } Number PLC_LazienkaPietroTempZ "Łazienka piętro" (LazienkaPietroTemp) [ "TargetTemperature" ] { simatic="plc:DB19.DBD374:float:O" } String PLC_LazienkaPietroTempTryb "Łazienka piętro" (LazienkaPietroTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_LazienkaPietroTermostatStan "Łazienka piętro" { simatic="plc:DB19.DBB373:byte:O" }

Thanks

docbender commented 6 years ago

Just tested your config and whole area is read:

12:47:30.808 [DEBUG] [.b.simatic.internal.SimaticTCP:127 ] - isoTCP:192.168.254.99 - open() - connecting 12:47:31.315 [INFO ] [.b.simatic.internal.SimaticTCP:166 ] - isoTCP:192.168.254.99 - connected 12:47:31.316 [DEBUG] [.b.simatic.internal.SimaticTCP:337 ] - isoTCP:192.168.254.99 - checkNewData() is called 12:47:31.318 [DEBUG] [.b.simatic.internal.SimaticTCP:348 ] - Locking 12:47:31.571 [DEBUG] [.b.simatic.internal.SimaticTCP:395 ] - isoTCP:192.168.254.99 - Reading finished. Area=M0-M1 12:47:31.572 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212MB0 (Device=plc1212 MemAddress=MB0/MB0 DataType=BYTE Direction=0) 12:47:31.576 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212MB0/state:127 12:47:31.830 [DEBUG] [.b.simatic.internal.SimaticTCP:395 ] - isoTCP:192.168.254.99 - Reading finished. Area=DB19.DBB219-DB19.DBB378 12:47:31.831 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_PrzedpokojMalyTermostatStan (Device=plc1212 MemAddress=DB19.DBB219/DB19.DBB219 DataType=BYTE Direction=0) 12:47:31.834 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_PrzedpokojMalyTermostatStan/state:127 12:47:31.836 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_PrzedpokojMalyTempZ (Device=plc1212 MemAddress=DB19.DBD220/DB19.DBD220 DataType=FLOAT Direction=0) 12:47:31.841 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_PrzedpokojMalyTempZ/state:0 12:47:31.844 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_PrzedpokojDuzyTermostatStan (Device=plc1212 MemAddress=DB19.DBB233/DB19.DBB233 DataType=BYTE Direction=0) 12:47:31.849 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_PrzedpokojDuzyTermostatStan/state:0 12:47:31.851 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_PrzedpokojDuzyTempZ (Device=plc1212 MemAddress=DB19.DBD234/DB19.DBD234 DataType=FLOAT Direction=0) 12:47:31.855 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_PrzedpokojDuzyTempZ/state:0 12:47:31.859 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_PokojParterTermostatStan (Device=plc1212 MemAddress=DB19.DBB247/DB19.DBB247 DataType=BYTE Direction=0) 12:47:31.864 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_PokojParterTermostatStan/state:0 12:47:31.866 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_PokojParterTempZ (Device=plc1212 MemAddress=DB19.DBD248/DB19.DBD248 DataType=FLOAT Direction=0) 12:47:31.871 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_PokojParterTempZ/state:0 12:47:31.876 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_JadalniaTermostatStan (Device=plc1212 MemAddress=DB19.DBB261/DB19.DBB261 DataType=BYTE Direction=0) 12:47:31.879 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_JadalniaTermostatStan/state:0 12:47:31.883 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_SalonTermostatStan (Device=plc1212 MemAddress=DB19.DBB261/DB19.DBB261 DataType=BYTE Direction=0) 12:47:31.886 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_SalonTermostatStan/state:0 12:47:31.891 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_SalonTempZ (Device=plc1212 MemAddress=DB19.DBD262/DB19.DBD262 DataType=FLOAT Direction=0) 12:47:31.896 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_SalonTempZ/state:0 12:47:31.898 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_JadalniaTempZ (Device=plc1212 MemAddress=DB19.DBD276/DB19.DBD276 DataType=FLOAT Direction=0) 12:47:31.902 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_JadalniaTempZ/state:0 12:47:31.906 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_KuchniaTermostatStan (Device=plc1212 MemAddress=DB19.DBB289/DB19.DBB289 DataType=BYTE Direction=0) 12:47:31.910 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_KuchniaTermostatStan/state:0 12:47:31.912 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_KuchniaTempZ (Device=plc1212 MemAddress=DB19.DBD290/DB19.DBD290 DataType=FLOAT Direction=0) 12:47:31.918 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_KuchniaTempZ/state:0 12:47:31.920 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB300 (Device=plc1212 MemAddress=DB19.DBB300/DB19.DBB300 DataType=BYTE Direction=0) 12:47:31.926 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB300/state:0 12:47:31.928 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB301 (Device=plc1212 MemAddress=DB19.DBB301/DB19.DBB301 DataType=BYTE Direction=0) 12:47:31.933 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB301/state:0 12:47:31.935 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB302 (Device=plc1212 MemAddress=DB19.DBB302/DB19.DBB302 DataType=BYTE Direction=0) 12:47:31.940 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB302/state:0 12:47:31.944 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_LazienkaParterTermostatStan (Device=plc1212 MemAddress=DB19.DBB303/DB19.DBB303 DataType=BYTE Direction=0) 12:47:31.947 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_LazienkaParterTermostatStan/state:0 12:47:31.950 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB303 (Device=plc1212 MemAddress=DB19.DBB303/DB19.DBB303 DataType=BYTE Direction=0) 12:47:31.956 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB303/state:0 12:47:31.958 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB304 (Device=plc1212 MemAddress=DB19.DBB304/DB19.DBB304 DataType=BYTE Direction=0) 12:47:31.963 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB304/state:0 12:47:31.966 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_LazienkaParterTempZ (Device=plc1212 MemAddress=DB19.DBD304/DB19.DBD304 DataType=FLOAT Direction=0) 12:47:31.968 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_LazienkaParterTempZ/state:0 12:47:31.974 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB305 (Device=plc1212 MemAddress=DB19.DBB305/DB19.DBB305 DataType=BYTE Direction=0) 12:47:31.977 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB305/state:0 12:47:31.981 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=S71212DB306 (Device=plc1212 MemAddress=DB19.DBB306/DB19.DBB306 DataType=BYTE Direction=0) 12:47:31.986 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:S71212DB306/state:0 12:47:31.989 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_GarderobaTermostatStan (Device=plc1212 MemAddress=DB19.DBB317/DB19.DBB317 DataType=BYTE Direction=0) 12:47:31.993 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_GarderobaTermostatStan/state:0 12:47:31.996 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_GarderobaTempZ (Device=plc1212 MemAddress=DB19.DBD318/DB19.DBD318 DataType=FLOAT Direction=0) 12:47:31.999 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_GarderobaTempZ/state:0 12:47:32.006 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_BiuroTermostatStan (Device=plc1212 MemAddress=DB19.DBB331/DB19.DBB331 DataType=BYTE Direction=0) 12:47:32.011 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_BiuroTermostatStan/state:0 12:47:32.013 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_BiuroTempZ (Device=plc1212 MemAddress=DB19.DBD332/DB19.DBD332 DataType=FLOAT Direction=0) 12:47:32.018 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_BiuroTempZ/state:0 12:47:32.021 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_KamilaTermostatStan (Device=plc1212 MemAddress=DB19.DBB345/DB19.DBB345 DataType=BYTE Direction=0) 12:47:32.024 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_KamilaTermostatStan/state:0 12:47:32.028 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_KamilaTempZ (Device=plc1212 MemAddress=DB19.DBD346/DB19.DBD346 DataType=FLOAT Direction=0) 12:47:32.031 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_KamilaTempZ/state:0 12:47:32.036 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_SypialniaTermostatStan (Device=plc1212 MemAddress=DB19.DBB359/DB19.DBB359 DataType=BYTE Direction=0) 12:47:32.043 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_SypialniaTermostatStan/state:0 12:47:32.045 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_SypialniaTempZ (Device=plc1212 MemAddress=DB19.DBD360/DB19.DBD360 DataType=FLOAT Direction=0) 12:47:32.049 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_SypialniaTempZ/state:0 12:47:32.052 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_LazienkaPietroTermostatStan (Device=plc1212 MemAddress=DB19.DBB373/DB19.DBB373 DataType=BYTE Direction=0) 12:47:32.056 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_LazienkaPietroTermostatStan/state:0 12:47:32.060 [DEBUG] [.b.simatic.internal.SimaticTCP:402 ] - isoTCP:192.168.254.99 - PostValue for item=PLC_LazienkaPietroTempZ (Device=plc1212 MemAddress=DB19.DBD374/DB19.DBD374 DataType=FLOAT Direction=0) 12:47:32.063 [DEBUG] [o.o.b.s.i.SimaticGenericDevice:550 ] - isoTCP:192.168.254.99 - Incoming data - item:PLC_LazienkaPietroTempZ/state:0

grzegorz914 commented 6 years ago

Hi,

just please remove "O" from all PLC adres or use "IO" and then test again. With read (incoming data) is all OK, problem is if I want to write data to PLC above address 304.

thanks

docbender commented 6 years ago

I had taken "O". Write data give me error. Data are written into PLC but PLC return unexpected message. This message is unknown for used libnodave library. To fix this PLC answer must be implemented into this library

grzegorz914 commented 6 years ago

If I look also on the error from PLC, write data areas error is( DBB208-DBB374) however this is not true because I use DBD data (Real).

2018-01-18 11:23:08.172 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.1.30 - Read data area error (Area=DB19.DBB208-DB19.DBB374, Return code=0xffffff80, Error=Unexpected function code in answer)

grzegorz914 commented 6 years ago

Hi, I have again strange error with connection to s7, any help?

2018-01-30 05:50:16.202 [ERROR] [.binding.simatic.internal.SimaticTCP] - isoTCP:192.168.1.30 - Read data area error (Area=DB24.DBB0-DB24.DBB4, Return code=0xffffff7e, Error=Buffer size insufficient while readBytes)

docbender commented 6 years ago

Hi @grzegorz914, can you test this build please: https://github.com/docbender/openHAB-Simatic/releases/download/1.1.3/org.openhab.binding.simatic-1.9.0-SNAPSHOT.jar I looked at library socket operations and did some improvements. It looks better for me now.

grzegorz914 commented 6 years ago

Hi @docbender , many thanks for the update, with this release no any error witch communication looks like all is OK, one other problem some data from DB6 is not read, nothing in openHAB log, if value changed on PLC site.

This is read correct and data is changed in openHAB log:

Switch PLC_TermostatyTrybRecznyAuto "Tryb pracy ogrzewania" <switch > (gTermostaty) { simatic="plc:DB6.DBX12.0:byte" }

2018-02-01 16:14:55.020 [vent.ItemStateChangedEvent] - PLC_TermostatyTrybRecznyAuto changed from ON to OFF
2018-02-01 16:15:28.691 [vent.ItemStateChangedEvent] - PLC_TermostatyTrybRecznyAuto changed from OFF to ON

This all are not read, if value on PLC site changed then nothing changed in openHAB log.


Number    PLC_PrzedpokojMalyTermostatStan    "Przedpokój mały"  <radiator> { simatic="plc:DB6.DBB23:byte" }
Number    PLC_PrzedpokojDuzyTermostatStan    "Przedpokój duży"  <radiator> { simatic="plc:DB6.DBB37:byte" }
Number    PLC_PokojParterTermostatStan    "Pokój parter"  <radiator> { simatic="plc:DB6.DBB51:byte" }
Number    PLC_SalonTermostatStan    "Salon"  <light> { simatic="plc:DB6.DBB65:byte" }
Number    PLC_JadalniaTermostatStan    "Jadalnia"  <radiator> { simatic="plc:DB6.DBB79:byte" }
Number    PLC_KuchniaTermostatStan    "Kuchnia"  <radiator> { simatic="plc:DB6.DBB93:byte" }
Number    PLC_LazienkaParterTermostatStan    "Łazienka parter"  <radiator> { simatic="plc:DB6.DBB107:byte" }
Number    PLC_GarderobaTermostatStan    "Garderoba"  <radiator> { simatic="plc:DB6.DBB121:byte" }
Number    PLC_BiuroTermostatStan    "Biuro"  <radiator> { simatic="plc:DB6.DBB135:byte" }
Number    PLC_KamilaTermostatStan    "Kamila"  <radiator> { simatic="plc:DB6.DBB149:byte" }
Number    PLC_SypialniaTermostatStan    "Sypialnia"  <radiator> { simatic="plc:DB6.DBB163:byte" }
Number    PLC_LazienkaPietroTermostatStan    "Łazienka piętro"  <radiator> { simatic="plc:DB6.DBB177:byte" }`

very strange.

All other DB and I,Q,M area are read correct.

docbender commented 6 years ago

Can you collect trace log data from simatic binding? Maybe there will be some usefull information.

grzegorz914 commented 6 years ago

Here file from wireshark:

simatic.zip

docbender commented 6 years ago

Thanks for traffic log. I'm interested also in how binding reacts to your configuration. If db6 is in readareas and if it reads db6 and read data are resolved To enable trace log type

log:set TRACE org.openhab.binding.simatic

grzegorz914 commented 6 years ago
docbender commented 6 years ago

This is not whole log. But from what i can see, data are read and posted into OH. Values are set to 0. This is not correct if I compare it with your network dump. I try to find why. It would be perfect if you post your whole item file for this PLC.

grzegorz914 commented 6 years ago

No problem, simatic.items

//Pogoda

Number PLC_PogodaTemp "Temperatura powietrza" [ "CurrentTemperature" ] { simatic="plc:DB28.DBD190:float" } Number PLC_PogodaWilgotnosc "Wilgotność powietrza" [ "CurrentHumidity" ] { simatic="plc:DB28.DBD202:float" } Number PLC_PogodaPunktRosy "Punkt rosy" { simatic="plc:DB28.DBD198:float" } Number PLC_PogodaWiatr "Wiatr" { simatic="plc:DB28.DBD174:float" } Number PLC_PogodaOpady "Opady" { simatic="plc:DB28.DBX242.0:byte" } Number PLC_PogodaCisnienie "Ciśnienie atmosferyczne" { simatic="plc:DB28.DBD210:float" } Number PLC_PogodaCzujnikZmierzchu "Czujnik zmierzchu" { simatic="plc:DB28.DBD238:DWORD" } Number PLC_PogodaEnergiaSlonca "Energia słońca" { simatic="plc:DB28.DBD218:float" } Number PLC_PogodaDlugoscGeograficzna "Długość geograficzna" { simatic="plc:DB28.DBD256:float" } Number PLC_PogodaSzerokoscGeograficzna "Szerokość geograficzna" { simatic="plc:DB28.DBD260:float" } Number PLC_PogodaWysokoscGeograficzna "Wysokość geograficzna" { simatic="plc:DB28.DBD272:DWORD" } Number PLC_PogodaSlonceElewacja "Słońce elewacja" { simatic="plc:DB28.DBD264:float" } Number PLC_PogodaSlonceAzymut "Słońce azymut" { simatic="plc:DB28.DBD268:float" }

//Wjazd

Switch PLC_BramaTaster "Brama" ["Switchable"] { simatic="plc:M2.0:byte" } Switch PLC_BramkaTaster "Bramka" ["Switchable"] { simatic="plc:M2.1:byte" }

//Tastery_i_oswietlenie

Switch PLC_PrzedpokojMalyTaster "Przedpokój mały" ["Switchable"] {simatic="plc:M20.0:byte"} Switch PLC_PrzedpokojDuzyTaster "Przedpokój duży" ["Switchable"] { simatic="plc:M20.1:byte" } Switch PLC_KotlowniaTaster "Kotłownia" ["Switchable"] { simatic="plc:M20.2:byte" } Switch PLC_PrzedsionekKotlowniTaster "Przedsionek kotłowni" ["Switchable"] { simatic="plc:M20.3:byte" } Switch PLC_PokojSufit1Taster "Pokój sufit 1" ["Switchable"] { simatic="plc:M21.5:byte" } Switch PLC_PokojSufit2Taster "Pokój sufit 2" ["Switchable"] { simatic="plc:M21.6:byte" } Switch PLC_SpizarniaTaster "Spiżarnia" ["Switchable"] { simatic="plc:M21.4:byte" } Switch PLC_SalonSufitTaster "Salon sufit" ["Switchable"] { simatic="plc:M20.4:byte" } Dimmer PLC_SalonSufitDimmer "Salon sufit" ["Switchable"] { simatic="plc:DB26.DBB50:byte" } Switch PLC_SalonKinkietyTaster "Salon kinkiety" ["Switchable"] { simatic="plc:M20.6:byte" } Dimmer PLC_SalonKinkietyDimmer "Salon kinkiety" ["Switchable"] { simatic="plc:DB26.DBB49:byte" } Switch PLC_JadalniaKinkietyTaster "Jadalnia kinkiety" ["Switchable"] { simatic="plc:M20.7:byte" } Dimmer PLC_JadalniaKinkietyDimmer "Jadalnia kinkiety" ["Lighting"] { simatic="plc:DB26.DBB48:byte" } Switch PLC_KuchniaSufitTaster "Kuchnia sufit" ["Switchable"] { simatic="plc:M21.0:byte" } Dimmer PLC_KuchniaSufitDimmer "Kuchnia sufit" ["Switchable"] { simatic="plc:DB26.DBB47:byte" } Switch PLC_KuchniaBlatTaster "Kuchnia blat" ["Switchable"] { simatic="plc:M21.1:byte" } Dimmer PLC_KuchniaBlatDimmer "Kuchnia blat" ["Switchable"] { simatic="plc:DB26.DBB44:byte" } Switch PLC_LazienkaParterSufitTaster "Łazienka parter sufit" ["Switchable"] { simatic="plc:M21.2:byte" } Switch PLC_LazienkaParterLustroTaster "Łazienka parter lustro" ["Switchable"] { simatic="plc:M21.3:byte" }

Switch PLC_StrychTaster "Strych" ["Switchable"] { simatic="plc:M24.0:byte" } Switch PLC_LazienkaPietroSufitTaster "Łazienka piętro sufit" ["Switchable"] { simatic="plc:M24.1:byte" } Switch PLC_LazienkaPietroLustroTaster "Łazienka piętro lustro" ["Switchable"] { simatic="plc:M24.2:byte" } Switch PLC_LazienkaPietroLedTaster "Łazienka piętro LED" ["Switchable"] { simatic="plc:M25.5:byte" } Switch PLC_GarderobaSufit1Taster "Garderoba sufit 1" ["Switchable"] { simatic="plc:M24.3:byte" } Switch PLC_GarderobaSufit2Taster "Garderoba sufit 2" ["Switchable"] { simatic="plc:M24.4:byte" } Switch PLC_BiuroSufit1Taster "Biuro sufit 1" ["Switchable"] { simatic="plc:M24.5:byte" } Switch PLC_BiuroSufit2Taster "Biuro sufit 2" ["Switchable"] { simatic="plc:M24.6:byte" } Switch PLC_KamilaSufit1Taster "Kamila sufit 1" ["Switchable"] { simatic="plc:M24.7:byte" } Switch PLC_KamilaSufit2Taster "Kamila sufit 2" ["Switchable"] { simatic="plc:M25.0:byte" } Switch PLC_SypialniaKinkiet1Taster "Sypialnia kinkiet 1" ["Switchable"] { simatic="plc:M25.1:byte" } Switch PLC_SypialniaKinkiet2Taster "Sypialnia kinkiet 2" ["Switchable"] { simatic="plc:M25.2:byte" } Switch PLC_KlatkaSchodowaTaster "Klatka schodowa kinkiety" ["Switchable"] { simatic="plc:M25.3:byte" } Switch PLC_KorytarzPietroTaster "Korytarz piętro kinkiety" ["Switchable"] { simatic="plc:M25.4:byte" }

Switch PLC_WjazdTaster "Wjazd" ["Switchable"] { simatic="plc:M28.0:byte" } Switch PLC_Chodnik1Taster "Chodnik 1" ["Switchable"] { simatic="plc:M28.1:byte" } Switch PLC_Chodnik2Taster "Chodnik 2" ["Switchable"] { simatic="plc:M28.2:byte" } Switch PLC_TarasPrzodTaster "Taras przód" ["Switchable"] { simatic="plc:M28.3:byte" } Switch PLC_TarasTylTaster "Taras tył" ["Switchable"] { simatic="plc:M28.4:byte" } Switch PLC_TerenLewaStronaTaster "Teren lewa strona" ["Switchable"] { simatic="plc:M28.5:byte" } Switch PLC_TerenPrawaStronaTaster "Teren prawa strona" ["Switchable"] { simatic="plc:M28.6:byte" } Switch PLC_BalkonPolnocTaster "Balkon północ" ["Switchable"] { simatic="plc:M28.7:byte" } Switch PLC_BalkonPoludnieTaster "Balkon południe" ["Switchable"] { simatic="plc:M29.0:byte" } Switch PLC_AltanaTaster "Altana" ["Switchable"] { simatic="plc:M29.1:byte" }

Switch PLC_PrzedpokojMalySwiatlo "Przedpokój mały" ["Lighting"] { simatic="plc:Q20.0:byte" } Switch PLC_PrzedpokojDuzySwiatlo "Przedpokój duży" ["Lighting"] { simatic="plc:Q20.1:byte" } Switch PLC_KotlowniaSwiatlo "Kotłownia" ["Lighting"] { simatic="plc:Q20.2:byte" } Switch PLC_PrzedsionekKotlowniSwiatlo "Przedsionek kotłowni" ["Lighting"] { simatic="plc:Q20.3:byte" } Switch PLC_PokojSufit1Swiatlo "Pokój sufit1" ["Lighting"] { simatic="plc:Q21.6:byte" } Switch PLC_PokojSufit2Swiatlo "Pokój sufit 2" ["Lighting"] { simatic="plc:Q21.7:byte" } Switch PLC_SpizarniaSwiatlo "Spiżarnia" ["Lighting"] { simatic="plc:Q21.5:byte" } Switch PLC_SalonSufitSwiatlo "Salon sufit" ["Lighting"] { simatic="plc:Q20.4:byte" } Switch PLC_SalonKinkietySwiatlo "Salon kinkiety" ["Lighting"] { simatic="plc:Q20.6:byte" } Switch PLC_JadalniaKinkietySwiatlo "Jadalnia kinkiety" ["Lighting"] { simatic="plc:Q20.7:byte" } Switch PLC_KuchniaSufitSwiatlo "Kuchnia sufit" ["Lighting"] { simatic="plc:Q21.0:byte" } Switch PLC_KuchniaBlatSwiatlo "Kuchnia blat" ["Lighting"] { simatic="plc:Q21.1:byte" } Switch PLC_LazienkaParterSufitSwiatlo "Łazienka parter sufit" ["Lighting"] { simatic="plc:Q21.2:byte" } Switch PLC_LazienkaParterLustroSwiatlo "Łazienka parter lustro" ["Lighting"] { simatic="plc:Q21.4:byte" } Switch PLC_LazienkaParterWentylator "Łazienka parter wentylator" ["Switchable"] { simatic="plc:Q21.3:byte" }

Switch PLC_StrychSwiatlo "Strych" ["Lighting"] { simatic="plc:Q24.2:byte" } Switch PLC_LazienkaPietroLustroSwiatlo "Łazienka piętro lustro" ["Lighting"] { simatic="plc:Q24.3:byte" } Switch PLC_LazienkaPietroLedSwiatlo "Łazienka piętro LED" ["Lighting"] { simatic="plc:Q24.4:byte" } Switch PLC_LazienkaPietroSufitSwiatlo "Łazienka piętro sufit" ["Lighting"] { simatic="plc:Q24.5:byte" } Switch PLC_GarderobaSufit1Swiatlo "Garderoba sufit 1" ["Lighting"] { simatic="plc:Q24.6:byte" } Switch PLC_GarderobaSufit2Swiatlo "Garderoba sufit 2" ["Lighting"] { simatic="plc:Q24.7:byte" } Switch PLC_BiuroSufit1Swiatlo "Biuro sufit 1" ["Lighting"] { simatic="plc:Q25.0:byte" } Switch PLC_BiuroSufit2Swiatlo "Biuro sufit 2" ["Lighting"] { simatic="plc:Q25.1:byte" } Switch PLC_KamilaSufit1Swiatlo "Kamila sufit 1" ["Lighting"] { simatic="plc:Q25.2:byte" } Switch PLC_KamilaSufit2Swiatlo "Kamila sufit 2" ["Lighting"] { simatic="plc:Q25.3:byte" } Switch PLC_SypialniaKinkiet1Swiatlo "Sypialnia kinkiet 1" ["Lighting"] { simatic="plc:Q25.4:byte" } Switch PLC_SypialniaKinkiet2Swiatlo "Sypialnia kinkiet 2" ["Lighting"] { simatic="plc:Q25.5:byte" } Switch PLC_KlatkaSchodowaSwiatlo "Klatka schodowa kinkiety" ["Lighting"] { simatic="plc:Q25.6:byte" } Switch PLC_KorytarzPietroSwiatlo "Korytarz piętro kinkiety" ["Lighting"] { simatic="plc:Q25.7:byte" }

Switch PLC_WjazdSwiatlo "Wjazd" ["Lighting"] { simatic="plc:DB28.DBX56.4:byte" } Switch PLC_TerenPrawaStronaSwiatlo "Teren prawa strona" ["Lighting"] { simatic="plc:DB28.DBX56.5:byte" } Switch PLC_TerenLewaStronaSwiatlo "Teren lewa strona" ["Lighting"] { simatic="plc:DB28.DBX56.6:byte" } Switch PLC_Chodnik1Swiatlo "Chodnik 1" ["Lighting"] { simatic="plc:Q28.1:byte" } Switch PLC_Chodnik2Swiatlo "Chodnik 2" ["Lighting"] { simatic="plc:Q28.2:byte" } Switch PLC_TarasPrzodSwiatlo "Taras przód" ["Lighting"] { simatic="plc:Q28.3:byte" } Switch PLC_TarasTylSwiatlo "Taras tył" ["Lighting"] { simatic="plc:Q28.4:byte" } Switch PLC_BalkonPolnocSwiatlo "Balkon północ" ["Lighting"] { simatic="plc:Q28.7:byte" } Switch PLC_BalkonPoludnieSwiatlo "Balkon południe" ["Lighting"] { simatic="plc:Q29.0:byte" } Switch PLC_AltanaSwiatlo "Altana" ["Lighting"] { simatic="plc:DB28.DBX50.3:byte" }

//Termostaty_CO

Switch PLC_TermostatyTrybRecznyAuto "Tryb pracy ogrzewania" (gTermostaty) { simatic="plc:DB6.DBX12.0:byte" }

Number PLC_PrzedpokojMalyTermostatStan "Przedpokój mały" (PrzedpokojMalyTemp) { simatic="plc:DB6.DBB23:byte" } Number PLC_PrzedpokojDuzyTermostatStan "Przedpokój duży" (PrzedpokojDuzyTemp) { simatic="plc:DB6.DBB37:byte" } Number PLC_PokojParterTermostatStan "Pokój parter" (PokojParterTemp) { simatic="plc:DB6.DBB51:byte" } Number PLC_SalonTermostatStan "Salon" (SalonTemp) { simatic="plc:DB6.DBB65:byte" } Number PLC_JadalniaTermostatStan "Jadalnia" (JadalniaTemp) { simatic="plc:DB6.DBB79:byte" } Number PLC_KuchniaTermostatStan "Kuchnia" (KuchniaTemp) { simatic="plc:DB6.DBB93:byte" } Number PLC_LazienkaParterTermostatStan "Łazienka parter" (LazienkaParterTemp) { simatic="plc:DB6.DBB107:byte" } Number PLC_GarderobaTermostatStan "Garderoba" (GarderobaTemp) { simatic="plc:DB6.DBB121:byte" } Number PLC_BiuroTermostatStan "Biuro" (BiuroTemp) { simatic="plc:DB6.DBB135:byte" } Number PLC_KamilaTermostatStan "Kamila" (KamilaTemp) { simatic="plc:DB6.DBB149:byte" } Number PLC_SypialniaTermostatStan "Sypialnia" (SypialniaTemp) { simatic="plc:DB6.DBB163:byte" } Number PLC_LazienkaPietroTermostatStan "Łazienka piętro" (LazienkaPietroTemp) { simatic="plc:DB6.DBB177:byte" }

Number PLC_KotlowniaTempA "Kotłownia" (KotlowniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD46:float" }

Group PrzedpokojMalyTemp "Przedpokój mały" [ "Thermostat" ] Number PLC_PrzedpokojMalyTempA "Przedpokój mały" (PrzedpokojMalyTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD2:float" } String PLC_PrzedpokojMalyTempTryb "Przedpokój mały" (PrzedpokojMalyTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_PrzedpokojMalyTempZ "Przedpokój mały" (PrzedpokojMalyTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD24:float" }

Group PrzedpokojDuzyTemp "Przedpokój duży" [ "Thermostat" ] Number PLC_PrzedpokojDuzyTempA "Przedpokój duży" (PrzedpokojDuzyTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD6:float" } String PLC_PrzedpokojDuzyTempTryb "Przedpokój duży" (PrzedpokojDuzyTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_PrzedpokojDuzyTempZ "Przedpokój duży" (PrzedpokojDuzyTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD38:float" }

Group PokojParterTemp "Pokój parter" [ "Thermostat" ] Number PLC_PokojParterTempA "Pokój parter" (PokojParterTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD10:float" } String PLC_PokojParterTempTryb "Pokoj parter" (PokojParterTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_PokojParterTempZ "Pokój parter" (PokojParterTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD52:float" }

Group SalonTemp "Salon" [ "Thermostat" ] Number PLC_SalonTempA "Salon" (SalonTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD14:float" } String PLC_SalonTempTryb "Salon" (SalonTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_SalonTempZ "Salon" (SalonTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD66:float" }

Group JadalniaTemp "Jadalnia" [ "Thermostat" ] Number PLC_JadalniaTempA "Jadalnia" (JadalniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD14:float" } String PLC_JadalniaTempTryb "Jadalnia" (JadalniaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_JadalniaTempZ "Jadalnia" (JadalniaTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD80:float" }

Group KuchniaTemp "Kuchnia" [ "Thermostat" ] Number PLC_KuchniaTempA "Kuchnia" (KuchniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD18:float" } String PLC_KuchniaTempTryb "Kuchnia" (KuchniaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_KuchniaTempZ "Kuchnia" (KuchniaTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD94:float" }

Group LazienkaParterTemp "Łazienka parter" [ "Thermostat" ] Number PLC_LazienkaParterTempA "Łazienka parter" (LazienkaParterTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD22:float" } String PLC_LazienkaParterTempTryb "Łazienka parter" (LazienkaParterTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_LazienkaParterTempZ "Łazienka parter" (LazienkaParterTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD108:float" }

Group GarderobaTemp "Garderoba" [ "Thermostat" ] Number PLC_GarderobaTempA "Garderoba" (GarderobaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD26:float" } String PLC_GarderobaTempTryb "Garderoba" (GarderobaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_GarderobaTempZ "Garderoba" (GarderobaTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD122:float" }

Group BiuroTemp "Biuro" [ "Thermostat" ] Number PLC_BiuroTempA "Biuro" (BiuroTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD30:float" } String PLC_BiuroTempTryb "Biuro" (BiuroTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_BiuroTempZ "Biuro" (BiuroTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD136:float" }

Group KamilaTemp "Kamila" [ "Thermostat" ] Number PLC_KamilaTempA "Kamila" (KamilaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD34:float" } String PLC_KamilaTempTryb "Kamila" (KamilaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_KamilaTempZ "Kamila" (KamilaTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD150:float" }

Group SypialniaTemp "Sypialnia" [ "Thermostat" ] Number PLC_SypialniaTempA "Sypialnia" (SypialniaTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD38:float" } String PLC_SypialniaTempTryb "Sypialnia" (SypialniaTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_SypialniaTempZ "Sypialnia" (SypialniaTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD164:float" }

Group LazienkaPietroTemp "Łazienka piętro" [ "Thermostat" ] Number PLC_LazienkaPietroTempA "Łazienka piętro" (LazienkaPietroTemp) [ "CurrentTemperature" ] { simatic="plc:DB28.DBD42:float" } String PLC_LazienkaPietroTempTryb "Łazienka piętro" (LazienkaPietroTemp) [ "homekit:HeatingCoolingMode" ] Number PLC_LazienkaPietroTempZ "Łazienka piętro" (LazienkaPietroTemp) [ "TargetTemperature" ] { simatic="plc:DB6.DBD178:float" }

//CWU

Group CwuTemp "C.W.U." [ "Thermostat" ] Number PLC_CwuTempA "C.W.U." (CwuTemp) [ "CurrentTemperature" ] { simatic="plc:MD88:float" } String PLC_CwuTempTryb "C.W.U." (CwuTemp) [ "homekit:HeatingCoolingMode" ]
Number PLC_CwuTempZ "C.W.U." (CwuTemp) [ "TargetTemperature" ] { simatic="plc:DB18.DBD22:float" }

//Piec_CO

Number PLC_PiecZasilanieCoTemp "Zasilanie C.O." (PiecCo) [ "CurrentTemperature" ] { simatic="plc:MD72:float" } Number PLC_PiecPowrotCoTemp "Powrót C.O." (PiecCo) [ "CurrentTemperature" ] { simatic="plc:MD76:float" } Number PLC_PiecCzynnikCoTemp "Czynnik C.O." (PiecCo) [ "CurrentTemperature" ] { simatic="plc:MD80:float" } Number PLC_PiecPodajnikCoTemp "Podajnik C.O." (PiecCo) [ "CurrentTemperature" ] { simatic="plc:MD84:float" } Number PLC_PiecSpalinyCoTemp "Spaliny C.O." (PiecCo) [ "CurrentTemperature" ] { simatic="plc:MD92:float" } Number PLC_PiecCisnienieCo "Ciśnienie C.O." (PiecCo) { simatic="plc:MD96:float" } Switch PLC_PiecPodajnikStan "Podajnik" { simatic="plc:M2.2:byte" } Switch PLC_PiecDmuchawaStan "Dmuchawa" { simatic="plc:M2.3:byte" } Switch PLC_PiecWentylatorStan "Podajnik" { simatic="plc:M2.4:byte" }

//Media

Number PLC_WodaCisnienie "Ciśnienie wody" (Media) { simatic="plc:MD100:float" }

//PLC_stany_urzadzen

Number PLC_StanyBramka "Bramka stany" { simatic="plc:M2.5:byte" } Number PLC_StanyZaworyCo "Zawory C.O. stany" { simatic="plc:MB164:byte" } Number PLC_StanyBrama "Brama stany" { simatic="plc:MB165:byte" } Number PLC_StanyPiec "Piec C.O. stany" { simatic="plc:MB166:byte" } Number PLC_StanyZawor4d "Zaworór 4d stany" { simatic="plc:MB167:byte" } Number PLC_StanyPompaCo "Pompa C.O. stany" { simatic="plc:MB168:byte" } Number PLC_StanyPompaCwu "Pompa C.W.U. stany" { simatic="plc:MB169:byte" } Number PLC_StanyPompaCyrkCwu "Pompa cyrk. C.W.U. stany" { simatic="plc:MB170:byte" } Number PLC_StanyAlarm "Alarm stany" { simatic="plc:MB171:byte" } Number PLC_StanyTrybPogodowy "Tryb pogodowy stany" { simatic="plc:MB172:byte" }

//PLC_Alarmy

Number PLC_AlarmModbusBlad "Modbus błąd RTU" { simatic="plc:MB185:byte" } Number PLC_AlarmPtPBlad "Modbus PtP ASCII" { simatic="plc:MB186:byte" } Number PLC_AlarmWysokaTempCo "Wysoka temperatura C.O." { simatic="plc:M8.0:byte" } Number PLC_AlarmNiskaTempCo "Niska temperatura C.O." { simatic="plc:M8.1:byte" } Number PLC_AlarmWysokaTempPodajnika "Wysoka temperatura podajnika" { simatic="plc:M8.2:byte" } Number PLC_AlarmWysokaTempCwu "Wysoka temperatura C.W.U." { simatic="plc:M8.3:byte" } Number PLC_AlarmWysokieCisCo "Wysokie ciśnienie C.O." { simatic="plc:M8.4:byte" } Number PLC_AlarmNiskieCisCo "Niskie ciśnienie C.O." { simatic="plc:M8.5:byte" } Number PLC_AlarmRezerwaPaliwa "Rezerwa paliwa w piecu C.O." { simatic="plc:M8.7:byte" }

//PLC_Powiadomienia

Number PLC_PowPiecZasypPaliwa "Piec w trybie serwisowym" { simatic="plc:DB24.DBX0.0:byte" } Number PLC_PowAlarmWlamanie "Alarm włamaniowy" { simatic="plc:DB24.DBX0.1:byte" } Number PLC_PowBramkaOtwarta "Otwarcie bramki" { simatic="plc:DB24.DBX0.2:byte" } Number PLC_PowBramaOtwarta "Otwarcie bramy" { simatic="plc:DB24.DBX0.3:byte" } Number PLC_PowPiecWysokaTempCo "Wysoka temperatura C.O." { simatic="plc:DB24.DBX0.4:byte" } Number PLC_PowPiecWysokaTempPodajnika "Wysoka temperatura podajnika" { simatic="plc:DB24.DBX0.5:byte" } Number PLC_PowPiecWysokieCisCo "Wysokie ciśnienie C.O." { simatic="plc:DB24.DBX0.6:byte" } Number PLC_PowPiecNiskieCisCo "Niskie ciśnienie C.O." { simatic="plc:DB24.DBX0.7:byte" } Number PLC_PowCwuWysokaTemp "Wysoka temperatura C.W.U." { simatic="plc:DB24.DBX1.0:byte" } Number PLC_PowPiecNiskaTempCo "Niska temperatura C.O." { simatic="plc:DB24.DBX1.1:byte" } Number PLC_PowAlarmUzbrojenie "Alarm uzbrojenie" { simatic="plc:DB24.DBX1.2:byte" } Number PLC_PowAlarmRozbrojenie "Rozbrojenie alarmu" { simatic="plc:DB24.DBX1.3:byte" } Number PLC_PowPiecRezerwaPaliwa "Rezerwa paliwa w piecu" { simatic="plc:DB24.DBX1.4:byte" } Number PLC_PowAlarmDymTemp "Pożar lub dym na strychu" { simatic="plc:DB24.DBX1.5:byte" } Number PLC_PowModbusBlad "Awaria komunikacji ModbusRTU" { simatic="plc:DB24.DBX1.6:byte" } Number PLC_PowPtPBlad "Awaria komunikacji PtP ACSII" { simatic="plc:DB24.DBX1.7:byte" } Number PLC_PowZawor4dZmianaTrybu "Zmiana trybu pracy zaworu 4d" { simatic="plc:DB24.DBX2.0:byte" } Number PLC_PowZawor4dAwaria "Awaria zaworu 4d" { simatic="plc:DB24.DBX2.1:byte" } Number PLC_PowAlarmUzbrojenieCzesciowe "Uzbrojenie częściowe" { simatic="plc:DB24.DBX2.2:byte" } Number PLC_PowAlarmSerwis "Alarm w trybie serwisowym" { simatic="plc:DB24.DBX2.3:byte" } Number PLC_PowPiecSerwis "Serwis pieca" { simatic="plc:DB24.DBX2.4:byte" } Number PLC_PowAlarmNapad "Alarm napadowy" { simatic="plc:DB24.DBX2.5:byte" } Number PLC_PowPiecWylaczony "Wyłączenie pieca" { simatic="plc:DB24.DBX2.6:byte" } Number PLC_PowAlarmTrybNormalny "Powrót alarmu do trybu normalnego" { simatic="plc:DB24.DBX2.7:byte" } Number PLC_PowBramkaZamknieta "Zamknięcie bramki" { simatic="plc:DB24.DBX3.0:byte" } Number PLC_PowBramaZamknieta "Zamknięcie bramy" { simatic="plc:DB24.DBX3.1:byte" }

grzegorz914 commented 6 years ago

Here full somatic log file: openhab.log.6.zip

docbender commented 6 years ago

I added new release https://github.com/docbender/openHAB-Simatic/releases/tag/1.1.4 Please test it. I tested it with your configuration and DB6 is now read correctly on my system

grzegorz914 commented 6 years ago

Hello,

thanks for Your nice work, all is OK now.

docbender commented 6 years ago

Thanks for your testing.