Nilan connected to Openhabian and USB is online in Paperui. So far so good However, itâs a steep learning curve for me if I have to edit and add files using Linux (via SSH), but I can see that others are able to see their Openhabian file structure via windows file explorer. How can this be done? I can of course connect to Openhabian via SSH into it via itâs ip-address (192.168.0.232 in my case), but trying to put the same ip-address into windows file explorer, being under âNetworkâ, results in Chrome opening a windows saying âNot able to connectâ (translated from danish âUde af stand til at oprette forbindelseâ).
Is this done via the WSL distro?
You´ll have to use samba which can be a bit of a pain in windows 10. I dont use that myself.
Insted I use WinScp. A nice program, which looks abit like file explorer in windows. It has an internal editor, which is suitable for creating and editing manual files.
Winscp: https://winscp.net/eng/download.php
PS. watch out for all the commercials on the site⌠It may confuse people into downloading the wrong programâŚ
Many thanks Kim. That worked straightaway, but Iâm seeing openhabian@192.168.0.232 with a nearly empty directory structure (only a readme.txt). I guess the Openhabian files are placed elsewhere - possibly under ârootâ. However root does not seem to have âopenhabianâ as login pw.
Apart from that it seems to be what I am after
Alle the files you need are under /root/etc/
There you will see the openhab folder structure.
Thanks for your help Kim! Winscp worked but I ran into a permission error trying to select the folder ârootâ. The error is âPermission denied. Error code: 3. Error message from server: Permission deniedâ
Should say that I have not changed the default pw, so I am logging in with openhabian/openhabian.
Then I tried to go the Samba way, first installing the share via openhabian-config option 66, and easily connected via Windows File explorer using \192.168.0.232\openhabian, but here I am unable to go up in the file hierarchi. The only thing visible is a âREADME.txtâ with this content âThis is your linux userâs âhomeâ folder. Place personal files, programs or scripts here.â
As far as I understand it is not possible to log in via ârootâ, so I do not understand what I am missing here.
openhabian is a user associated with your openhab install.
The install lives in folders with /openhab/ naming, somewhere else.
To use a Windows analogy, youâre looking in My Documents instead of Program Files.
There has to be something else wrong then, cause I´m using Winscp just fine, and have been ever since start, even with default password. (openhabian/openhabian is the default allright).
I wonder what may be the cause. Did you activate SSH on your openhab system?
This is how the login shows on Winscp:
As for Samba/Windows⌠Sorry cant be much help⌠I gave that up long time ago, and havn´t tried since
I can SSH into the PI, so I assume the answer is yes. AFAICS there are no further settings related to SSH in openhabian-config?
Earlier, after having found out I had this problem, I tried to run 14 âFix Permissionsâ but that didnât change anything.
Weird - Iâll try searching on
It is weird⌠Please let us know if you find the cause. I´m possitive this is one tiny simple thing preventing it from workingâŚ
Sorry, I believe (hope) I misunderstood you The folder is in the âroot directoryâ, ie /etc/openhab2/ , not /root/etc/openhab2/ right? I can easily access this folder and here are all the items, things subfolders.
To move on, I have not been able to see from the thread what the names for the files should be. Could I just give for example the things file a name âNilan.txtâ
Many thanks in advance for your excellent guidance helping a complete beginner like me
Nope. Docs -
Great to hear⌠And actually it was a rather stupid path I gave you⌠The correct one is ofocuse /etc/openhab2/ But you sorted that outâŚ
I can give you a hint, and with Rossko´s link, I´m sure you can figure this out as well
What you call a file is all up to you for prefix. The suffix is however important. .things goes into /things/ folder, .items into the /items/ folder etcâŚ
Now go read the doc as rossko so kindly suggested
Thanks for your patience I managed to get your nilan.things, nilan.items, sitemap and the translations files placed in the appropriate folders and now Iâm - sort of - in business However, one slight problem: 99.9% of the entries in my log viewer are errors or warnings (see a small arbitrary extract below). Does that give you guys any indications on where to look for what is missing in my config? My device has a heater/cooler, but assume this has nothing to do with this flood of errors.
2020-04-07 13:38:01.864 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@6d2e95[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=1910,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: IOException Error reading response (EOF) [operation ID d161a055-3463-412d-939e-8a04f04d0afc]
2020-04-07 13:38:03.463 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 1e 03 07 76 00 04 a6 c8
2020-04-07 13:38:03.465 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2020-04-07 13:38:03.469 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@a4e630 (unit id 30 & transaction 324). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:03.471 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@a4e630 (unit id 30 & transaction 324). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:03.474 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@6d2e95[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=1910,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: IOException Error reading response (EOF) [operation ID 2a0e583e-aa7a-4c70-8287-c76b0a574d31]
2020-04-07 13:38:05.083 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 1e 03 07 76 00 04 a6 c8
2020-04-07 13:38:05.086 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2020-04-07 13:38:05.091 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@15d264b (unit id 30 & transaction 325). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:05.094 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@15d264b (unit id 30 & transaction 325). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:05.098 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@6d2e95[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=1910,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: IOException Error reading response (EOF) [operation ID ebe4978b-6092-4f31-a557-53746d59674c]
2020-04-07 13:38:06.693 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 1e 03 04 b0 00 08 46 b4
2020-04-07 13:38:06.695 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2020-04-07 13:38:06.699 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1d81798 (unit id 30 & transaction 326). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:06.702 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1d81798 (unit id 30 & transaction 326). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:06.705 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@825cc1[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=1200,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 6d45009b-a6d2-48e6-8e1d-8c0945f05018]
2020-04-07 13:38:06.760 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1200 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:06.767 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1201 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:06.776 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1202 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:06.784 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1203 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:06.793 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1204 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:06.801 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1205 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:08.320 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 1e 03 04 b0 00 08 46 b4
2020-04-07 13:38:08.322 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2020-04-07 13:38:08.326 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@12679f6 (unit id 30 & transaction 327). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:08.329 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@12679f6 (unit id 30 & transaction 327). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:08.332 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@825cc1[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=1200,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 4b42b007-3bc7-4045-b03d-57b39a07ea52]
2020-04-07 13:38:08.385 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1200 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:08.394 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1201 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:08.401 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1202 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:08.408 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1203 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:08.415 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1204 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:08.423 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:myNilan:AirTempRegisters:hold1205 âModbus Dataâ had ModbusSlaveIOExceptionImpl error on read: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message=âI/O exception: IOException Error reading response (EOF)â, cause2=null)
2020-04-07 13:38:09.935 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 1e 03 07 76 00 04 a6 c8
2020-04-07 13:38:09.937 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2020-04-07 13:38:09.941 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1a902c0 (unit id 30 & transaction 328). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:09.944 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1a902c0 (unit id 30 & transaction 328). Serial parameters: SerialParameters@1c1775e[portName=/dev/ttyUSB0,baudRate=19200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=even,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2020-04-07 13:38:09.947 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@6d2e95[slaveId=30,functionCode=READ_MULTIPLE_REGISTERS,start=1910,length=4,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 d161a055-3463-412d-939e-8a04f04d0afc]
Assuming at least some of your Items are working?
One of your pollers is âblackholingâ, thatâs to say it gets no answer. Iâm not sure if the Nilan would actively reject requests with âbadâ combinations. many devices just donât answer.
This one -
Well⌠First of all⌠Which devices is it you´r having? I believe its a Nilan. It is a Nilan CTS602 interface, right? If it is, there should be no issue with the heating/cooling, as these are using different registers than the one I use in my Device (Nilan Comfort 300). You´ll have to add these registers, if you want to monitor/control those as well.
Sometimes it´s needed to restart openhab to sort out these things, (specially with modbus). Perhaps even clearing cache and tmp as well. That could be worth a try. Start by restarting openhab.
I can not recommend restarting the binding. That use to make things alot worse cause the serial binding gets screewed up totally. Thats why its better to just restart openhab.
Make sure your modbus poller and data is online in PaperUI, and ofcouse the Serial Slave.
Thanks Rossko. Everything with modbus fails, but other things work, for example my phone is connected and responds.
I wonder, could it be that the +/- wires are reversely connected on the USB-stick? Pretty sure that it is correct, but that nothing works could indicate this�
At the risk of adding something else to the mix, it is almost always easier to investigate and test basic connectivity outside of openHAB using a dedicated tool like modbus.py. Once youâve figured baud rates and wire crossing out etc. you can know youâd that part of OH config right.
Iâm using the USB-stick Kim suggested in the first post. I wonder if you or Kim could confirm that your settings matches mine under Things > Modbus Serial Slave
I use a .things file for the USB stickâŚ
This is how the connection looks:
Bridge modbus:serial:myNilan [ port="/dev/ttyUSB0", id=30, baud=19200, stopBits="1.0", parity="even", dataBits=8, encoding="rtu" ]
It seems to be the same settings.
EDIT - Did you set the dip switches on the USB stick the same as my picture from post 1?
Yes, exactly the same. Just tried to unplug and reinsert the USB-key, and for a while most of the many âModbus dataâ instances under Configuration > Things changed from âOffline - communication-errorâ to âonlineâ. But shortly after back to âOffline - communication-errorâ.
The only instances online now are three âModbus Serial Slavesâ, one has a serial of âmyNilanâ and the others â1457a8d7â and âb0a4e06fâ. myNilan has correct settings 19200 and id 30 whereas the two others have 9600 baud and id 1. They all have a green online indicator.