Reading smartmeter Logarex LK13BE803039 via RS485 interface #23379
Unanswered
SuGe3
asked this question in
scripter / SML
Replies: 1 comment 16 replies
-
this is a very unusual meter format. probably other option |
Beta Was this translation helpful? Give feedback.
16 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
need help to read Logarex via RS485 and Tasmota SmartMeter scripting.
reading the Logarex LK13BE803039 with a bitShake SmartMeterReader-UART (IR) and script:
worked perfectly for 1.5 years, but gradually, incorrect data was transmitted more and more frequently, and then no data was transmitted at all. Obviously, the IR diodes of the Logarex are broken.
Since the network operator refused to replace the smart meter, I now want to read the smart meter via the RS485 interface. But I'm having trouble creating the script, Hardware seems to be working fine.
Hardware:
AZ-Delivery ESP32-WROOM-32 flashed with Tasmota32 (vers. 14.6.0) and user_config_override.h:
RS485 to TTL converter, like the one from the Tasmota Modbus Bridge documentation
Logarex type LK13BE803039 with RS485 cable installed by an electronics technician.
Wiring:
ESP32--->RS485 / RS485 ---> Logarex
TXD ---> TXD / A ---> RS485A
RXD ---> RXD / B ---> RS485B
5.5v ---> VCC
GND ---> GND
So far, so good, but... I'm struggling to create the correct script.
I've tried many combination but haven't received any correct decoded values yet.
1.) First, I tried using the same script with adjusted GPIOs as before:
+1,3,o,0,9600,LOGAREX,1,300,2F3F210D0A,063035310D0A
Result:
The TXD LED flashes, but the RXD remains off, no response from the Logarex.
Afterwards, I tried to send the request in F section with sml() command, logic similar as described for Landis + Gyr ZMR120AReS2R2sfCS (OBIS), but without baud-switch and use in M section just
+1,3,o,0,9600,LOGAREX
or+1,3,o,1,9600,LOGAREX
, or+1,3,o,0,9600,LOGAREX,1
, or+1,3,o,1,9600,LOGAREX,1
in any try got the same Result as before. Only TXD LED flashes, no incoming message.
2.) I tried SML instead of OBIS:
+1,3,s,0,9600,LOGAREX,1,300,2F3F210D0A,063035310D0A
Logarex responds, i.e., the TXD and RXD flash alternately. But in the console, using debug mode, I got nothing else as “Checking connection”
3.) I tried MODBUS:
+1,3,m,0,9600,LOGAREX,1,300,2F3F210D0A,063035310D0A
Logarex responds, i.e., the TXD and RXD flash alternately. In the console, with sensor53 d1, I got beside the timestamps the hex values for sending and receiving. I translated the HEX values to ASCII strings via an online tool, and got the following values, only these two respond lines nothing else:
(sent)>/?!
ߥ/LOG5LK13BE803039
(sent)> 051
+, P0 (6027) c
4.) Attempt to send "063035300D0A" (050) instead of "063035310D0A" (051):
+1,3,m,0,9600,LOGAREX,1,300,2F3F210D0A,063035300D0A
Logarex responds, both LEDs flashes, result in the console: Logarex sends all values as HEX-formatted strings, means if I convert the HEX values via the online tool, I got strings like:
The values within the brackets match those on the LOGAREX display.
5.) Best result I got with RAW request:

+1,3,r,0,9600,LOGAREX,1,300,2F3F210D0A,063035300D0A
Logarex even responds, both LEDs flashes, result in the console is identical to MODBUS, but the send strings are not displayed.
Here the console output and its conversion via online tool HEX to ASCII (same result as for MODBUS)
I have now tried x combination to decode the values using the Tasmota script, I tried MODBUS as well as RAW, but without success. Every try gives me other values, but never the correct ones.
For example:
Tried to get the Watt value 374 of String
1-0:16.7.0*255(000374*W)
,which should also be a negative value -64 like
1-0:16.7.0*255(-000064*W)
:1,pm(r312d303a31362e372e302a323535)xxuuuuuuuuuuuuxxxxxx@1,current,W,current,0
1,pm(h312d303a31362e372e302a323535)xxuuuuuuuuuuuuxxxxxx@1,current,W,current,0
1,312d303a31362e372e302a323535xxuuuuuuuuuuuuxxxxxx@1,current,W,current,0
1,312d303a31362e372e302a323535xxssssssssssssxxxxxx@1,current,W,current,0
1,312d303a31362e372e302a323535@#,current,W,current,0
1,312d303a31362e372e302a32353528@1,current,W,current,0
1,1-0:16.7.0*255(@1,Verbrauch aktuell,W,LG_current,0
<= output just 0, does not work at all…
And hundreds other combination with UUuu, uuUU, ssSS, ... but got never the current values within the brackets.
Furthermore, I tried some special commands but also without success.
Maybe I'm wrong, but it seems that the Logarex send an OBIS code, but only respond if he received a MODBUS or RAW request. And it seems that the MODBUS and RAW decoder can't handle the OBIS-ASCII string.
I'm going crazy, the hardware and the serial request works as expected and the Logarex sends everything I expect, too. But I can't transfer the values to MQTT in the decoded, usual JSON format.
Is there a switch or command to say, just take the string? Or better a part of a string? I don't found a suitable command. Maybe a special command converting incoming serial messages to ASCII-string before sending to the decoder? Or something to change the format that needs to be used to decode the incoming message? Means send m or r and decode o.
Does anybody have an idea how do I get the received HEX-ASCII-string decoded?
Or is there a way to send the compete RAW-HEX to MQTT? Then I can code a converter myself, outside of Tasmota.
I also tried a Berry script but that’s another story, with other problems and even without success. :(
I would be very grateful for support or an idea how to...
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions