[SOLVED] Binding - Nilan Problem


(Nanna Agesen) #1

Hi All

I’m facing a problem with the new Modbus binding - I’m running Openhab 2.5.0 Build 1484.

I Have 8 Modbus slave device, all on different TCP/IP Modbus Gateways.

One of the Gateways attached to my Nilan HVAC is failing periodically between 1-3 days (When it is running everything works perfect.

When the device fails every Modbus gateways suffer dramatically performance with a delay of 30 second +.

When the NILAN fails, I can still poll the device from a separate Modbus tool without problem.
A restart of Openhab doesn’t resolve the problem, only a reboot of the gateway itself.
I have also tried a different gateway incase of a hardware issue.

I have made a DEBUG logging of both the Transport and the Binding see below:

The Nilan Slave device ID is 30.

Transport:

(ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@797d5194[slaveId=30,functionCode=READ_INPUT_REGISTERS,start=2000,length=12,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 59f2dc86-1293-4063-b8ac-a03714b2f3a9]
05-Jan-2019 14:29:09.053 [DEBUG] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Modbus operation ended, timing info: {total: 46101 ms, connection: 37033, transaction=9060, callback=4} [operation ID 59f2dc86-1293-4063-b8ac-a03714b2f3a9]
05-Jan-2019 14:29:09.053 [DEBUG] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Will now execute one-off poll task BasicPollTaskImpl@7a868e1c[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@74416f3c[slaveId=30,functionCode=READ_INPUT_REGISTERS,start=400,length=10,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@3c7fc0df[address=192.168.100.143,port=502],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@488ca8e0], waited in thread pool for 89177
05-Jan-2019 14:29:12.113 [ERROR] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@797d5194[slaveId=30,functionCode=READ_INPUT_REGISTERS,start=2000,length=12,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 6389530c-c636-43ec-9d87-b6ba368a524a]
05-Jan-2019 14:29:12.117 [DEBUG] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Modbus operation ended, timing info: {total: 46090 ms, connection: 37064, transaction=9018, callback=3} [operation ID 6389530c-c636-43ec-9d87-b6ba368a524a]
05-Jan-2019 14:29:12.117 [DEBUG] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Executing scheduled (5000ms) poll task BasicPollTaskImpl@7dc7c4d3[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@7300251b[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=1,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@3c7fc0df[address=192.168.100.143,port=502],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@80c6b419]. Current millis: 1546694952117
05-Jan-2019 14:29:15.179 [WARN ] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@bdc9653[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=300,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: SocketTimeoutException Read timed out [operation ID 83f2ec02-23ab-4a44-8190-ba4a14084e57]
05-Jan-2019 14:29:18.244 [WARN ] [hab.io.transport.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@4ff43c[slaveId=30,functionCode=READ_INPUT_REGISTERS,start=1000,length=4,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 521fb28e-5492-4756-9914-13dd8e28a848]`

Binding

05-Jan-2019 14:30:37.998 [ERROR] [ing.modbus.internal.handler.ModbusDataThingHandler] - Thing modbus:data:endpointNilan:nilan_input_userpanel:Nilan_Display_Attr_1_8 'Modbus data' had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message='I/O exception: SocketTimeoutException Read timed out', cause2=null)
05-Jan-2019 14:30:37.998 [ERROR] [ing.modbus.internal.handler.ModbusDataThingHandler] - Thing modbus:data:endpointNilan:nilan_input_userpanel:Nilan_Display_Text_1_2 'Modbus data' had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message='I/O exception: SocketTimeoutException Read timed out', cause2=null)
05-Jan-2019 14:30:37.998 [ERROR] [ing.modbus.internal.handler.ModbusDataThingHandler] - Thing modbus:data:endpointNilan:nilan_input_userpanel:Nilan_Display_Text_3_4 'Modbus data' had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message='I/O exception: SocketTimeoutException Read timed out', cause2=null)
05-Jan-2019 14:30:38.136 [DEBUG] [dbus.internal.handler.ModbusPollerThingHandlerImpl] - Thing modbus:poller:inverter:power_a received registers RegisterArrayWrappingInputRegister(00 00 01 0c 00 00 01 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@8779e0[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30773,length=4,maxTries=3]
05-Jan-2019 14:30:38.144 [DEBUG] [ing.modbus.internal.handler.ModbusDataThingHandler] - Thing modbus:data:inverter:power_a:power_a channels updated: {modbus:data:inverter:power_a:power_a:number=0.268}. readValueType=int32, readIndex=Optional[30773], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 268 and boolValue=true. Registers RegisterArrayWrappingInputRegister(00 00 01 0c 00 00 01 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@8779e0[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30773,length=4,maxTries=3]
05-Jan-2019 14:30:41.061 [DEBUG] [dbus.internal.handler.ModbusPollerThingHandlerImpl] - Thing modbus:poller:endpointNilan:nilan_input_userpanel received error ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message='I/O exception: SocketTimeoutException Read timed out', cause2=null) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@797d5194[slaveId=30,functionCode=READ_INPUT_REGISTERS,start=2000,length=12,maxTries=3]
05-Jan-2019 14:30:41.061 [ERROR] [ing.modbus.internal.handler.ModbusDataThingHandler] - Thing modbus:data:endpointNilan:nilan_input_userpanel:Nilan_Display_Text_15_16 'Modbus data' had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message='I/O exception: SocketTimeoutException Read timed out', cause2=null)
```
Also a Dropbox link with the Complete Log files:

https://www.dropbox.com/sh/se2iibzbsk1oipp/AAC4tihK03RV0jyPStnQaI9Ga?dl=0

Best Nanna

(Kim Andersen) #2

Looks to me it´s the RS485 hardware device (stick/dongle/whatever) or the Transport serial which locks up for some reason.
Have you tried disable the other 7 devices just to see if it´s a Nilan issue or a combination?

Which Nilan interface are you using?
I have a Nilan CTS602 interface running the new modbus binding as well. It has been running rock stable for some weeks now on openhab 2.4 and a Incircet FTDI USB<>RS485 dongle.


(Nanna Agesen) #3

I’m using a TCP/IP modbus gateway - Not a serial gateway. (Moxa & Planet).

When Openhab fails, I can still poll the CTS 602 with a Modbus Client.

I have tried disabling all 7 other Slave Device, but Nilan fails between 1-3 days.


(Rossko57) #4

You can probably reduce the impact by reducing the timeout in your tcp thing configuration, a couple of seconds should suffice.


(Nanna Agesen) #6

Changed the timeout yesterday from 5000 to 10000 and it failed again this morning.


(Rossko57) #7

I’m sure it did fail, wasn’t supposed to be a fix, its about minimising that long delay to other working channels.
The timeout is how long the binding will wait for a reply (that in this case never comes). Retries is how many times it will wait.

It’s going to be helpful to see the tcp and poller things for the failing device.


(Nanna Agesen) #8

What I mean was that the other devices still have a very slow response time, when the Nilan device was failing.

I have attached the Nilan.thing



//#nilan_input_device.connection
	Bridge poller nilan_input_device [ start=0, length=4, refresh=10000, type="input" ] {
	    
	    	 Thing data Nilan_Bus_Version [ readStart="0", readValueType="uint16" ]
	    
	   	 Thing data Nilan_App_VersionMajor [ readStart="1", readValueType="uint16" ]

	   	 Thing data Nilan_App_VersionMinor [ readStart="2", readValueType="uint16" ]
	    
	   	 Thing data Nilan_App_VersionRelease [ readStart="3", readValueType="uint16" ]
	   	 }
	

	
//#nilan_input_analogio
	Bridge poller nilan_input_analogio [ start=200, length=22, refresh=10000, type="input" ] {
 
	    	 Thing data Nilan_Input_T0_Controller [ readStart="200", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T1_Intake [ readStart="201", readValueType="int16",readTransform="JS(divide100.js)" ]

	   	 Thing data Nilan_Input_T2_Inlet [ readStart="202", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T3_Exhaust [ readStart="203", readValueType="int16",readTransform="JS(divide100.js)" ]

		 Thing data Nilan_Input_T4_Outlet [ readStart="204", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T5_Cond [ readStart="205", readValueType="int16",readTransform="JS(divide100.js)" ]

	   	 Thing data Nilan_Input_T6_Evap [ readStart="206", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T7_Inlet [ readStart="207", readValueType="int16",readTransform="JS(divide100.js)" ]
	
		 Thing data Nilan_Input_T8_Outdoor [ readStart="208", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T9_Heater [ readStart="209", readValueType="int16",readTransform="JS(divide100.js)" ]

	   	 Thing data Nilan_Input_T10_Extem [ readStart="210", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T11_Top [ readStart="211", readValueType="int16",readTransform="JS(divide100.js)" ]

		 Thing data Nilan_Input_T12_Bottom [ readStart="212", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T13_Retum [ readStart="213", readValueType="int16",readTransform="JS(divide100.js)" ]

	   	 Thing data Nilan_Input_T14_Supply [ readStart="214", readValueType="int16",readTransform="JS(divide100.js)" ]
	    
	   	 Thing data Nilan_Input_T15_Room [ readStart="215", readValueType="int16",readTransform="JS(divide100.js)" ]

		 Thing data Nilan_Input_T16 [ readStart="216", readValueType="int16",readTransform="JS(divide100.js)" ]

	   	 Thing data Nilan_Input_RH [ readStart="221", readValueType="uint16",readTransform="JS(divide100.js)" ]
	    
//	   	 Thing data Nilan_Input_CO2 [ readStart="222", readValueType="uint16",readTransform="JS(divide100.js)" ]
	   	 }

	

//#nilan_holding_control	

	Bridge poller Nilan_Holding_Control [ start=1000, length=8, refresh=10000, type="holding" ] {
	    
	   	 Thing data Nilan_Control_Type [ readStart="1000", readValueType="uint16", writeStart="1000", 	writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	   	 Thing data Nilan_Control_RunSet [ readStart="1001", readValueType="uint16", writeStart="1001", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_Control_ModeSet [ readStart="1002", readValueType="uint16", writeStart="1002", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Control_VentSet [ readStart="1003", readValueType="uint16", writeStart="1003", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	   	 Thing data Nilan_Control_TempSet [ readStart="1004", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1004", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true, writeTransform="JS(multiply100.js)" ]
	    
	         Thing data Nilan_Control_ServiceMode [ readStart="1005", readValueType="uint16", writeStart="1005", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Control_ServicePct [ readStart="1006", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1006", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Control_Preset [ readStart="1007", readValueType="uint16", writeStart="1007", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ] 
	         }


//#nilan_holding_analogio	

	Bridge poller nilan_holding_analogio [ start=200, length=6, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Output_ExhaustSpeed [ readStart="200", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="200", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Output_InletSpeed [ readStart="201", readValueType="uint16",
readTransform="JS(divide100.js)",writeStart="201", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_Output_AirHeatCap [ readStart="202", readValueType="uint16", writeStart="202", 
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Output_CenHeatCap [ readStart="203", readValueType="uint16", writeStart="203", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_Output_CprCap [ readStart="204", readValueType="uint16", writeStart="204", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Output_EarthSpeed [ readStart="205", readValueType="uint16", writeStart="205", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	         }

//#nilan_input_control

	Bridge poller nilan_input_control [ start=1000, length=4, refresh=10000, type="input" ] {
	    
	         Thing data Nilan_Control_RunAct [ readStart="1000", readValueType="uint16" ]
	    
	         Thing data Nilan_Control_ModeAct [ readStart="1001", readValueType="uint16" ]

	         Thing data Nilan_Control_State [ readStart="1002", readValueType="uint16" ]
	    
	         Thing data Nilan_Control_SeclnState [ readStart="1003", readValueType="uint16" ]
		 }

//#nilan_holding_time

	Bridge poller nilan_holding_time [ start=300, length=6, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Time_Second [ readStart="300", readValueType="uint16", writeStart="300",
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Time_Minute [ readStart="301", readValueType="uint16",writeStart="301",
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_Time_Hour [ readStart="302", readValueType="uint16", writeStart="302", 
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Time_Day [ readStart="303", readValueType="uint16", writeStart="303", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

		 Thing data Nilan_Time_Month [ readStart="304", readValueType="uint16", writeStart="304", 
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Time_Year [ readStart="305", readValueType="uint16", writeStart="305", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_time

	Bridge poller Nilan_Bus_Address [ start=0, length=1, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Bus_Address [ readStart="0", readValueType="uint16", writeStart="0",
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_discreteio	// Length 28 Changed to 26 on 31/12/2018

//	Bridge poller nilan_holding_discreteio [ start=100, length=26, refresh=10000, type="holding" ] {
	    
//	         Thing data Nilan_Output_AirFlap [ readStart="100", readValueType="uint16", writeStart="100", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_SmokeFlap [ readStart="101", readValueType="uint16", writeStart="101", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_BypassOpen [ readStart="102", readValueType="uint16", writeStart="102", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_BypassClose [ readStart="103", readValueType="uint16", writeStart="103", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_AirCircPump [ readStart="104", readValueType="uint16", writeStart="104", 	   
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_AirHeatAllo [ readStart="105", readValueType="uint16", writeStart="105", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_Output_AirHeat_1 [ readStart="106", readValueType="uint16", writeStart="106", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_AirHeat_2 [ readStart="107", readValueType="uint16", writeStart="107", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_AirHeat_3 [ readStart="108", readValueType="uint16", writeStart="108", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_Compressor [ readStart="109", readValueType="uint16", writeStart="109", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_Compressor2 [ readStart="110", readValueType="uint16", writeStart="110", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_4WayCool [ readStart="111", readValueType="uint16", writeStart="111", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_Output_HotgasHeat [ readStart="112", readValueType="uint16", writeStart="112", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_HotgasCool [ readStart="113", readValueType="uint16", writeStart="113", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_CondOpen [ readStart="114", readValueType="uint16", writeStart="114", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_CondClose [ readStart="115", readValueType="uint16", writeStart="115", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_WaterHeat [ readStart="116", readValueType="uint16", writeStart="116", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_3WayValve [ readStart="117", readValueType="uint16", writeStart="117", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_Output_CenCircPump [ readStart="118", readValueType="uint16", writeStart="118", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_CenHeat_1 [ readStart="119", readValueType="uint16", writeStart="119", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_CenHeat_2 [ readStart="120", readValueType="uint16", writeStart="120", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_Output_CenHeat_3 [ readStart="121", readValueType="uint16", writeStart="121", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_CenHeatExt [ readStart="122", readValueType="uint16", writeStart="122",
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_UserFunc [ readStart="123", readValueType="uint16", writeStart="123", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
//	         Thing data Nilan_Output_UserFunc_2 [ readStart="124", readValueType="uint16", writeStart="124", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//	         Thing data Nilan_Output_Defrosting [ readStart="125", readValueType="uint16", writeStart="125", 
//writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]	    
//	         }


//#nilan_holding_airtemp

	Bridge poller nilan_holding_airtemp [ start=1200, length=6, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_AirTemp_CoolSet [ readStart="1200", readValueType="uint16", readTransform="JS(divide100.js)", writeStart="1200", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_AirTemp_TempMinSum [ readStart="1201", readValueType="uint16",
readTransform="JS(divide100.js)",writeStart="1201", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_AirTemp_TempMinWin [ readStart="1202", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1202", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_AirTemp_TempMax [ readStart="1203", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1203", writeValueType="int16",writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_AirTemp_TempMaxWin [ readStart="1204", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1204", writeValueType="int16",writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_AirTemp_TempSummer [ readStart="1205", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1205", writeValueType="int16",writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	         }

//#nilan_holding_airqualrh

	Bridge poller nilan_holding_airqualrh [ start=1910, length=4, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_AirQual_RH_VentLo [ readStart="1910", readValueType="uint16", writeStart="1910", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_AirQual_RH_VentHi [ readStart="1911", readValueType="uint16", writeStart="1911", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_AirQual_RH_LimLo [ readStart="1912", readValueType="uint16",readTransform="JS(divide100.js)", writeStart="1912", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_AirQual_RH_TimeOut [ readStart="1913", readValueType="uint16", writeStart="1913", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_user2functions

	Bridge poller nilan_holding_user2functions [ start=610, length=6, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Program_User2FuncAct [ readStart="610", readValueType="uint16", writeStart="610", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Program_User2FuncSet [ readStart="611", readValueType="uint16", writeStart="611", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_Program_User2TimeSet [ readStart="612", readValueType="uint16", writeStart="612", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Program_User2VentSet [ readStart="613", readValueType="uint16", writeStart="613", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 
		 Thing data Nilan_Program_User2TempSet [ readStart="614", readValueType="uint16", writeStart="614", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Program_User2OffsSet [ readStart="615", readValueType="uint16", writeStart="615", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_user1functions

	Bridge poller nilan_holding_user1functions [ start=600, length=6, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Program_UserFuncAct [ readStart="600", readValueType="uint16", writeStart="600", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Program_UserFuncSet [ readStart="601", readValueType="uint16", writeStart="601", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

	         Thing data Nilan_Program_UserTimeSet [ readStart="602", readValueType="uint16", writeStart="602", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Program_UserVentSet [ readStart="603", readValueType="uint16", writeStart="603", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 
		 Thing data Nilan_Program_UserTempSet [ readStart="604", readValueType="uint16", writeStart="604", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
	    
	         Thing data Nilan_Program_UserOffsSet [ readStart="605", readValueType="uint16", writeStart="605", writeValueType="int16",writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_input_discreteio

	Bridge poller nilan_input_discreteio [ start=100, length=14, refresh=10000, type="input" ] {
	    
	         Thing data Nilan_Input_UserFunc [ readStart="100", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_AirFilter [ readStart="101", readValueType="uint16" ]

	         Thing data Nilan_Input_DoorOpen [ readStart="102", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_Smoke [ readStart="103", readValueType="uint16" ]
	
		 Thing data Nilan_Input_MotorThermo [ readStart="104", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_Frost_Overht [ readStart="105", readValueType="uint16" ]

	         Thing data Nilan_Input_AirFlow [ readStart="106", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_P_HI [ readStart="107", readValueType="uint16" ]

		 Thing data Nilan_Input_P_LO [ readStart="108", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_Boil [ readStart="109", readValueType="uint16" ]

	         Thing data Nilan_Input_3WayPos [ readStart="110", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_DefrostHG [ readStart="111", readValueType="uint16" ]

		 Thing data Nilan_Input_Defrost [ readStart="112", readValueType="uint16" ]
	    
	         Thing data Nilan_Input_UserFunc_2 [ readStart="113", readValueType="uint16" ]
		 }

//#nilan_input_airtemp

	Bridge poller nilan_input_airtemp [ start=1200, length=7, refresh=10000, type="input" ] {
	    
	         Thing data Nilan_AirTemp_IsSummer [ readStart="1200", readValueType="uint16" ]
	    
	         Thing data Nilan_AirTemp_TempinletSet [ readStart="1201", readValueType="uint16",readTransform="JS(divide10.js)" ]

	         Thing data Nilan_AirTemp_TempControl [ readStart="1202", readValueType="uint16",readTransform="JS(divide100.js)" ]
	    
	         Thing data Nilan_AirTemp_TempRoom [ readStart="1203", readValueType="uint16",readTransform="JS(divide100.js)" ]
	
		 Thing data Nilan_AirTemp_EffPct [ readStart="1204", readValueType="uint16",readTransform="JS(divide1000.js)" ]
	    
	         Thing data Nilan_AirTemp_CapSet [ readStart="1205", readValueType="uint16",readTransform="JS(divide1000.js)" ]

	         Thing data Nilan_AirTemp_CapAct [ readStart="1206", readValueType="uint16",readTransform="JS(divide1000.js)" ]
		 }

//#nilan_input_alarm

	Bridge poller nilan_input_alarm [ start=400, length=10, refresh=10000, type="input" ] {
	    
	         Thing data Nilan_Alarm_List_1_ID [ readStart="400", readValueType="uint16" ]
	    
	         Thing data Nilan_Alarm_List_1_Importance [ readStart="401", readValueType="uint16" ]

	         Thing data Nilan_Alarm_List_1_Date [ readStart="402", readValueType="uint16", readTransform="JS(nilan_alarmdate.js)" ]
	    
	         Thing data Nilan_Alarm_List_1_Time [ readStart="403", readValueType="uint16", readTransform="JS(nilan_alarmtime.js)" ]
	
		 Thing data Nilan_Alarm_List_2_ID [ readStart="404", readValueType="uint16" ]
	    
	         Thing data Nilan_Alarm_List_2_Date [ readStart="405", readValueType="uint16", readTransform="JS(nilan_alarmdate.js)" ]

	         Thing data Nilan_Alarm_List_2_Time [ readStart="406", readValueType="uint16", readTransform="JS(nilan_alarmtime.js)" ]

		 Thing data Nilan_Alarm_List_3_ID [ readStart="407", readValueType="uint16" ]
	    
	         Thing data Nilan_Alarm_List_3_Date [ readStart="408", readValueType="uint16", readTransform="JS(nilan_alarmdate.js)" ]

	         Thing data Nilan_Alarm_List_3_Time [ readStart="409", readValueType="uint16", readTransform="JS(nilan_alarmtime.js)" ]
		 }


//#nilan_holding_alarm

	Bridge poller nilan_holding_alarm [ start=400, length=1, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Alarm_Reset [ readStart="400", readValueType="uint16", writeStart="400", writeValueType="int16", 
writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_weekprogram

	Bridge poller nilan_holding_weekprogram [ start=500, length=1, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_Program_Select [ readStart="500", readValueType="uint16", writeStart="500", 
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_airflow

	Bridge poller nilan_holding_airflow [ start=1100, length=2, refresh=10000, type="holding" ] {
	    
	         Thing data Nilan_AirFlow_AirExchMode [ readStart="1100", readValueType="uint16", writeStart="1100", 
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

		 Thing data Nilan_AirFlow_CoolVent [ readStart="1101", readValueType="uint16", writeStart="1101", 
writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
		 }

//#nilan_holding_hotwater
//
//	Bridge poller nilan_holding_hotwater [ start=1700, length=2, refresh=10000, type="holding" ] {
//	    
//	         Thing data Nilan_HotWater_TempSet_T11 [ readStart="1700", readValueType="uint16",readTransform="JS
//(divide100.js)", writeStart="1700", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", 
//writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_HotWater_TempSet_T12 [ readStart="1701", readValueType="uint16",readTransform="JS
//(divide100.js)", writeStart="1701", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", 
//writeMultipleEvenWithSingleRegisterOrCoil=true ]
//		 }

//#nilan_holding_centheat

//	Bridge poller nilan_holding_centheat [ start=1800, length=1, refresh=10000, type="holding" ] {
//	    
//	         Thing data Nilan_CentralHeat_HeatExtern [ readStart="1800", readValueType="uint16",readTransform="JS
//(divide100.js)", writeStart="1800", writeValueType="int16", writeType="holding", writeTransform="JS(multiply100.js)", 
//writeMultipleEvenWithSingleRegisterOrCoil=true ]
//		 }

//#nilan_holding_airqualco2

//	Bridge poller nilan_holding_airqualco2 [ start=1920, length=3, refresh=10000, type="holding" ] {
//	    
//	         Thing data Nilan_AirQual_CO2_VentHi [ readStart="1920", readValueType="uint16", writeStart="1920", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_AirQual_CO2_LimLo [ readStart="1921", readValueType="uint16", writeStart="1921", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]

//		 Thing data Nilan_AirQual_CO2_LimHi [ readStart="1922", readValueType="uint16", writeStart="1922", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
//		 }

//#nilan_holding_userpanel

//	Bridge poller nilan_holding_userpanel [ start=2000, length=1, refresh=10000, type="holding" ] {
//	    
//	         Thing data Nilan_Display_KeyCode [ readStart="2000", readValueType="uint16", writeStart="2000", 
//writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
//		 }

//#nilan_input_userpanel

	Bridge poller nilan_input_userpanel [ start=2000, length=12, refresh=10000, type="input" ] {
	    
	         Thing data Nilan_Display_LED_1 [ readStart="2000", readValueType="uint16" ]
	    
	         Thing data Nilan_Display_LED_2 [ readStart="2001", readValueType="uint16" ]

	         Thing data Nilan_Display_Text_1_2 [ readStart="2002", readValueType="uint16" ]
	    
	         Thing data Nilan_Display_Text_3_4 [ readStart="2003", readValueType="uint16" ]
	
		 Thing data Nilan_Display_Text_5_6 [ readStart="2004", readValueType="uint16" ]
	    
	         Thing data Nilan_Display_Text_7_8 [ readStart="2005", readValueType="uint16" ]

	         Thing data Nilan_Display_Attr_1_8 [ readStart="2006", readValueType="uint16" ]
	    
	         Thing data Nilan_Display_Text_9_10 [ readStart="2007", readValueType="uint16" ]

		 Thing data Nilan_Display_Text_11_12 [ readStart="2008", readValueType="uint16" ]
	    
	         Thing data Nilan_Display_Text_13_14 [ readStart="2009", readValueType="uint16" ]

	         Thing data Nilan_Display_Text_15_16 [ readStart="2010", readValueType="uint16" ]
	    
	         Thing data Nilan_Display_Attr_9_16 [ readStart="2011", readValueType="uint16" ]
		 }



}

(Rossko57) #9

may we see the tcp thing?

It’s going to difficult to sort out the underlying issue, on the face of it the gateway is not responding to requests from OH.

I’d assume the Nilan (serial) is happy, if it responds to enquiries from other modbus pollers. It won’t have any idea where the requests originate from on the other side of the gateway.


(Nanna Agesen) #10

Sorry bad Copy/Paste.

Yes I don’t understand why I can poll the Nilan when Openhab is failing… Even a shutdown of Openhab doesn’t works.

Bridge modbus:tcp:endpointNilan [ host="192.168.100.143", port=502, id=30, connectMaxTries=3 ] {


//#nilan_input_device.connection
	Bridge poller nilan_input_device [ start=0, length=4, refresh=10000, type="input" ] {
	    
	    	 Thing data Nilan_Bus_Version [ readStart="0", readValueType="uint16" ]
	    
	   	 Thing data Nilan_App_VersionMajor [ readStart="1", readValueType="uint16" ]

	   	 Thing data Nilan_App_VersionMinor [ readStart="2", readValueType="uint16" ]
	    
	   	 Thing data Nilan_App_VersionRelease [ readStart="3", readValueType="uint16" ]
	   	 }

(Rossko57) #11

The gateway maintains the TCP connections between host(s)`and the serial bus. Guessing the gateway gets upset in some way about connection to OH host but not other hosts. Or possibly the TCP end at the OH host is messed up - less likely, as other TCP traffic still works. Either way, the gateway seems to accept a new connection from someone else.

One thought - are there are other active systems on your network? Not all gateways play nice with more than one master.


(Nanna Agesen) #12

There is only one Gateway polling the slave device (Nilan) - I have even tried two different gateways (Two different models).


(Rossko57) #13

Yes. The gateway does nothing of it’s own accord though? Something else acts as Modbus master (OH usually) and sends Modbus-TCP polls to the gateway. The gateway translates to Modbus-RTU poll and sends on the serial bus. The Nilan answers (without any idea who asked). The gateway gets the serial answer, remembers who asked for it, and passes it along as TCP.

Not all gateways play nicely if there is more than one master on the TCP side - say openHAB and some other system - because they might not very good at remembering which data is for who i.e. opening more than one TCP connection at a time. “other system” could be a different software on the same box even, or a proprietary controller . Hence just asking if that might be the case here?


(Rossko57) #14

To try to minimise the disruption caused by this issue, I would change tcp Bridge connectMaxTries=1. You’ll be trying again in a few seconds anyway, don’t block out other devices waiting 3 retries.
Also I think you already have connectTimeoutMillis=5000 ? That’s plenty, if it doesn’t work that quickly it’s not going to work.

By default, your TCP bridge should be doing connect/disconnect at each transfer. We might try to change that later, to reduce gateway workload, but leave it or now.

On your pollers, I would change maxTries=1 instead of the default 3. Again, it it doesn’t work you’ll be polling again later anyway.

Leave writeMaxTries unspecified as default 3, that’s more important to retry.


(Nanna Agesen) #15

There are nothing other that OH that acts as a Master on my network - I have tried shutting down OH and no activity on the gateway.

I’ll try setting the connectMaxTries back to default (1)
And maxTries=1 for the pollers.


(Nanna Agesen) #16

@Kim_Andersen

Can you share your CTS602 Thing and Item file with me?


(Kim Andersen) #17

Ofcouse… Here you go:

Bridge modbus:serial:myNilan [ port="/dev/ttyUSB0", id=30, baud=19200, stopBits="1.0", parity="even", dataBits=8, encoding="rtu" ] {

  Bridge poller appRegisters [ start=000, length=4, refresh=6000, type="input" ] {
      Thing data inp000 [ readStart="000", readValueType="int16" ]
      Thing data inp001 [ readStart="001", readValueType="int16" ]
      Thing data inp002 [ readStart="002", readValueType="int16" ]
      Thing data inp003 [ readStart="003", readValueType="int16" ]

   }

  Bridge poller 100Registers [ start=100, length=16, refresh=6000, type="input" ] {
      Thing data inp100 [ readStart="100", readValueType="int16" ]
      Thing data inp101 [ readStart="101", readValueType="int16" ]
      Thing data inp103 [ readStart="103", readValueType="int16" ]
      Thing data inp105 [ readStart="105", readValueType="int16" ]
      Thing data inp106 [ readStart="106", readValueType="int16" ]
      Thing data inp107 [ readStart="107", readValueType="int16" ]
      Thing data inp114 [ readStart="114", readValueType="int16" ]
      Thing data inp115 [ readStart="115", readValueType="int16" ]

   }

  Bridge poller inputRegisters [ start=200, length=23, refresh=6000, type="input" ] {
      Thing data inp200 [ readStart="200", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp202 [ readStart="202", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp203 [ readStart="203", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp204 [ readStart="204", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp207 [ readStart="207", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp208 [ readStart="208", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp209 [ readStart="209", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp210 [ readStart="210", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp215 [ readStart="215", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp221 [ readStart="221", readValueType="int16", readTransform="JS(divide100.js)" ]

   }

  Bridge poller 400Registers [ start=400, length=10, refresh=6000, type="input" ] {
      Thing data inp400 [ readStart="400", readValueType="int16" ]
      Thing data inp401 [ readStart="401", readValueType="int16" ]
      Thing data inp402 [ readStart="402", readValueType="int16", readTransform="JS(nilan_alarmdate.js)" ]
      Thing data inp403 [ readStart="403", readValueType="int16", readTransform="JS(nilan_alarmdate.js)" ]
      Thing data inp404 [ readStart="404", readValueType="int16" ]
      Thing data inp405 [ readStart="405", readValueType="int16", readTransform="JS(nilan_alarmdate.js)" ]
      Thing data inp406 [ readStart="406", readValueType="int16", readTransform="JS(nilan_alarmdate.js)" ]
      Thing data inp407 [ readStart="407", readValueType="int16" ]
      Thing data inp408 [ readStart="408", readValueType="int16", readTransform="JS(nilan_alarmdate.js)" ]
      Thing data inp409 [ readStart="409", readValueType="int16", readTransform="JS(nilan_alarmdate.js)" ]


   }


  Bridge poller statusRegisters [ start=1000, length=4, refresh=6000, type="input" ] {
      Thing data inp1000 [ readStart="1000", readValueType="int16" ]
      Thing data inp1001 [ readStart="1001", readValueType="int16" ]
      Thing data inp1002 [ readStart="1002", readValueType="int16" ]
      Thing data inp1003 [ readStart="1003", readValueType="int16" ]
   }

  Bridge poller airflowRegisters [ start=1100, length=5, refresh=6000, type="input" ] {
      Thing data inp1100 [ readStart="1100", readValueType="int16" ]
      Thing data inp1101 [ readStart="1101", readValueType="int16" ]
      Thing data inp1102 [ readStart="1102", readValueType="int16" ]
      Thing data inp1103 [ readStart="1103", readValueType="int16" ]
      Thing data inp1104 [ readStart="1104", readValueType="int16" ]
   }

  Bridge poller airRegisters [ start=1200, length=7, refresh=6000, type="input" ] {
      Thing data inp1200 [ readStart="1200", readValueType="int16" ]
      Thing data inp1201 [ readStart="1201", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp1202 [ readStart="1202", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp1203 [ readStart="1203", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp1204 [ readStart="1204", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp1205 [ readStart="1205", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data inp1206 [ readStart="1206", readValueType="int16", readTransform="JS(divide100.js)" ]

   }

  Bridge poller displayRegisters [ start=2000, length=12, refresh=6000, type="input" ] {
      Thing data inp2000 [ readStart="2000", readValueType="int16" ]
      Thing data inp2000 [ readStart="2002", readValueType="int16" ]
      Thing data inp2000 [ readStart="2003", readValueType="int16" ]
      Thing data inp2000 [ readStart="2004", readValueType="int16" ]
      Thing data inp2000 [ readStart="2005", readValueType="int16" ]
      Thing data inp2000 [ readStart="2006", readValueType="int16" ]
      Thing data inp2000 [ readStart="2007", readValueType="int16" ]
      Thing data inp2000 [ readStart="2008", readValueType="int16" ]
      Thing data inp2000 [ readStart="2009", readValueType="int16" ]
      Thing data inp2000 [ readStart="2010", readValueType="int16" ]
      Thing data inp2000 [ readStart="2011", readValueType="int16" ]

   }


  Bridge poller holdingRegisters [ start=100, length=28, refresh=6000, type="holding" ] {
      Thing data hol100 [ readStart="100", readValueType="int16" ]
      Thing data hol102 [ readStart="102", readValueType="int16" ]
      Thing data hol103 [ readStart="103", readValueType="int16" ]
      Thing data hol123 [ readStart="123", readValueType="int16", writeStart="123", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true"  ]
      Thing data hol125 [ readStart="125", readValueType="int16", writeStart="125", writeValueType="int16", writeType="holding" ]
      Thing data hol126 [ readStart="126", readValueType="int16", writeStart="126", writeValueType="int16", writeType="holding" ]

   }

  Bridge poller fanRegisters [ start=200, length=3, refresh=6000, type="holding" ] {
      Thing data hol200 [ readStart="200", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data hol201 [ readStart="201", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data hol202 [ readStart="202", readValueType="int16", readTransform="JS(divide100.js)" ]


   }

  Bridge poller timeRegisters [ start=300, length=6, refresh=6000, type="holding" ] {
      Thing data hol300 [ readStart="300", readValueType="int16" ]
      Thing data hol301 [ readStart="301", readValueType="int16" ]
      Thing data hol302 [ readStart="302", readValueType="int16" ]
      Thing data hol303 [ readStart="303", readValueType="int16" ]
      Thing data hol304 [ readStart="304", readValueType="int16" ]
      Thing data hol305 [ readStart="305", readValueType="int16" ]

   }

  Bridge poller ProgSelRegisters [ start=500, length=2, refresh=6000, type="holding" ] {
      Thing data hol500 [ readStart="500", readValueType="int16", writeStart="500", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
 
   }

  Bridge poller ProgUserFuncActRegisters [ start=600, length=7, refresh=6000, type="holding" ] {
      Thing data hol600 [ readStart="600", readValueType="int16", writeStart="600", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol601 [ readStart="601", readValueType="int16", writeStart="601", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol602 [ readStart="602", readValueType="int16", writeStart="602", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol603 [ readStart="603", readValueType="int16", writeStart="603", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol604 [ readStart="604", readValueType="int16", writeStart="604", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol605 [ readStart="605", readValueType="int16", writeStart="605", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
 
   }

  Bridge poller controlRegisters [ start=1001, length=7, refresh=6000, type="holding" ] {
      Thing data hol1001 [ readStart="1001", readValueType="int16", writeStart="1001", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol1002 [ readStart="1002", readValueType="int16", writeStart="1002", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true"  ]
      Thing data hol1003 [ readStart="1003", readValueType="int16", writeStart="1003", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true"  ]
      Thing data hol1004 [ readStart="1004", readValueType="int16", writeStart="1004", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)"  ]
      Thing data hol1005 [ readStart="1005", readValueType="int16" ]
      Thing data hol1006 [ readStart="1006", readValueType="int16", readTransform="JS(divide100.js)" ]
      Thing data hol1007 [ readStart="1007", readValueType="int16" ]

   }

  Bridge poller AirFlowExhMoRegisters [ start=1100, length=2, refresh=6000, type="holding" ] {
      Thing data hol1100 [ readStart="1100", readValueType="int16" ]
      Thing data hol1101 [ readStart="1101", readValueType="int16", writeStart="1101", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]

   }

  Bridge poller AirTempRegisters [ start=1200, length=8, refresh=6000, type="holding" ] {
      Thing data hol1200 [ readStart="1200", readValueType="int16", writeStart="1200", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol1201 [ readStart="1201", readValueType="int16", writeStart="1201", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol1202 [ readStart="1202", readValueType="int16", writeStart="1202", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol1203 [ readStart="1203", readValueType="int16", writeStart="1203", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol1204 [ readStart="1204", readValueType="int16", writeStart="1204", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol1205 [ readStart="1205", readValueType="int16", writeStart="1205", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
 
   }

 Bridge poller AirQuaRhRegisters [ start=1910, length=4, refresh=6000, type="holding" ] {
      Thing data hol1910 [ readStart="1910", readValueType="int16", writeStart="1910", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol1911 [ readStart="1911", readValueType="int16", writeStart="1911", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]
      Thing data hol1912 [ readStart="1912", readValueType="int16", writeStart="1912", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true", readTransform="JS(divide100.js)", writeTransform="JS(multiply100.js)" ]
      Thing data hol1913 [ readStart="1913", readValueType="int16", writeStart="1913", writeValueType="int16", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil="true" ]

   }

}

Items:

/* Nilan */
Group heat_nilan (All)

Number nilan_BusVersion			"Bus version [%s]" 									{channel="modbus:data:myNilan:appRegisters:inp000:number"}
String nilan_AppVersionMajor		"App Version Major [%s]" 				 				{channel="modbus:data:myNilan:appRegisters:inp001:string"}
String nilan_AppversionMinor		"App Version Minor [%s]" 								{channel="modbus:data:myNilan:appRegisters:inp002:string"}
String nilan_AppVersionRelease		"App Version Release [%s]" 								{channel="modbus:data:myNilan:appRegisters:inp003:string"}

Switch  nilan_Input_UserFunc          "User function [%s]"                         	<boy_2>        (gNilan) 		{channel="modbus:data:myNilan:100Registers:inp100:switch"}
Switch  nilan_Input_AirFilter         "Air filter alarm [%s]"                      	<siren>        (gNilan)			{channel="modbus:data:myNilan:100Registers:inp101:switch"}
Switch  nilan_Input_Smoke             "Fire/Smoke alarm [%s]"                      	<smoke>        (gNilan) 		{channel="modbus:data:myNilan:100Registers:inp103:switch"}
Switch  nilan_Input_Frost_Overht      "Heating surface frost / overheat [%s]"      	<climate>      (gNilan) 		{channel="modbus:data:myNilan:100Registers:inp105:switch"}
Switch  nilan_Input_AirFlow           "Airflow monitor (guard) [%s]"               	<flow>         (gNilan) 		{channel="modbus:data:myNilan:100Registers:inp106:switch"}
Switch  nilan_Input_P_HI              "High pressure switch [%s]"                  	<pressure>     (gNilan)			{channel="modbus:data:myNilan:100Registers:inp107:switch"}
Switch  nilan_Input_DamperClosed      "Air Damper Closed position [%s]"               	<flow>         (gNilan) 		{channel="modbus:data:myNilan:100Registers:inp114:switch"}
Switch  nilan_Input_DamperOpen        "Air Damper Open position [%s]"               	<flow>         (gNilan) 		{channel="modbus:data:myNilan:100Registers:inp115:switch"}

Number nilan_Input_T0_Controller      "Controller board temperature [%.1f °C]"         <temperature>   (gNilan) 		{channel="modbus:data:myNilan:inputRegisters:inp200:number"}
// Number nilan_Input_T2_Inlet           "Inlet temperature (before heater) [%.1f °C]"    <temperature>   (gNilan)		 	{channel="modbus:data:myNilan:inputRegisters:inp202:number"}
Number nilan_Input_T3_Exhaust         "Room exhaust temperature [%.1f °C]"             <temperature>   (gNilan,gAirSensor,gChart)	{channel="modbus:data:myNilan:inputRegisters:inp203:number"}
Number nilan_Input_T4_Outlet          "Outlet temperature [%.1f °C]"                   <temperature>   (gNilan)			{channel="modbus:data:myNilan:inputRegisters:inp204:number"}
Number nilan_Input_T7_Inlet           "Inlet temperature (after heater) [%.1f °C]"     <temperature>   (gNilan,gAirSensor,gChart)	{channel="modbus:data:myNilan:inputRegisters:inp207:number"}
Number nilan_Input_T8_Outdoor         "Outdoor temperature [%.1f °C]"                  <temperature>   (gNilan,gAirSensor,gChart)	{channel="modbus:data:myNilan:inputRegisters:inp208:number"}
Number nilan_Input_T9_Heater          "Heating surface temperature [%.1f °C]"          <temperature>   (gNilan)  		{channel="modbus:data:myNilan:inputRegisters:inp209:number"}
Number nilan_Input_T10_Extem          "External room temperature [%.1f °C]"            <temperature>   (gNilan)  		{channel="modbus:data:myNilan:inputRegisters:inp210:number"}
Number nilan_Input_T15_Room           "User panel room temperature [%.1f °C]"          <temperature>   (gNilan,gAirSensor)   	{channel="modbus:data:myNilan:inputRegisters:inp215:number"}
Number nilan_Input_RH                 "Humidity [%.0f %%]"                             <humidity>      (gNilan,gAirSensor,Fugtighed)	{channel="modbus:data:myNilan:inputRegisters:inp221:number"}

Number Nilan_Alarm_Status             "Alarm state bit mask [%d]"                                        <keyring>   (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp400:number"}
Number Nilan_Alarm_List_1_ID          "Alarm 1 - Code [MAP(nilan_alarmcode_to_string.map):%s]"           <keyring>   (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp401:number"}
String Nilan_Alarm_List_1_Date        "Alarm 1 - Date [%s]"                                              <calendar>  (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp402:string"}
String Nilan_Alarm_List_1_Time        "Alarm 1 - Time [%s]"                                              <clock>     (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp403:string"}
Number Nilan_Alarm_List_2_ID          "Alarm 2 - Code [%s]"                                              <keyring>   (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp404:number"}
String Nilan_Alarm_List_2_Date        "Alarm 2 - Date [%s]"                                              <calendar>  (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp405:string"}
String Nilan_Alarm_List_2_Time        "Alarm 2 - Time [%s]"                                              <clock>     (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp406:string"}
Number Nilan_Alarm_List_3_ID          "Alarm 3 - Code [%s]"                                              <keyring>   (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp407:number"}
String Nilan_Alarm_List_3_Date        "Alarm 3 - Date [%s]"                                              <calendar>  (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp408:string"}
String Nilan_Alarm_List_3_Time        "Alarm 3 - Time [%s]"                                              <clock>     (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp409:string"}

// Number Nilan_Alarm_List_1_Importance  "Alarm 1 - Importance [MAP(nilan_alarmcode_to_importance.map):%d]" <alarm>     (gNilan) 	{channel="modbus:data:myNilan:400Registers:inp402:number"}


Switch nilan_Control_RunAct           "Actual on/off state [%s]" <switch>    (gNilan)						{channel="modbus:data:myNilan:statusRegisters:inp1000:switch"}
Number nilan_Control_ModeAct          "Actual operation mode [MAP(nilan_control_modeact.map):%s]" 	<settings>  (gNilan)	{channel="modbus:data:myNilan:statusRegisters:inp1001:number"}
Number nilan_Control_State		"Actual control state [MAP(nilan_control_state.map):%s]"    	<settings>  		{channel="modbus:data:myNilan:statusRegisters:inp1002:number"}
Number nilan_Control_SeclnState		"Actual time in state [%d s]"				    	<time>			{channel="modbus:data:myNilan:statusRegisters:inp1003:number"}

Number nilan_AirFlow_VentSet		"Actual ventilation step set ventilation [MAP(nilan_ventset.map):%s]" 	<fan> 		{channel="modbus:data:myNilan:airflowRegisters:inp1100:number"}
Number nilan_AirFlow_InletAct		"Actual Inlet step set ventilation [MAP(nilan_ventset.map):%s]" 	<fan> 		{channel="modbus:data:myNilan:airflowRegisters:inp1101:number"}
Number nilan_AirFlow_ExhaustAct		"Actual Exhaust step set ventilation [MAP(nilan_ventset.map):%s]" 	<fan> 		{channel="modbus:data:myNilan:airflowRegisters:inp1102:number"}
Number nilan_AirFlow_SinceFiltDay	"Days since last airfilter change alarm [%s]" 				<fan> 		{channel="modbus:data:myNilan:airflowRegisters:inp1103:number"}

Number Nilan_AirTemp_IsSummer         "Summer state [%d]"                                 		<sun>           (gNilan)	{channel="modbus:data:myNilan:airRegisters:inp1200:number"}
Number Nilan_AirTemp_TempinletSet     "Inlet temperature request (T7 setpoint) [%.1f °C]" 		<temperature>  	(gNilan)	{channel="modbus:data:myNilan:airRegisters:inp1201:number"}
Number Nilan_AirTemp_TempControl      "Actual value for controlled temperature [%.1f °C]" 		<temperature>   (gNilan)	{channel="modbus:data:myNilan:airRegisters:inp1202:number"}
Number Nilan_AirTemp_TempRoom         "Actual room temperature (T15 or T10) [%.1f °C]"    		<temperature>   (gNilan)	{channel="modbus:data:myNilan:airRegisters:inp1203:number"}
Number Nilan_AirTemp_EffPct           "Passive heat exchanger efficiency [%.1f %%]"       		<line>          (gNilan)	{channel="modbus:data:myNilan:airRegisters:inp1204:number"}
Number Nilan_AirTemp_CapSet           "Requested capacity [%.1f %%]"                                   				{channel="modbus:data:myNilan:airRegisters:inp1205:number"}
Number Nilan_AirTemp_CapAct           "Actual capacity [%.1f %%]"                                        			{channel="modbus:data:myNilan:airRegisters:inp1206:number"}

Number Nilan_Display_LED_1		"LED 1 [MAP(nilan_on_off.map):%s]"    				<switch> (gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2000:number"}
String Nilan_Display_Text_1_2         "Text line 1 character 1-2 [%s]"           				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2002:string"}
String Nilan_Display_Text_3_4         "Text line 1 character 3-4 [%s]"            				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2003:string"}
String Nilan_Display_Text_5_6         "Text line 1 character 5-6 [%s]"            				(gNilan)	{channel="modbus:data:myNilan:displayRegisters:inp2004:string"}
String Nilan_Display_Text_7_8         "Text line 1 character 7-8 [%s]"            				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2005:string"}
Number Nilan_Display_Attr_1_8         "Text line 1 flags [%d]"                   				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2006:number"}
String Nilan_Display_Text_9_10        "Text line 2 character 9-10 [%s]"           				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2007:string"}
String Nilan_Display_Text_11_12       "Text line 2 character 11-12 [%s]"          				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2008:string"}
String Nilan_Display_Text_13_14       "Text line 2 character 13-14 [%s]"          				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2009:string"}
String Nilan_Display_Text_15_16       "Text line 2 character 15-16 [%s]"          				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2010:string"}
Number Nilan_Display_Attr_9_16        "Text line 2 flags [%d]"                    				(gNilan) 	{channel="modbus:data:myNilan:displayRegisters:inp2011:number"}


Contact nilan_Output_AirFlap          "Air flap [%s]"                  					<contact>	(gNilan)	{channel="modbus:data:myNilan:holdingRegisters:hol100:contact"}
Contact nilan_Output_BypassOpen       "Bypass flap open [%s]"           				<contact>	(gNilan)	{channel="modbus:data:myNilan:holdingRegisters:hol102:contact"}
Contact nilan_Output_BypassClose      "Bypass flap close [%s]"          				<contact>	(gNilan)	{channel="modbus:data:myNilan:holdingRegisters:hol103:contact"}

Switch  nilan_Output_UserFunc         "User function active [%s]"            				<boy_2>      	(gNilan)	{channel="modbus:data:myNilan:holdingRegisters:hol123:switch"}
Switch  nilan_Output_Defrosting       "Defrost function active [%s]"         				<climate>    	(gNilan)	{channel="modbus:data:myNilan:holdingRegisters:hol125:switch"}
Switch  nilan_AlarmRelayState	      "Alarm Relay state [%s]"						<switch>	(gNilan)	{channel="modbus:data:myNilan:holdingRegisters:hol126:switch"}


Number nilan_Output_ExhaustSpeed      "Exhaust fan speed [%.0f %%]"               			<fan>     	(gNilan)	{channel="modbus:data:myNilan:fanRegisters:hol200:number"}
Number nilan_Output_InletSpeed        "Inlet fan speed [%.0f %%]"                			<fan>     	(gNilan)	{channel="modbus:data:myNilan:fanRegisters:hol201:number"}
Number nilan_Output_AirHeatCap        "Air heater capacity [%.1f %%]"             			<line>					{channel="modbus:data:myNilan:fanRegisters:hol202:number"}

Number	Nilan_Time_Second		"Second [%d]" 							<time>		(gNilan) 		{channel="modbus:data:myNilan:timeRegisters:hol300:number"}
Number	Nilan_Time_Minute		"Minute [%d]" 							<time>		(gNilan) 		{channel="modbus:data:myNilan:timeRegisters:hol301:number"}
Number	Nilan_Time_Hour			"Hour [%d]" 							<time>		(gNilan) 		{channel="modbus:data:myNilan:timeRegisters:hol302:number"}
Number	Nilan_Time_Day			"Day [%d]" 							<calendar> 	(gNilan) 		{channel="modbus:data:myNilan:timeRegisters:hol303:number"}
Number	Nilan_Time_Month		"Month [%d]" 							<calendar> 	(gNilan) 		{channel="modbus:data:myNilan:timeRegisters:hol304:number"}
Number	Nilan_Time_Year			"Year [%d]" 							<calendar> 	(gNilan) 		{channel="modbus:data:myNilan:timeRegisters:hol305:number"}

Number Nilan_Program_Select           "Week program nb. select [MAP(nilan_program_select.map):%s]"     <calendar>      	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgSelRegisters:hol500:number"}

Switch Nilan_Program_UserFuncAct      "User function active [%s]"                                      <boy_2>         	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgUserFuncActRegisters:hol600:switch"}
Number Nilan_Program_UserFuncSet      "User function select [MAP(nilan_program_userfuncset.map):%s]"   <settings>      	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgUserFuncActRegisters:hol601:number"}
Number Nilan_Program_UserTimeSet      "Min User function period [%d]"                                  <clock>         	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgUserFuncActRegisters:hol602:number"}
Number Nilan_Program_UserVentSet      "Step User function ventilation [MAP(nilan_ventset.map):%s]"     <fan_ceiling>   	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgUserFuncActRegisters:hol603:number"}
Number Nilan_Program_UserTempSet      "User function temperature (Extend function only) [%.1f °C]"     <temperature>   	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgUserFuncActRegisters:hol604:number"}
Number Nilan_Program_UserOffsSet      "User function temperature(Offset function only) [%.1f °C]"      <temperature>   	(gNilan,gNilanProgram) 	{channel="modbus:data:myNilan:ProgUserFuncActRegisters:hol605:number"}



Switch Nilan_Control_RunSet         "User on / off select"                                           	<switch>        (gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1001:switch"}
Number Nilan_Control_ModeSet        "User operation mode select [MAP(nilan_control_modeact.map):%s]" 	<settings>      (gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1002:number"}
Number Nilan_Control_VentSet        "User ventilation step select [MAP(nilan_ventset.map):%s]"       	<fan_ceiling>   (gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1003:number"}
Number Nilan_Control_TempSet        "User temperature setpoint [%.1f °C]"                            	<temperature>   (gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1004:number"}
Number Nilan_Control_ServiceMode    "Service mode select [MAP(nilan_control_servicemode.map):%s]"    	<lock>          (gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1005:number"}
Number Nilan_Control_ServicePct     "Service mode capacity [%.1f %%]"                                                	(gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1006:number"}
Number Nilan_Control_Preset         "Request preset to factory [%d]"                                                 	(gNilan) 	{channel="modbus:data:myNilan:controlRegisters:hol1007:number"}

Number Nilan_AirFlow_AirExchMode      "Air exchange mode [MAP(nilan_airflow_airexchmode.map):%s]"      	<flow>          (gNilan) 	{channel="modbus:data:myNilan:AirFlowExhMoRegisters:hol1100:number"}
Number Nilan_AirFlow_CoolVent         "Cooling high ventilation step [MAP(nilan_ventset.map):%s]"      	<fan_ceiling>   (gNilan) 	{channel="modbus:data:myNilan:AirFlowExhMoRegisters:hol1101:number"}

Number Nilan_AirTemp_CoolSet          "Cooling temperature setpoint select [%d]"  			<temperature> 	(gNilan) 	{channel="modbus:data:myNilan:AirTempRegisters:hol1200:number"}
Number Nilan_AirTemp_TempMinSum       "Inlet temp. min. summer [%.1f °C]"         			<temperature> 	(gNilan) 	{channel="modbus:data:myNilan:AirTempRegisters:hol1201:number"}
Number Nilan_AirTemp_TempMinWin       "Inlet temp. min. winter [%.1f °C]"         			<temperature> 	(gNilan) 	{channel="modbus:data:myNilan:AirTempRegisters:hol1202:number"}
Number Nilan_AirTemp_TempMax          "Inlet temp. max. summer [%.1f °C]"         			<temperature> 	(gNilan) 	{channel="modbus:data:myNilan:AirTempRegisters:hol1203:number"}
Number Nilan_AirTemp_TempMaxWin       "Inlet temp. max. winter [%.1f °C]"         			<temperature> 	(gNilan) 	{channel="modbus:data:myNilan:AirTempRegisters:hol1204:number"}
Number Nilan_AirTemp_TempSummer       "Summer/winter limit [%.1f °C]"             			<temperature> 	(gNilan) 	{channel="modbus:data:myNilan:AirTempRegisters:hol1205:number"}

Number Nilan_AirQual_RH_VentLo        "Humidity low winter step select [MAP(nilan_ventset.map):%s]" 	<fan_ceiling> 	(gNilan) 	{channel="modbus:data:myNilan:AirQuaRhRegisters:hol1910:number"}
Number Nilan_AirQual_RH_VentHi        "Humidity high step select [MAP(nilan_ventset.map):%s]"       	<fan_ceiling> 	(gNilan) 	{channel="modbus:data:myNilan:AirQuaRhRegisters:hol1911:number"}
Number Nilan_AirQual_RH_LimLo         "Humidity limit for low ventilation [%.0f %%]"                	<humidity>    	(gNilan) 	{channel="modbus:data:myNilan:AirQuaRhRegisters:hol1912:number"}
Number Nilan_AirQual_RH_TimeOut       "Humidity max. time on high ventilation [%d min.]"            	<clock>       	(gNilan) 	{channel="modbus:data:myNilan:AirQuaRhRegisters:hol1913:number"}

I havn´t linked all adresses, cause my Nilan is a Comfort 300LR, which doesnt support everything in the CTS602 interface. And I still have some clean up to do, as there are still adresses which it doesnt read correct or not at all. The CTS602 doc is very poor and badly written, in my opinion. But I´m getting there sooner or later :slight_smile:


(Rossko57) #18

@Nanna_Agesen I spent some time (!) looking back in the old “alpha testing” thread, vaguely remembering some talk of modbus error managment. Found only some half-formed ideas, I will have to have a play with this area . Not that that would fix your underlying problem.

But it did remind me that you’ve been suffering with this “sleepy gateway” for quite some time, it rather got lost in the cloud of everything else.

Bear with this, we’ll get to the bottom of it. It’s great you’ve been able to eliminate hardware already. And being able to poll from another tool while “asleep” confirms the serial side is okay, so it’s either TCP at OH or gateway end. Rebooting OH without fixing it suggests it’s gateway end, and that seems to be confirmed by gateway reboot being the fix.

Just to be sure - are both ends on fixed IP addresses, no DHCP changes confusing things here? What’s inbetween, just ethernet switch?

The old thread had another user running into a “half-closed” TCP connection issue, which sounds a bit like what is going on here, except in that case it seemed to recover better.


(Nanna Agesen) #19

Thanks @Kim_Andersen - Mine is also a Comfort 300LR :slight_smile:


(Nanna Agesen) #20

@rossko57 I did the changes yesterday, the gateway failed this morning - it’s difficult to say if it did any improvements, but no need for other devices to wait for the Nilan to retry.

Yes both OH and all my gateways are on fixed IP addresses - All my gateways are connected to the same switch - when OH fails I have TCP/IP connectivity between OH and the gateway.

Do you think I should try the reconnectAfterMillis part now?

Also I’ll try to reset the TCP/IP connection on the OH host next time it fails, just to see if the connection is restored.


(Rossko57) #21

I’m guessing that means you can ping the gateway and/or read a management webpage or something?

Maybe. I think at the moment we have connect/disconnect TCP at each transaction, which will mean for each poller thing.
Perhaps first it’s worth adding more time between transactions - timeBetweenTransactionsMillis set to 150 or so in the tcp bridge thing. Give the gateway more time to handle disconnects.

I don’t think timeBetweenReconnectMillis would help at all, as rebooting OH (a long time!) is doing that and doesn’t help.

If that doesn’t help, then yes lets go for reconnectAfterMillis and chnage the way it works