Jak ustawić aby spr...
 
Powiadomienia
Wyczyść wszystko

Pomoc Jak ustawić aby sprawdzał cyklicznie czy urządzenia wróciły

9 Wpisów
3 Użytkownicy
0 Likes
783 Wyświetleń
(@dknet)
Wpisów: 4
Bywalec
Autor tematu
 

Witam,

podepnę się pod temat. Walczę z Modbus-RTU, na jednej magistrali mam z 12 urządzeń, na drugiej około 10 - na razie testuje (czujniki temperatury, przekaźniki, zadajniki temp., licznik energii itd.)

Napotkałem problem z połączeniem z serwerem.

Urządzenia działają prawidłowo, kiedy odepnę z nich zasilanie, serwer je odpytuje i wiadomo dostaje błąd bo są bez zasilania i po iluś próbach przestaje je pytać.

Jak ustawić aby sprawdzał cyklicznie czy urządzenia wróciły - coś w rodzaju "Recennect co 2sek."

Ma ktoś na to jakiś pomysł?

Pozdrawiam. 

 
Dodane : 06/03/2021 9:22 am
Tagi tematu
(@kamikac)
Wpisów: 226
Pomocny
 

@dknet Co to jest za serwer? Z tego, co piszesz nie wynika, że chodzi o OpenHAB z Modbus binding.

 
Dodane : 06/03/2021 3:16 pm
(@dknet)
Wpisów: 4
Bywalec
Autor tematu
 

Serwer w sensie komputer. Tak chodzi o OpenHAB z Modbus Binding. 

Komunikacja przez konwertery USB-RS485, Protokół Modbus-RTU. 

 

Poniżej przykład konfiguracji z things dla jednego z modułów.

Bridge modbus:serial:Adres44 [port="/dev/ttyUSB1",baud=9600,id=44,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]{
	Bridge poller Relay[start="0", length="8", refresh="50", type="coil"]{
		Thing data Ch1[readStart="0", readValueType="bit", writeStart="0", writeValueType="bit", writeType="coil"]
		Thing data Ch2[readStart="1", readValueType="bit", writeStart="1", writeValueType="bit", writeType="coil"]
	}
	Bridge poller Input[start="0", length="8", refresh="50", type="discrete"]{
		Thing data Ch1[ readStart="0", readValueType="bit", updateUnchangedValuesEveryMillis="50"]
		Thing data Ch2[ readStart="1", readValueType="bit", updateUnchangedValuesEveryMillis="50"]
	}
}
 
Dodane : 06/03/2021 4:59 pm
(@kamikac)
Wpisów: 226
Pomocny
 

@dknet Nigdzie nie znalazłem informacji, że po kilku próbach binding się poddaje. Tutaj jest artykuł o tym jak działa binding i sposoby radzenia sobie ze znikającym urządzeniem. I tu jeszcze jeden.

Widać coś w logu, że binding przestaje odpytywać? Może to problem portu szeregowego? Tutaj coś na ten temat.

Ja bym proponował taki sposób podejścia do tematu:

  1. Obniżyć refresh do np 500 czy 1000. Naprawdę potrzebujesz 20 odczytów na sekundę?
  2. Wykorzystać funkcjonalność expire, która np po 30 sekundach ustawi wartości Itemów z MODBUSa na UNDEFINED.
  3. Skrypt, który sprawdza, czy wartość Item jest UNDEFINED i wysyła komendę REFRESH do Itemu, co powoduje "ręczne" wywołanie pollera.
  4. Można też wykorzystać dodatkowy kanał bindingu lastReadSuccess do sprawdzania kiedy poller coś odczytał.

Pozdrawiam

 
Dodane : 07/03/2021 12:24 am
(@dknet)
Wpisów: 4
Bywalec
Autor tematu
 

Witam,

odnośnie logów, openhab próbuje odczytać stan urządzeń w tym przypadku 3 razy.

O ile w dokumentacji jest, jak zwiększyć liczbę prób dla MaxTries.

Ale bardziej chodzi aby próby odczytu i komunikacji była oparta na cyklicznym sprawdzaniu co "X" czasu coś w rodzaju Reconnect z Node-Red, niż ilości prób.

Pozdrawiam. 

 

Edit:

Jeszcze zastanawiam się nad jedną kwestią.
Last Erroring Read oraz Last Successful Read działają zgodnie z założeniem, może dało by się zrobić automatyzację.
Tylko zastanawiam się jak można było by zresetować usługę/połączenie, teraz aby zaczęło działać robię restart całego serwera.
Dodam że OH bawię się od jakiegoś miesiąca w wolnej chwili, i jeszcze nie bawiłem się w terminalu OH. 
Na skrypt mam już pomysł, ale jeszcze nie wiem jak zrobić reset usługi. 

 

 

2021-03-07 08:57:12.906 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@531ee398[slaveId=50,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=7,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 38bed499-0bf7-47b2-b48f-ae53a3a23099]
2021-03-07 08:57:12.939 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@37808675[slaveId=30,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 2ea93f7b-d8b9-4e3e-8700-01bf0ff5c9af]
2021-03-07 08:57:14.461 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@52d5a704[slaveId=44,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID ef203d31-eeeb-4b25-ad4d-c886604040e3]
2021-03-07 08:57:14.494 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@6decf2ba[slaveId=40,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 3ed4844d-a5e3-45bf-b1c7-790fb95a0e29]
2021-03-07 08:57:16.087 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@48926cbe[slaveId=44,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 62f23695-4f38-4d8c-bd59-9280faec2bad]
2021-03-07 08:57:16.125 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@37808675[slaveId=30,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 2ea93f7b-d8b9-4e3e-8700-01bf0ff5c9af]
2021-03-07 08:57:17.715 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@531ee398[slaveId=50,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=7,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 38bed499-0bf7-47b2-b48f-ae53a3a23099]
2021-03-07 08:57:17.756 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@6decf2ba[slaveId=40,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 3ed4844d-a5e3-45bf-b1c7-790fb95a0e29]
2021-03-07 08:57:19.343 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@52d5a704[slaveId=44,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID ef203d31-eeeb-4b25-ad4d-c886604040e3]
2021-03-07 08:57:19.387 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@37808675[slaveId=30,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 2ea93f7b-d8b9-4e3e-8700-01bf0ff5c9af]
2021-03-07 08:57:20.972 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@48926cbe[slaveId=44,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 62f23695-4f38-4d8c-bd59-9280faec2bad]
2021-03-07 08:57:21.018 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@6decf2ba[slaveId=40,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 3ed4844d-a5e3-45bf-b1c7-790fb95a0e29]
2021-03-07 08:57:22.601 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@531ee398[slaveId=50,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=7,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 38bed499-0bf7-47b2-b48f-ae53a3a23099]
2021-03-07 08:57:22.646 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@f785790[slaveId=30,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID b2845500-af8f-4f2f-aa1e-3c993c8922fa]
2021-03-07 08:57:24.230 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@52d5a704[slaveId=44,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID ef203d31-eeeb-4b25-ad4d-c886604040e3]
2021-03-07 08:57:24.289 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@f785790[slaveId=30,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID b2845500-af8f-4f2f-aa1e-3c993c8922fa]
2021-03-07 08:57:25.861 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@3704d5df[slaveId=43,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID ca23811d-df32-49a0-a02c-3de488f58155]
2021-03-07 08:57:25.920 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@f785790[slaveId=30,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID b2845500-af8f-4f2f-aa1e-3c993c8922fa]
2021-03-07 08:57:27.490 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@48926cbe[slaveId=44,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 62f23695-4f38-4d8c-bd59-9280faec2bad]
2021-03-07 08:57:27.547 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@25d592b7[slaveId=40,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 40ebd2a0-1761-4daf-b1b9-f53bac87750c]
2021-03-07 08:57:29.118 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@5047d051[slaveId=43,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 2650cb43-773f-40fd-b67f-3c53e09ee44b]
2021-03-07 08:57:29.188 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@25d592b7[slaveId=40,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 40ebd2a0-1761-4daf-b1b9-f53bac87750c]
2021-03-07 08:57:30.747 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@37cb8865[slaveId=10,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID f92e132d-39d4-4605-82f1-96835b6d0f92]
2021-03-07 08:57:30.818 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@25d592b7[slaveId=40,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 40ebd2a0-1761-4daf-b1b9-f53bac87750c]
2021-03-07 08:57:32.374 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@3704d5df[slaveId=43,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID ca23811d-df32-49a0-a02c-3de488f58155]
2021-03-07 08:57:32.440 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@e9477c8[slaveId=12,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 377f5480-4cd7-4b49-b0a4-9d38d0427fa7]
2021-03-07 08:57:34.003 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@5c5f1678[slaveId=60,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=6,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID bee134fc-25cd-48e0-b3b0-1ca94fb28473]
2021-03-07 08:57:34.082 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@e9477c8[slaveId=12,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 377f5480-4cd7-4b49-b0a4-9d38d0427fa7]
2021-03-07 08:57:35.631 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@5047d051[slaveId=43,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 2650cb43-773f-40fd-b67f-3c53e09ee44b]
2021-03-07 08:57:35.711 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@e9477c8[slaveId=12,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 377f5480-4cd7-4b49-b0a4-9d38d0427fa7]
2021-03-07 08:57:37.259 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@37cb8865[slaveId=10,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID f92e132d-39d4-4605-82f1-96835b6d0f92]
2021-03-07 08:57:38.896 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@3704d5df[slaveId=43,functionCode=READ_COILS,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID ca23811d-df32-49a0-a02c-3de488f58155]
2021-03-07 08:57:40.557 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint@5c5f1678[slaveId=60,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=6,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID bee134fc-25cd-48e0-b3b0-1ca94fb28473]
2021-03-07 08:57:42.219 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@5047d051[slaveId=43,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 2650cb43-773f-40fd-b67f-3c53e09ee44b]
2021-03-07 08:57:43.881 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@130ba17e[slaveId=61,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=6,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID a9124598-cdc7-4f69-9043-c17fcebffc3e]
2021-03-07 08:57:43.889 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@37808675[slaveId=30,functionCode=READ_INPUT_DISCRETES,start=0,length=8,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 3f1ad6f7-1302-4636-9515-44b8d5df05d5]
2021-03-07 08:57:45.517 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint@37cb8865[slaveId=10,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID f92e132d-39d4-4605-82f1-96835b6d0f92]
 
Dodane : 07/03/2021 11:16 am
(@kamikac)
Wpisów: 226
Pomocny
 

@dknet W jednym z wątków z poprzedniego posta był gotowy przykład jak sobie radzić w przypadku przejścia w OFFLINE.

  1. Zastanawia mnie jedno: wysypuje Ci się cała komunikacja jak zniknie jedno urządzenie? W takim razie problem raczej nie leży w OpenHAB. Może wyłączone urzadzenie blokuje całą magistralę.
  2. Czy np po godzinie komunikacja nie wraca sama? Co się dzieje potem w logu, przecież pisze, że "Will try again soon".
  3. Próbowałeś zatrzymać OpenHAB i sprawdzić czy komunikacja działa z innego softu? Czy restart OH pomaga?
  4. I jeszcze jedno pytanie: Czy wszystkie urządzenia na jednym konwerterze USB<->RS485 mają te same parametry transmisji?
  5. Jest jeszcze jakiś problem z bindingiem modbus i portem szeregowym. Wygląda podobnie do Twojego. Ja używam MODBUS TCP w OH, więc nie mam tego problemu. Może będziesz musiał kupić bramkę ModbusTCP<->ModbusRTU.
 
Dodane : 07/03/2021 10:17 pm
(@dknet)
Wpisów: 4
Bywalec
Autor tematu
 

@kamikac

Problem jest na 99% po stornie openHAB, do serwera mam podłączone dwie magistrale (2 konwertery), część urządzeń pracuje na 19200 a część tylko na 9600.

I tak, jak odłączę czujnik temp. z magistrali 9600 to wszystko działa około 1,5min., jeśli w tym czasie go podłączę to wszystko działa z powrotem prawidłowo - i tu najlepsze, jeśli przez ten czas czujnik nie wróci, przestają pracować obydwie magistrale, również ta w której wszystkie urządzenia są. Dlatego sądzę że problem jest gdzieś w bibliotece. Zamówiłem już konwerter RS485<->LAN, zobaczę jak się będzie na tym zachowywać.

Same urządzenia jak i magistrala jest ok, bo testowałem to również na Node-Red w HomeAssistant, i tam te problemy nie występowały. Z tym że tam były bardzo duże opóźnienia pomiędzy wysłaniem rozkazu a wykonaniem go przez moduł. Tu działa to wielokrotnie szybciej. 

Odnośnie logów, zgadza się, odpytuje i próbuje, ale próbuje przez około 60-90sek. po tym czasie przestaje próbować. W openhab.log oraz events.log niema informacji czemu przestaje je odpytywać. Zaraz zerknę to co przesłałeś w linku.

Restart openHAB pomaga. 

EDIT: Jeszcze zauważyłem ciekawą sprawę, jak zatrzyma się komunikacja z urządzeniami, i na takim zablokowaniu, przełączę wielokrotnie switch programowy(który ma przełączać przekaźnik na płytce) to nic się nie dzieje. W momencie kiedy z konsoli wyśle "systemctl reboot" to OH wykonuje wszystkie rozkazy które były wykonane w trakcie zablokowanie się. 

🙂

 

 

 
Dodane : 07/03/2021 10:58 pm
(@kamikac)
Wpisów: 226
Pomocny
 

@dknet Może jest jakiś problem z obsługą seriala? Zerknij jeszcze tutaj: https://www.openhab.org/docs/administration/serial.html

A tu cały wątek, znów problemy z serialem i obejście tego przez wywoływanie komendy modpoll: https://community.openhab.org/t/modbus-binding-problem-with-serial-connection/117942/12

 
Dodane : 07/03/2021 11:34 pm
(@ldywicki)
Wpisów: 78
Kontrybutor
 

Drobna sugestia - możliwe że dla interfejsu szeregowego możesz skorzystać z opcji "minimalnej przerwy między operacjami". W początkowej wersji 3.0 był problem z lockem na port szeregowy. Problem wciąż jest. Ja to obchodzę przez zmianę biblioteki, która obsługuje porty szeregowe na inną ( https://github.com/NeuronRobotics/nrjavaserial -> https://github.com/nyholku/purejavacomm).

 
Dodane : 08/10/2021 12:40 pm
Udostępnij: