I’m thinking of using Openhab to read a smartmeter over the serial interface (SML). Reading the forum there are several users reporting issues, with not stable serial connections (SML/Modbus/Z-Wave).
I have found this bug report from 2020, which I think describes the issue.
But users seem to still have issues in OH4:
The only solution seems to be using the alternative PureJavaComm. But why isn’t this implemented by default in OH4?
As due to the issues users are switchting to Volkszaehler/Tasmota and then read the energy readings over MQTT into Openhab, maybe this is the better way. What do you think?
In addition this might also reduce the load for Openhab reading the values all 1-3s and avoid additional wear out of the SD card?
if I had known the problems I would struggle with reading two serial ports parallel in java, I wouldn’t have bought these two usb serial port readers (without “tasmota mqtt extension”).
But I was stupid and the few euros more would have been paid for a long time.
I don’t know if it is really fixed, as users are still having issues:
My smartmeter is pushing every 1-2s over the optical interface. I’m not able to change the push time. The question is how to get the data into Openhab. I’m still not sure if an USB-to-serial adapter is a good idea. But what are the alternatives.
There are TTL/RS485-to-Ethernet adapters, but as far as I know the smartmeter binding is not supporting ethernet. Does anybody have more details here, if it might work?
There was an issue where the port was blocked after some time and no communication was possible anymore. Only a restart of the whole OpenHAB instance could solve this problem.
Its is fixed.
Depending on the setup of the users (hardware which is used) they might have better luck to read data with the alternative serial provider.
You are right. I was looking for the “refresh” parameter but this might not have any effect when you do SML reading.
I don’t know. But there is something to make your USB-to-serial adapter available via ethernet. But is might alos not help you with your specific use case.
If you ask me: It might be the best to install a second meter with modbus TCP or an other IP based protocoll, before trying without guarantee of success.
But if you need the data every couple seconds e.g. for load management Wifi and MQTT is not a good idea. There are also RS485 IR readers. With a regular RS485-Ethernet Gateway which you could also use for Modbus you could get the data over Ethernet. Iobroker is supporting this but not Openhab.
Don‘t see an issue here. As already said in the other topic, I get updates about every 3 seconds. All you need is a stable WiFi connection. My router is just 2m away from my smartmeter, so no issue, but if you have a bigger distance and prefer ethernet, add a repeater in WiFi2Ethernet bridge mode.
There is a guide in this thread which is describing it, but it is in german:
They are using a Hager EHZ001K with RS485 and are connecting it to a RS485-Ethernet Gateway like USR-TCP232-306 or 410S. In the smartmeter binding you need to put in a TCP server and port. I guess it is similar what is already available in the Openhab Modbus binding.
+1 from me.
I have multiple D1Mini sensors and many of them have an intervall of down to 1 second. Works just fine, even though my D1Minis are nowhere near an accesspoint, some only have an signal strenght of -80dBm or less.
I think you’re mixing up things here. Datapoint 1.8.0 is „just a counter“ which sums up your usage. Updates can arrive at different intervals according to your power usage. Therefore the binding cannot and should not recalculate the values, as it does not know the timebase for this.
If you want to see your actual (momentary) power usage, SML protocol has a different datapoint to show this. Your smartmeter just has to deliver it.
Edit: My smartmeter reports at datapoint 1.8.0 11402.xxx kWh. So wat does this say in power usage (W). Nothing, it is just saying that I have used that amount of energy since Installation in February last year. Whereas the other datapoint show that i am actually using approximately 740W.
No, e.g. Volkszaehler is doing this. You don’t need a separate datapoint. Reason is that you get the counter value with a very high resolution like 0,xxx kWh. So you only need exact timestamps. I was also surprised, but it is working perfect in Volkszaehler.
The Hager EHZ001K is only an optical reader. What SML datapoints are available depend on the energy meter and which are activated by the power company. A lot of energy meter only provide 1.8.0 and maybe 2.8.0.