Errors when activating 'mail action'

I’ve configured my whole OpenHAB-configuration using configuration-files. I’d like to send e-mail on certain events, so I’m trying to install the mail-action.

In the adding.cfg file I’ve put the next line:

action = mail

When I look in the logging, direct after saving adding.cfg, I see a lot of errors passing by.
Most of the errors seems to be related to Modbus… I use a lot of this in my configuration, but I don’t see any relation between mail and Modbus.

Does anybody have an idea what can cause this?

This is a part of the logging direct after activating the mail-action:

==> /var/log/openhab2/openhab.log <==
2020-12-15 18:15:34.846 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: connect timed out. Connection TCPMasterConnection@93d407[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]
2020-12-15 18:15:34.847 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: connect timed out. Connection TCPMasterConnection@93d407[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]
2020-12-15 18:15:34.848 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection TCPMasterConnection@93d407[socket=Socket[unconnected]] for endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]: connect timed out
2020-12-15 18:15:34.850 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502] – aborting request ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3] [operation ID 7706de81-1760-4e0c-b607-b911a3110891]
==> /var/log/openhab2/events.log <==
2020-12-15 18:15:34.854 [hingStatusInfoChangedEvent] - ‘modbus:data:SolarEdge:inputRegisters3:ActualPowerProduction’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error (ModbusConnectionException) with read. Request: ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3]. Description: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]). Message: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]
2020-12-15 18:15:34.856 [hingStatusInfoChangedEvent] - ‘modbus:data:SolarEdge:inputRegisters3:ActualPowerProductionScaleFactor’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error (ModbusConnectionException) with read. Request: ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3]. Description: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]). Message: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]
2020-12-15 18:15:34.857 [hingStatusInfoChangedEvent] - ‘modbus:data:SolarEdge:inputRegisters3:LifeTimePowerProduction’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error (ModbusConnectionException) with read. Request: ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3]. Description: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]). Message: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]
2020-12-15 18:15:34.859 [hingStatusInfoChangedEvent] - ‘modbus:poller:SolarEdge:inputRegisters3’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error with read: org.openhab.io.transport.modbus.exception.ModbusConnectionException: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]
2020-12-15 18:15:34.861 [hingStatusInfoChangedEvent] - ‘modbus:data:SolarEdge:inputRegisters3:ActualPowerProductionScaleFactor’ changed from OFFLINE (COMMUNICATION_ERROR): Error (ModbusConnectionException) with read. Request: ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3]. Description: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]). Message: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502] to ONLINE
2020-12-15 18:15:34.862 [hingStatusInfoChangedEvent] - ‘modbus:data:SolarEdge:inputRegisters3:ActualPowerProduction’ changed from OFFLINE (COMMUNICATION_ERROR): Error (ModbusConnectionException) with read. Request: ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3]. Description: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]). Message: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502] to ONLINE
2020-12-15 18:15:34.863 [hingStatusInfoChangedEvent] - ‘modbus:data:SolarEdge:inputRegisters3:LifeTimePowerProduction’ changed from OFFLINE (COMMUNICATION_ERROR): Error (ModbusConnectionException) with read. Request: ModbusPollerThingHandler.ModbusPollerReadRequest@189ea60[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=40069,length=40,maxTries=3]. Description: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502]). Message: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502] to ONLINE
2020-12-15 18:15:34.894 [vent.ItemStateChangedEvent] - AL_GF_MovementDetection changed from CLOSED to OPEN
2020-12-15 18:15:34.899 [ome.event.ItemCommandEvent] - Item ‘AL_GF_MovementDetection_DateTime’ received command 2020-12-15T18:15:34.892+0100
2020-12-15 18:15:34.906 [vent.ItemStateChangedEvent] - AL_GF_MovementDetection_DateTime changed from 2020-12-15T18:15:30.096+0100 to 2020-12-15T18:15:34.892+0100
2020-12-15 18:15:35.974 [vent.ItemStateChangedEvent] - SY_Sensor_CPUTemp changed from 56.0 to 58.4
2020-12-15 18:15:35.976 [vent.ItemStateChangedEvent] - SY_Memory_Available changed from 1334 to 1335
2020-12-15 18:15:35.977 [vent.ItemStateChangedEvent] - SY_Memory_Used changed from 655 to 654
2020-12-15 18:15:37.790 [vent.ItemStateChangedEvent] - AL_GF_MovementDetection changed from OPEN to CLOSED
2020-12-15 18:15:38.980 [vent.ItemStateChangedEvent] - SY_Memory_Used_Percent changed from 32.9 to 33.0
2020-12-15 18:15:38.982 [vent.ItemStateChangedEvent] - SY_Memory_Available_Percent changed from 67.1 to 67.0
2020-12-15 18:15:38.993 [vent.ItemStateChangedEvent] - SY_Sensor_CPUTemp changed from 58.4 to 59.4
2020-12-15 18:15:38.994 [vent.ItemStateChangedEvent] - SY_Memory_Available changed from 1335 to 1334
2020-12-15 18:15:38.996 [vent.ItemStateChangedEvent] - SY_Memory_Used changed from 654 to 655
2020-12-15 18:15:41.268 [vent.ItemStateChangedEvent] - AL_GF_MovementDetection changed from CLOSED to OPEN
2020-12-15 18:15:41.276 [ome.event.ItemCommandEvent] - Item ‘AL_GF_MovementDetection_DateTime’ received command 2020-12-15T18:15:41.273+0100
2020-12-15 18:15:41.282 [vent.ItemStateChangedEvent] - AL_GF_MovementDetection_DateTime changed from 2020-12-15T18:15:34.892+0100 to 2020-12-15T18:15:41.273+0100
2020-12-15 18:15:42.000 [vent.ItemStateChangedEvent] - SY_Memory_Used_Percent changed from 33.0 to 33.5
2020-12-15 18:15:42.001 [vent.ItemStateChangedEvent] - SY_Memory_Available_Percent changed from 67.0 to 66.5
2020-12-15 18:15:42.015 [vent.ItemStateChangedEvent] - SY_Sensor_CPUTemp changed from 59.4 to 58.4
2020-12-15 18:15:42.016 [vent.ItemStateChangedEvent] - SY_Memory_Available changed from 1334 to 1322
2020-12-15 18:15:42.017 [vent.ItemStateChangedEvent] - SY_Memory_Used changed from 655 to 667
==> /var/log/openhab2/openhab.log <==
2020-12-15 18:15:43.717 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-action-mail’: Unable to resolve org.openhab.binding.modbus.sunspec/2.5.9: missing requirement [org.openhab.binding.modbus.sunspec/2.5.9] osgi.wiring.package; filter:="(osgi.wiring.package=org.openhab.binding.modbus.discovery)"
==> /var/log/openhab2/events.log <==
2020-12-15 18:15:43.846 [me.event.ThingUpdatedEvent] - Thing ‘yamahareceiver:zone:ReceiverGroundFloor:Television’ has been updated.
2020-12-15 18:15:43.971 [me.event.ThingUpdatedEvent] - Thing ‘yamahareceiver:zone:ReceiverGroundFloor:Dinnertable’ has been updated.
2020-12-15 18:15:44.553 [vent.ItemStateChangedEvent] - AL_GF_MovementDetection changed from OPEN to CLOSED
2020-12-15 18:15:45.029 [hingStatusInfoChangedEvent] - ‘modbus:poller:SolarEdge:inputRegisters3’ changed from OFFLINE (COMMUNICATION_ERROR): Error with read: org.openhab.io.transport.modbus.exception.ModbusConnectionException: Error connecting to endpoint ModbusTCPSlaveEndpoint@e1b8d3[address=192.168.1.41,port=502] to ONLINE

see Error While Installing Add-Ons

Maybe a stupid question, excuse me for that, but where can I find the ‘Modbus 2.5.10 binding’?

Either upgrade to the latest OH 2.5.X ( which currenlty is 2.5.11 ) version or go to https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.modbus/ and go to the related subdirectory.

Thank you very much @Wolfgang_S. You where right, it solved the load of errors. But unfortunately
it didn’t solve my whole problem.

I still get an error that it ‘failed to install’ every minute:

2020-12-19 07:52:13.079 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-action-mail’
2020-12-19 07:53:12.684 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-action-mail’
2020-12-19 07:54:11.864 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-action-mail’

I’m quite inexperienced in solving this kind of problems, does anybody have an idea to point me in the right direction?

I would suggest that you use the mail binding which is a V2 binding instead of openhab-action-mail which is a V1 binding.
Usage is bit different ( but documented )

I did have some small issues, but finally I succeeded…

Thanks you very much for your help @Wolfgang_S

1 Like