[SOLVED] Modbus serial slave (poller) issue with Symlinks (probably)

That is really bad… In fact, I´m not sure this is a modbus binding issue alone. I think there are different issues here…

I just tried uninstall the modbus binding. I noticed something weird going on, like the cloud connection disconnected, netamo disconnected, Zwave disconnected. All came online again. And this happened when I uninstalled the modbus binding only.
When I reinstalled the modbus binding, the same thing happened. And again all came online again incl modbus. After aprox 30 seconds, the modbus binding gave the same connection error again :rage:

I forgot to mention. I use modbus for serial as well as TCP. The TCP connection is working just fine. So it´s only the serial connection which is a problems.

Here is some news… I Finally got it working, (at least for now).

I suddenly remembered there is a serial setting with-in the openhabian-config utility. At menu #30 (35) The first two was enabled. I enabled the last one as well (meaning all three options was ticked!). Rebooted, and BAM! Modbus serial connection to my Nilan Ventilation came online just fine.

openhab serial console

Please notice - I have not done any changes to this setting for aprox a coupple of years. Infact I´m not even sure I have made any changes in here at all beside when I first installed the Elelabs Zigbee Shield a coupple of years ago, (This device I havn´t used for at least the last 6 months). So this was the exact same setting before I did the update to Openhab 2.5Release. I have no idea if updating to openhab 2.5Release has made any changes to this, I think not.
This means, something has changed about the serial ports from Openhab 2.5M2 to openhab 2.5Release. And this is a real pain in the a** to try solve this.

Status:
Right now the modbus is connected through serial ttyUSB0 to my Nilan ventilation… Which mean, symlinks is not in use either, and probably aint working at all (again). All other devices which uses serial seems to work as well. I´ll let this run for the rest of the day, then I´ll get on with adding the RTL-SDR USB dongle…I do fear, this isn´t the last serial trouble I´ll be facing…
I really hate Linux and this serial nightmare every time!! :rage:

Did you reboot after reinstalling the modbus binding?I forget to mention that i also needed to reboot.
I will check the openhabian config utility to see what te total reinstall of openhab did to those config.(After work)
I know i added the common serial ports to openhab JVM before reinstalling and that did not work.

Note that you will find comments in other threads that openhabian interferes with manual settings of EXTRA_JAVA_OPTS

Extensive resetting of ther stuff sounds a like a manifestation of a problem a few are complaining of - some kind of “system started” response to a Thing changing status.

I didnt reboot after reinstalling modbus today. But yesterday I tried a zillion times. I know changing something to a thing file like the modbus, sometimes require to make a reboot (for god know what reason). Otherweise I can pull some tricks on you.

I guess you mean, when upgrading openhab it will reset the file in /etc/default/openhab2 (reload a new openhab2 file)? I am aware of that issue, which is why I keep a copy of my settings :smiley:

I´m not sure what you mean here?

I believe @rossko57 mentioned something similar earlier.

As maintainer of the binding I would appreciate clearly reproducible description of this problem to look into it further.

If I could reproduce this clearly, I would have tagged you long time ago :slight_smile:
Unfortunatly I cant, cause the issue seems to be concentrated around the serial driver (or whatever it´s called). And it seems to affect several bindings whenever something is going wrong, or if there is an inappropiate setting (like the above screenshot) somewhere. This is like trying to find the needle in a haystack. I change something somewhere in a hope to get one issue fixed, and I see an inappropiate effect elsewhere (another issue elsewhere). It is VERY hard to get something clearly from this.

Remind you - I didnt change anything, except updating openhab from 2.5M2 to 2.5Release. The fixed as showen above by getting into openhabian-config to change the serial setting should either have been a simular problem in 2.5M2 or shouldn´t have become a problem in 2.5Release. But “something” ticked this issue from 2.5M2 to 2.5Release.

I have no idea how to post this more clearly… I wish I could, but I wont spend your time searching for the same needle, which probably is hidden among several things at the same time, (openhab core, serial driver, bindings etc)… I do however wish, we could get rid of these serial issues once and for all. Unfortunatly I think, it´s a OS (Linux) issue or difficulty which is causing this. It´s not a openhab only issue… There are tons of post around the net regarding the issues by the use of USB ports on linux in an enviroment like opehab/HA/Domotizs etc…

1 Like

I have checked the configuration of the openhabian configuration utility and none of the 3 have been clicked. Until now everything is still running properly what the problem was is not clear yet.

──────────────────────────┤ Prepare Serial Port ├───────────────────────────┐                                 
                                │ Proceeding with this routine, the serial console normally provided by a    │                                 
                                │ Raspberry Pi can be disabled for the sake of a usable serial port. The     │                                 
                                │ provided port can henceforth be used by devices like Razberry, UZB or      │                                 
                                │ Busware SCC.                                                               │                                 
                                │ On a Raspberry Pi 3 the Bluetooth module can additionally be disabled,     │                                 
                                │ ensuring the operation of a Razberry (mutually exclusive).                 │                                 
                                │ Finally, all common serial ports can be made accessible to the openHAB     │                                 
                                │ java virtual machine.                                                      │                                 
                                │                                                                            │                                 
                                │ Please make your choice:                                                   │                                 
                                │                                                                            │                                 
                                │    [ ] 1  (RPi) Disable serial console           (Razberry, SCC, Enocean)  │                                 
                                │    [ ] 2  (RPi3) Disable Bluetooth module        (Razberry)                │                                 
                                │    [ ] 3  Add common serial ports to openHAB JVM (Razberry, Enocean)       │                                 
                                │                                                                            │                                 
                                │                                                                            │                                 
                                │                    <Ok>                        <Cancel>                    │                                 
                                │                                                                            │                                 
                                └────────────────────────────────────────────────────────────────────────────┘                                 
                                                                                            
#########################
## JAVA OPTIONS
## Additional options for the JAVA_OPTS environment variable.
## These will be appended to the execution of the openHAB Java runtime in front of all other options.
## 
## A couple of independent examples:
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0"

EXTRA_JAVA_OPTS=""
#########################

[17:36:59] openhabian@openhabian-server:~$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    1.419194] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    1.440287] 00:02: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    6.516245] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0
[    6.518671] usb 1-6: FTDI USB Serial Device converter now attached to ttyUSB1

It´s very strange… this is how tty looks from my system:


[17:39:51] openhabian@openHABianPi:~$ dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=6d149c5a-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000913] console [tty1] enabled
[    0.898473] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    0.905301] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 53, base_baud = 50000000) is a 16550
[    9.791487] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[    9.830583] usb 1-1.1.3.4: FTDI USB Serial Device converter now attached to ttyUSB0
[    9.877404] usb 1-1.1.3.3: cp210x converter now attached to ttyUSB1
[17:39:57] openhabian@openHABianPi:~$

I have just dropped out of Modbus again. I don’t see anything special in the logs.
It worked well for a couple of day’s
It just happens for no reason if I restart openhab everything is going well again?
Next time i take TRACE loggings of the modbus binding.

2020-01-04 17:31:42.811 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di15 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.809 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di17 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.815 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di18 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.816 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di19 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.818 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di20 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.820 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di21 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.821 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di22 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.823 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di23 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.825 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di24 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.826 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di25 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.828 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di26 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.830 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di27 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.831 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di28 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.833 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di29 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.835 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di30 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.836 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave11:slave11Inputs:di31 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1fe2663[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.845 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:42.846 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@8a112f[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:42.846 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@8a112f[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:42.846 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@8a112f[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:42.846 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1432fe0[slaveId=100,functionCode=READ_MULTIPLE_REGISTERS,start=32106,length=2,maxTries=3] [operation ID edc211b9-cb1b-483b-ab5b-2b16cfde2aab]
2020-01-04 17:31:42.847 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave106holding:E_total 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:42.978 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:42.980 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@24a53a[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:42.982 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@24a53a[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:42.984 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@24a53a[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:42.985 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@14da49f[slaveId=100,functionCode=READ_MULTIPLE_REGISTERS,start=32114,length=2,maxTries=3] [operation ID ee897486-67b1-4a29-bfd7-fa0a42995bf8]
2020-01-04 17:31:42.987 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave107holding:E_day 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.075 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:43.076 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@1031b05[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.077 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@1031b05[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.077 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@1031b05[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:43.078 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1cbc010[slaveId=12,functionCode=READ_INPUT_DISCRETES,start=0,length=16,maxTries=3] [operation ID d5b11912-695e-4ba9-a6f0-6b57e97b219c]
2020-01-04 17:31:43.078 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di32 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.079 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di33 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.081 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di34 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.081 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di35 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.083 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di36 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.083 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di37 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.084 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di38 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.084 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di39 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.085 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di40 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.085 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di41 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.086 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di42 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.086 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di43 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.087 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di44 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.087 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di45 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.088 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di46 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.088 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave12:slave12Inputs:di47 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1f44cf6[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.386 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:43.387 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@45288d[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.387 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@45288d[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.388 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@45288d[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:43.388 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@194f239[slaveId=100,functionCode=READ_MULTIPLE_REGISTERS,start=32016,length=8,maxTries=3] [operation ID 1e7c2cca-f096-43b1-aad7-9bb56a7d0bd1]
2020-01-04 17:31:43.389 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave104holding:Pv_1_Voltage 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.390 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave104holding:Pv_1_Current 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.391 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave104holding:Pv_2_Voltage 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.392 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave104holding:Pv_2_Current 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.395 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:43.396 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@570769[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.396 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@570769[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.396 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@570769[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:43.396 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c61b81[slaveId=100,functionCode=READ_MULTIPLE_REGISTERS,start=32064,length=31,maxTries=3] [operation ID 265d72f0-c078-4911-a5d0-e4589e73828e]
2020-01-04 17:31:43.396 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave105holding:Active_peak_of_current_day 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.397 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave105holding:Active_power 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.397 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave105holding:Inverter_efficiency 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.398 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave105holding:Cabinet_temperature 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.398 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave105holding:Device_status 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.398 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave105holding:Fault_code 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.686 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:43.687 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@70c2a7[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.688 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@70c2a7[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.688 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@70c2a7[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:43.689 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1a8af4[slaveId=100,functionCode=READ_MULTIPLE_REGISTERS,start=32002,length=1,maxTries=3] [operation ID 809e4f67-3c02-4b22-8733-a897caeb3403]
2020-01-04 17:31:43.690 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave102aholding:Operating_statusbit0 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.691 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave102aholding:Operating_statusbit1 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.692 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave100:slave102aholding:Operating_statusbit2 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@1d91c44[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.814 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null
2020-01-04 17:31:43.817 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@119d00c[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.818 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@119d00c[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0]
2020-01-04 17:31:43.821 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@119d00c[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0]: Could not get port identifier, maybe insufficient permissions. null
2020-01-04 17:31:43.822 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@79cfbc[slaveId=10,functionCode=READ_INPUT_DISCRETES,start=0,length=16,maxTries=3] [operation ID 0cc41dc0-10a9-447a-95b0-9e544321e18c]
2020-01-04 17:31:43.824 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di00 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.827 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di01 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.829 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di02 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.830 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di03 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.832 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di04 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.833 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di05 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.835 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di06 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.837 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di07 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.838 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:slave10:slave10Inputs:di08 'Modbus Data' had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusSerialSlaveEndpoint@7b0084[portName=/dev/ttyUSB0])
2020-01-04 17:31:43.839 [ERROR] [et.wimpi.modbus.net.SerialConnection] - Could not get port identifier, maybe insufficient permissions. gnu.io.NoSuchPortException: null

Tracing on the Modbus binding will tell you nothing more than that.

You might get something more helpful out of serial transport, but I’m not convinced about that either.

You’re not configured for using symlinks either. Maybe you should start a new thread.

1 Like

If it happens out of nowhere, symlinks probably wont do any changes, cause symlinks are only “read” on startup. When things are running, it shouldn´t happen, cause his serial interface is already locked to the USB0.
But if it happens because OH restart/OS reboot without him noticing, then this could be due to missing symlinks.

Personally I would try with symlinks anyway if I had this issue…

I am sure that openhab was not restarted because I was able to see the moment when it happened in the logs.And nothing special happened.But to be sure I will make symlinks.

You should, just to leave out this possibility…
But I´m also wondering if your situation could be cause of bad connection somewhere… Which FTDI are you using?

I started i new tread about this problem Modbus binding loses its serial connection every few days without a reason after updating to 2.5.0 Release Build
I use this type https://www.acculaders.nl/rs485-naar-usb-interface-kabel-1-8m.html#product-tabs

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev=06.00
S:  Manufacturer=FTDI
S:  Product=FT232R USB UART
S:  SerialNumber=AK061I02
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio

Maybe it’s time to go to the Home Assistant, however Home Assistant supports full Modbus development, openHAB is only for advanced users and is not designed for general users, I’ve been migrating for more than a year to use the Home Assistant for all modbus PLCs that I use for electrical control in my home . However, I prefer something that has backups (the PLC can use I / O so it can be used with a common switch, whereas the wifi will shut down in case of network problems).
I hoped openHAB would appreciate common users, but it seemed to get more and more complicated after I migrated.

My complaint:

  1. The Wiki documentation only creates a sample modbus TCP without a sample for the modbus RTU.
  2. Modbus configuration is too complicated.

Modbus is complicated. Good luck.

If you use the Home Assistant, it is very easy to configure modbus.
So it is quite easy to integrate with multiple PLCs with 1 USB RS232 and several PLCs with different addresses.

I’m not sure what you want to happen.
You specifically joined the forum just to append to someone else’s post and say you were going to use some other product, that’s fine.
Even as someone who sets up PLCs, you found setting up the Modbus binding too difficult, but never asked for help. That’s fine too.
Good luck with your new project.