rscada / libmbus

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

Kamstrup Multical 302 #81

Closed ado464 closed 9 years ago

ado464 commented 9 years ago

Hello all, i have a Kamstrup multical 302 and i have trouble reading from it or even locating it in my network, but all other 3 Kamstrup Multical 602 are located without trouble, could someone please help me out real quick what it could be?

I have tried swapping the connections on the m-bus as well, i know they are polarity independent but it was worth a try.

best regards, Ado

lategoodbye commented 9 years ago

Hi Ado,

could you be please be more specific.

Which program? Which version? What is the output? Have you tried verbose mode? Which baudrate?

Stefan

ado464 commented 9 years ago

I am running the libmbus 0.8.0 with mbus-serial-scan -d /dev/ttyUSB0 command, it is supposed to be located at the address 183 but it goes past it like it isn't even there, standard baud so i guess it's on 9600.

How do i do it in verbose?

regards, Ado

lategoodbye commented 9 years ago

Okay, you already enable debug ("verbose mode") with parameter d.

Here are some tips:

ado464 commented 9 years ago

Updated the libmbus and ran it with the baudrate of 2400 and the meter responded, i guess it can only handle 2400. Thanks for all you're help Stefan! Amazing and quick :D

lategoodbye commented 9 years ago

Hi Ado,

it would be nice if you could capture the response (e.g. mbus-serial-request-data-multi-reply) of a Kamstrup Multical 302 and post it here as a hex dump.

Stefan

ado464 commented 9 years ago

No problem here is the output:

``` 67211183 KAM 48 Heat: Outlet 3 00 0000 Instantaneous value 0 Fabrication number 67211183 2015-04-02T13:10:55 Instantaneous value 0 Energy (kWh) 3219 2015-04-02T13:10:55 Instantaneous value 0 Energy (kWh) 0 2015-04-02T13:10:55 Instantaneous value 0 Manufacturer specific 17741 2015-04-02T13:10:55 Instantaneous value 0 Manufacturer specific 14938 2015-04-02T13:10:55 Instantaneous value 0 Volume (1e-2 m^3) 32766 2015-04-02T13:10:55 Instantaneous value 0 On time (hours) 384 2015-04-02T13:10:55 Value during error state 0 On time (hours) 2 2015-04-02T13:10:55 Instantaneous value 0 Flow temperature (1e-2 deg C) 5119 2015-04-02T13:10:55 Instantaneous value 0 Return temperature (1e-2 deg C) 4618 2015-04-02T13:10:55 Instantaneous value 0 Temperature Difference (1e-2 deg C) 501 2015-04-02T13:10:55 Instantaneous value 0 Power (100 W) 123 2015-04-02T13:10:55 Maximum value 0 Power (100 W) 285 2015-04-02T13:10:55 Instantaneous value 0 Volume flow (m m^3/h) 2138 2015-04-02T13:10:55 Maximum value 0 Volume flow (m m^3/h) 2339 2015-04-02T13:10:55 Instantaneous value 0 Error flags 0 2015-04-02T13:10:55 Instantaneous value 0 Time Point (time & date) 2015-04-02T14:10:00 2015-04-02T13:10:55 Instantaneous value 1 Energy (kWh) 2473 2015-04-02T13:10:55 Instantaneous value 1 Energy (kWh) 0 2015-04-02T13:10:55 Instantaneous value 1 Manufacturer specific 13287 2015-04-02T13:10:55 Instantaneous value 1 Manufacturer specific 11134 2015-04-02T13:10:55 Instantaneous value 1 Volume (1e-2 m^3) 24574 2015-04-02T13:10:55 Maximum value 1 Power (100 W) 294 2015-04-02T13:10:55 Maximum value 1 Volume flow (m m^3/h) 2327 2015-04-02T13:10:55 Instantaneous value 1 Time Point (date) 2015-03-31 2015-04-02T13:10:55 Instantaneous value 0 Manufacturer specific 67211183 2015-04-02T13:10:55 Instantaneous value 0 Manufacturer specific 44210 2015-04-02T13:10:55 Instantaneous value 0 Manufacturer specific 13302000 2015-04-02T13:10:55 Instantaneous value 0 Manufacturer specific 6145 2015-04-02T13:10:55 Instantaneous value 0 Firmware version 1793 2015-04-02T13:10:55
lategoodbye commented 9 years ago

Hi Ado,

sorry i mean the raw M-Bus telegram (meter response) as hex dump.

Somethings like this:

https://github.com/rscada/libmbus/blob/master/test/test-frames/kamstrup_multical_601.hex

Stefan

ado464 commented 9 years ago

How do i get just that from the device?

regards, Ado

lategoodbye commented 9 years ago

The debug parameter should do that:

mbus-serial-request-data-multi-reply -d -b 2400 /dev/ttyUSB0 mbus-address

ado464 commented 9 years ago

There we go, hope it's this:

init_slaves: debug: sending init frame #1 [2015-04-02 22:48:59] SEND (005): 10 40 FD 3D 16 init_slaves: debug: sending init frame #2 [2015-04-02 22:48:59] SEND (005): 10 40 FD 3D 16 [2015-04-02 22:48:59] SEND (005): 10 7B B7 32 16 [2015-04-02 22:49:00] RECV (205): 68 C7 C7 68 08 B7 72 83 11 21 67 2D 2C 30 04 21 00 00 00 0C 78 83 11 21 67 04 06 40 0D 00 00 04 86 FF 02 00 00 00 00 04 FF 07 9A 49 00 00 04 FF 08 10 3E 00 00 04 14 FC 87 00 00 04 22 89 01 00 00 34 22 02 00 00 00 02 59 1A 15 02 5D 40 12 02 61 DA 02 04 2D B4 00 00 00 14 2D 1D 01 00 00 04 3B 67 08 00 00 14 3B 23 09 00 00 02 FD 17 00 00 04 6D 30 37 E2 14 44 06 A9 09 00 00 44 86 FF 02 00 00 00 00 44 FF 07 E7 33 00 00 44 FF 08 7E 2B 00 00 44 14 FE 5F 00 00 54 2D 26 01 00 00 54 3B 17 09 00 00 42 6C FF 13 07 FF 0F AF 8F 01 04 00 00 00 00 04 FF 11 B2 AC 00 00 04 FF 12 F0 F8 CA 00 02 FF 1A 01 18 02 FD 0E 01 07 F6 16 mbus_frame_print: Dumping M-Bus frame [type 4, 205 bytes]: 68 C7 C7 68 08 B7 72 83 11 21 67 2D 2C 30 04 21 00 00 00 0C 78 83 11 21 67 04 06 40 0D 00 00 04 86 FF 02 00 00 00 00 04 FF 07 9A 49 00 00 04 FF 08 10 3E 00 00 04 14 FC 87 00 00 04 22 89 01 00 00 34 22 02 00 00 00 02 59 1A 15 02 5D 40 12 02 61 DA 02 04 2D B4 00 00 00 14 2D 1D 01 00 00 04 3B 67 08 00 00 14 3B 23 09 00 00 02 FD 17 00 00 04 6D 30 37 E2 14 44 06 A9 09 00 00 44 86 FF 02 00 00 00 00 44 FF 07 E7 33 00 00 44 FF 08 7E 2B 00 00 44 14 FE 5F 00 00 54 2D 26 01 00 00 54 3B 17 09 00 00 42 6C FF 13 07 FF 0F AF 8F 01 04 00 00 00 00 04 FF 11 B2 AC 00 00 04 FF 12 F0 F8 CA 00 02 FF 1A 01 18 02 FD 0E 01 07 F6 16

regards, Ado

lategoodbye commented 9 years ago

Thank you very much Ado