Hi community,
I recently switched with OH 3 running on RPi 3B+ to OH4 running on RPi 5.
Fresh RPi install with backup restored using OH backup features.
Now I wanted to use again the Smartmeter Binding together with the “Hichi TTL - IR Lesekopf” directly connected to the UART GPIO15 (Pin 10).
This has worked on the OH3 instance perfectly with enabling the UART by removing the console command from serial0 (console=serial0,115000) from
/boot/cmdline.txt
console=tty1 root=xxxx rootfstype=ext4 fsck.repair=yes rootwait
and adding “dtoverlay=disable-bt” to
/boot/config.txt
[all]
gpu_mem=16
dtoverlay=disable-bt
After rebooting SML reading was available via /dev/serial0:
openhabian@openhabian:~ $ ls -l /dev/serial0 /dev/ttyAMA0
lrwxrwxrwx 1 root root 7 Jul 15 00:55 /dev/serial0 -> ttyAMA0
crw-rw---- 1 root dialout 204, 64 Jul 15 00:55 /dev/ttyAMA0
Now for the Raspberry Pi5, I understood I would only have to enable the UART on the GPIO headers 14 and 15 via the OpenHABian menu 35 (activating option 1) which adds to config.txt the following to be able to access the serial interface via /dev/ttyAMA0
/boot/firmware/config.txt
[all]
enable_uart=1
But this didn’t help (checked with minicom - no readings available).
At least adding
dtparam=uart0
helped getting any input with minicom on /dev/ttyAMA0
But still, OH4 does not see any input and keeps presenting the following log messages:
2024-12-31 02:11:48.892 [DEBUG] [martmeter.internal.SmartMeterHandler] - Initializing Smartmeter handler.
2024-12-31 02:11:48.893 [DEBUG] [martmeter.internal.SmartMeterHandler] - config port = /dev/ttyAMA0
2024-12-31 02:11:48.893 [DEBUG] [artmeter.internal.sml.SmlMeterReader] - Created SmlDevice instance smartmeter:meter:b5d1929b82 with serial connector on port /dev/ttyAMA0
2024-12-31 02:11:48.894 [DEBUG] [ding.smartmeter.internal.MeterDevice] - Opening connection to smartmeter:meter:b5d1929b82
2024-12-31 02:11:48.170 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:b5d1929b82' changed from OFFLINE (COMMUNICATION_ERROR): The source did not signal an event for 35000 milliseconds and has been terminated. to UNINITIALIZED
2024-12-31 02:11:48.208 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:b5d1929b82' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2024-12-31 02:11:48.889 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:b5d1929b82' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-12-31 02:11:48.895 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:b5d1929b82' changed from INITIALIZING to UNKNOWN (HANDLER_CONFIGURATION_PENDING): Waiting for messages from device
2024-12-31 02:12:23.901 [DEBUG] [ding.smartmeter.internal.MeterDevice] - Timeout occured for smartmeter:meter:b5d1929b82; The source did not signal an event for 35000 milliseconds and has been terminated.
2024-12-31 02:12:23.907 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'smartmeter:meter:b5d1929b82' changed from UNKNOWN (HANDLER_CONFIGURATION_PENDING): Waiting for messages from device to OFFLINE (COMMUNICATION_ERROR): The source did not signal an event for 35000 milliseconds and has been terminated.
2024-12-31 02:12:25.907 [DEBUG] [ding.smartmeter.internal.MeterDevice] - Opening connection to smartmeter:meter:b5d1929b82
I also added this line in /etc/default/openhab
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
And yes, I check also with an oscilloscope if the signal is available on GPIO15.
Somehow it seems that the serial interface is receiving the SML content from the meter, but OH does not receive it…
Any hints are appreciated.
Thanks!
Jonathan