rscada / libmbus

Meter-bus library and utility programs
http://www.rscada.se/libmbus
BSD 3-Clause "New" or "Revised" License
224 stars 138 forks source link

Sharky 775 Diehl #145

Closed josvandekoffie closed 5 years ago

josvandekoffie commented 5 years ago

Hello great programmer, I use Mbus for the Sharky but somehow sometimes I have a 1500 in front of power and differential temperature number. This happens especially when the power read out is close to zero I think because the differential temperature and poweroutput have the problem at the same moments in time. In the graphs on Domoticz this shows as huge spikes. Curious if someone can solve this puzzle. Maybe the 15-- part needs to be a minus sign or so?

System: Mbus master (usb version AliXpress) Sharky 775 Raspberry Pi 3

Installation: https://github.com/rscada/libmbus/archive/master.zip

Manual of Sharky 775: https://www.wms.nl/application/files/4615/0607/4805/Sharky775_M-Bus_telegram_E.pdf

pi@raspberrypi:/usr/local/bin $ mbus-serial-request-data -d -b 2400 /dev/ttyUSB0 61 init_slaves: debug: sending init frame #1 [2019-01-30 22:20:26Z] SEND (005): 10 40 FD 3D 16 init_slaves: debug: sending init frame #2 [2019-01-30 22:20:27Z] SEND (005): 10 40 FD 3D 16 [2019-01-30 22:20:27Z] SEND (005): 10 5B 3D 98 16 [2019-01-30 22:20:28Z] RECV (110): 68 68 68 68 08 3D 72 00 38 71 41 24 23 2F 04 C2 00 00 00 0C 06 31 40 00 00 8C 10 06 00 00 00 00 8C 20 13 20 43 16 00 0C 13 72 90 33 01 0C 2B 87 11 00 F0 0B 3B 26 08 00 0A 5A 27 03 0A 5E 42 03 0A 62 15 F0 0A 27 54 26 04 6D 02 02 7F 21 4C 06 00 00 00 00 4C 13 00 00 00 00 CC 10 06 00 00 00 00 CC 20 13 00 00 00 00 42 6C 5F 25 F2 16 mbus_frame_print: Dumping M-Bus frame [type 4, 110 bytes]: 68 68 68 68 08 3D 72 00 38 71 41 24 23 2F 04 C2 00 00 00 0C 06 31 40 00 00 8C 10 06 00 00 00 00 8C 20 13 20 43 16 00 0C 13 72 90 33 01 0C 2B 87 11 00 F0 0B 3B 26 08 00 0A 5A 27 03 0A 5E 42 03 0A 62 15 F0 0A 27 54 26 04 6D 02 02 7F 21 4C 06 00 00 00 00 4C 13 00 00 00 00 CC 10 06 00 00 00 00 CC 20 13 00 00 00 00 42 6C 5F 25 F2 16 <?xml version="1.0" encoding="ISO-8859-1"?>

41713800 HYD 47 Heat: Outlet 194 00 0000 Instantaneous value 0 Energy (kWh) 4031 2019-01-30T22:20:28Z Instantaneous value 0 1 0 Energy (kWh) 0 2019-01-30T22:20:28Z Instantaneous value 0 2 0 Volume (m m^3) 164320 2019-01-30T22:20:28Z Instantaneous value 0 Volume (m m^3) 1339072 2019-01-30T22:20:28Z Instantaneous value 0 Power (W) 150001187 2019-01-30T22:20:28Z Instantaneous value 0 Volume flow (m m^3/h) 826 2019-01-30T22:20:28Z Instantaneous value 0 Flow temperature (1e-1 deg C) 327 2019-01-30T22:20:28Z Instantaneous value 0 Return temperature (1e-1 deg C) 342 2019-01-30T22:20:28Z Instantaneous value 0 Temperature Difference (1e-1 deg C) 15015 2019-01-30T22:20:28Z Instantaneous value 0 Operating time (days) 2654 2019-01-30T22:20:28Z Instantaneous value 0 Time Point (time & date) 2019-01-31T02:02:00 2019-01-30T22:20:28Z Instantaneous value 1 Energy (kWh) 0 2019-01-30T22:20:28Z Instantaneous value 1 Volume (m m^3) 0 2019-01-30T22:20:28Z Instantaneous value 1 1 0 Energy (kWh) 0 2019-01-30T22:20:28Z Instantaneous value 1 2 0 Volume (m m^3) 0 2019-01-30T22:20:28Z Instantaneous value 1 Time Point (date) 2018-05-31 2019-01-30T22:20:28Z
lategoodbye commented 5 years ago

Okay, could you please provide a hexdump of a good case telegram?

josvandekoffie commented 5 years ago

Here is one just freshly baked. If I perform the data request twice I directly get an error. See at the bottom. Don't know if this has anything to do with it though.

pi@raspberrypi:~/domoticz/scripts $ sudo /usr/local/bin/mbus-serial-request-data -d -b 2400 /dev/ttyUSB0 61 init_slaves: debug: sending init frame #1 [2019-02-20 13:09:56Z] SEND (005): 10 40 FD 3D 16 init_slaves: debug: sending init frame #2 [2019-02-20 13:09:56Z] SEND (005): 10 40 FD 3D 16 [2019-02-20 13:09:57Z] SEND (005): 10 5B 3D 98 16 [2019-02-20 13:09:57Z] RECV (110): 68 68 68 68 08 3D 72 00 38 71 41 24 23 2F 04 C2 00 00 00 0C 06 43 50 00 00 8C 10 06 00 00 00 00 8C 20 13 53 81 17 00 0C 13 54 06 65 01 0C 2B 67 00 00 00 0B 3B 13 06 00 0A 5A 14 02 0A 5E 13 02 0A 62 01 00 0A 27 75 26 04 6D 34 10 74 22 4C 06 00 00 00 00 4C 13 00 00 00 00 CC 10 06 00 00 00 00 CC 20 13 00 00 00 00 42 6C 5F 25 E9 16 mbus_frame_print: Dumping M-Bus frame [type 4, 110 bytes]: 68 68 68 68 08 3D 72 00 38 71 41 24 23 2F 04 C2 00 00 00 0C 06 43 50 00 00 8C 10 06 00 00 00 00 8C 20 13 53 81 17 00 0C 13 54 06 65 01 0C 2B 67 00 00 00 0B 3B 13 06 00 0A 5A 14 02 0A 5E 13 02 0A 62 01 00 0A 27 75 26 04 6D 34 10 74 22 4C 06 00 00 00 00 4C 13 00 00 00 00 CC 10 06 00 00 00 00 CC 20 13 00 00 00 00 42 6C 5F 25 E9 16 <?xml version="1.0" encoding="ISO-8859-1"?>

41713800 HYD 47 Heat: Outlet 194 00 0000 Instantaneous value 0 Energy (kWh) 5043 2019-02-20T13:09:57Z Instantaneous value 0 1 0 Energy (kWh) 0 2019-02-20T13:09:57Z Instantaneous value 0 2 0 Volume (m m^3) 178153 2019-02-20T13:09:57Z Instantaneous value 0 Volume (m m^3) 1650654 2019-02-20T13:09:57Z Instantaneous value 0 Power (W) 67 2019-02-20T13:09:57Z Instantaneous value 0 Volume flow (m m^3/h) 613 2019-02-20T13:09:57Z Instantaneous value 0 Flow temperature (1e-1 deg C) 214 2019-02-20T13:09:57Z Instantaneous value 0 Return temperature (1e-1 deg C) 213 2019-02-20T13:09:57Z Instantaneous value 0 Temperature Difference (1e-1 deg C) 1 2019-02-20T13:09:57Z Instantaneous value 0 Operating time (days) 2675 2019-02-20T13:09:57Z Instantaneous value 0 Time Point (time & date) 2019-02-20T16:52:00 2019-02-20T13:09:57Z Instantaneous value 1 Energy (kWh) 0 2019-02-20T13:09:57Z Instantaneous value 1 Volume (m m^3) 0 2019-02-20T13:09:57Z Instantaneous value 1 1 0 Energy (kWh) 0 2019-02-20T13:09:57Z Instantaneous value 1 2 0 Volume (m m^3) 0 2019-02-20T13:09:57Z Instantaneous value 1 Time Point (date) 2018-05-31 2019-02-20T13:09:57Z

pi@raspberrypi:~/domoticz/scripts $ sudo /usr/local/bin/mbus-serial-request-data -d -b 2400 /dev/ttyUSB0 61 init_slaves: debug: sending init frame #1 [2019-02-20 13:13:47Z] SEND (005): 10 40 FD 3D 16 init_slaves: debug: sending init frame #2 [2019-02-20 13:13:47Z] SEND (005): 10 40 FD 3D 16 [2019-02-20 13:13:47Z] SEND (005): 10 5B 3D 98 16 Failed to receive M-Bus response frame. pi@raspberrypi:~/domoticz/scripts $ sudo /usr/local/bin/mbus-serial-request-data -d -b 2400 /dev/ttyUSB0 61 init_slaves: debug: sending init frame #1 [2019-02-20 13:13:48Z] SEND (005): 10 40 FD 3D 16 init_slaves: debug: sending init frame #2 [2019-02-20 13:13:49Z] SEND (005): 10 40 FD 3D 16 [2019-02-20 13:13:49Z] SEND (005): 10 5B 3D 98 16 Failed to receive M-Bus response frame. pi@raspberrypi:~/domoticz/scripts $ sudo /usr/local/bin/mbus-serial-request-data -d -b 2400 /dev/ttyUSB0 61

lategoodbye commented 5 years ago

@josvandekoffie Could you please test branch negative-bcd?

josvandekoffie commented 5 years ago

Hi, just installed the libmbus-negative-bcd.zip. I will let it run for a day to see how it goes!

josvandekoffie commented 5 years ago

Good evening! Just wanted to let you know: It works perfectly with the negative-bcd branch! Thank you so much!

lategoodbye commented 5 years ago

I've merged the branch into master.