2021-02-15 20:00:35.062 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@564b9c70[portName=/dev/ttySDM,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@51f75751[portName=/dev/ttySDM]
2021-02-15 20:00:35.065 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@564b9c70[portName=/dev/ttySDM,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@51f75751[portName=/dev/ttySDM]
2021-02-15 20:00:35.067 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@564b9c70[portName=/dev/ttySDM,port=<null>] for endpoint ModbusSerialSlaveEndpoint@51f75751[portName=/dev/ttySDM]: Could not get port identifier, maybe insufficient permissions. null
2021-02-15 20:00:35.070 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@51f75751[portName=/dev/ttySDM] -- aborting request ModbusReadRequestBlueprint@55c8d9b7[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=30001,length=61,maxTries=3] [operation ID 8eff22ef-57fd-41f0-8284-3a7adb3e7448]
Using the Domotics sdm120 application I am able the read al the values correctly, so I know I have the correct settings.
I even tried a simple Modbus poller thing to see what happens, but same error.
I’m running the latest Openhabian image on a RPi3.
Thanks! I tried the EXTRA_JAVA_OPTS, it didn’t make a difference.
I did said the names to static in the /etc/udev/rules.d/99-com.rules file.
I also have an other serial device to read out my smart meter with the DSMR binding, and
that work just fine, so I know my serial devices are coming thru in openHAB
OK though the error message does tell openhab doesn’t have the right permissions.
Checked my notes, and I followed the link below. It also contains some additional steps. Take special note to use OpenHAB (with or w/o the 2)
Hi, (without intention to hijack the topic) I am also looking into getting several Eastron meters. Which hardware would you recommend to be used to connect those meters on raspberry Pi4? Also has anybody tried daisy chain more than one slave? According Modbus protocol this should be possible
I have a lot of them, currently 2 in use. rest yet to connect. The 2 so far work just fine daisy-chained.
I have a cheap modbus RTU to USB adapter from eBay, with G-A-B connector.
Using the Domotics SDM120C application (linked in post above) you can communicate with them.
At the moment I use it in combination with the exec binding to get the values into openHAB. Not my preferred method, but it works
Since OH3 I only use the UI, except this SDM120. You could try to use my .things file, change your parameters accordingly. But don’t expect this solves the error.
Bridge modbus:serial:endpointSDM120 [port="/dev/ttyUSBMODBUS",baud=9600,id=1,dataBits=8,parity="none",stopBits="1.0",encoding="rtu"] {
Bridge poller inputRegisters [ start=0, length=80, refresh=600, type="input" ] {
Thing data Voltage "Voltage" @ "Mains" [ readStart="0", readValueType="float32" ]
Thing data Current "Current" @ "Mains" [ readStart="6", readValueType="float32" ]
Thing data ActivePower "Active Power" @ "Mains" [ readStart="12", readValueType="float32" ]
Thing data ApparentPower "Apparent Power" @ "Mains" [ readStart="18", readValueType="float32" ]
Thing data ReactivePower "Reactive Power" @ "Mains" [ readStart="24", readValueType="float32" ]
Thing data PowerFactor "Power Factor" @ "Mains" [ readStart="30", readValueType="float32" ]
Thing data PhaseAngle "Phase Angle" @ "Mains" [ readStart="36", readValueType="float32" ]
Thing data Frequency "Frequency" @ "Mains" [ readStart="70", readValueType="float32" ]
Thing data ImportActiveEnergy "Import Active Energy" @ "Mains" [ readStart="72", readValueType="float32" ]
Thing data ExportActiveEnergy "Export Active Energy" @ "Mains" [ readStart="74", readValueType="float32" ]
Thing data ImportReactiveEnergy "Import Reactive Energy" @ "Mains" [ readStart="76", readValueType="float32" ]
Thing data ExportReactiveEnergy "Export Reactive Energy" @ "Mains" [ readStart="78", readValueType="float32" ]
}}
I’ll give that a try! it’s a lot nicer to have things then scripts executing those kind of things.
Unfortunately none of my serial ports work anymore, even the DSMR binding which previously worked without any problems.
and the domoticz application can read any values anymore…
Even your config gives the same error as before. Could it be a bug?
Anyway, I’ll leave at that.
Due to the amount of units I want to read (16 of them), it needs a separate script to make sure none of the items try to read at the same time.
Something which I already encountered with 2 after a reboot.
16 need management to read 1 after the other, and so far I haven’t found anything like that in openHAB.
thanks for the help tho.
Modbus is "one at a time"over the bus, each query must get a response or fail before the next query can be sent. That’s part of the protocol definition.
In openHAB, you don’t worry about any of that at all, the binding manages traffic queues for the bus.
I check all things I could find online, tried all solutions to other serial problems I could find on the forums.
But none of them worked. As no other mention of the kind of problem I’m having
As far as I can tell, the only difference is the serial attribute, which makes sense of course.
FTDI chip has same manufacturer code and name and everything.