{"action":"created","issue":{"url":"https://api.github.com/repos/rscada/libmbus/issues/98","repository_url":"https://api.github.com/repos/rscada/libmbus","labels_url":"https://api.github.com/repos/rscada/libmbus/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/rscada/libmbus/issues/98/comments","events_url":"https://api.github.com/repos/rscada/libmbus/issues/98/events","html_url":"https://github.com/rscada/libmbus/issues/98","id":144931226,"number":98,"title":"Reading Endress Hauser RMS621 M-Bus","user":{"login":"ado464","id":8365564,"avatar_url":"https://avatars.githubusercontent.com/u/8365564?v=3","gravatar_id":"","url":"https://api.github.com/users/ado464","html_url":"https://github.com/ado464","followers_url":"https://api.github.com/users/ado464/followers","following_url":"https://api.github.com/users/ado464/following{/other_user}","gists_url":"https://api.github.com/users/ado464/gists{/gist_id}","starred_url":"https://api.github.com/users/ado464/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ado464/subscriptions","organizations_url":"https://api.github.com/users/ado464/orgs","repos_url":"https://api.github.com/users/ado464/repos","events_url":"https://api.github.com/users/ado464/events{/privacy}","received_events_url":"https://api.github.com/users/ado464/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rscada/libmbus/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"lategoodbye","id":1618443,"avatar_url":"https://avatars.githubusercontent.com/u/1618443?v=3","gravatar_id":"","url":"https://api.github.com/users/lategoodbye","html_url":"https://github.com/lategoodbye","followers_url":"https://api.github.com/users/lategoodbye/followers","following_url":"https://api.github.com/users/lategoodbye/following{/other_user}","gists_url":"https://api.github.com/users/lategoodbye/gists{/gist_id}","starred_url":"https://api.github.com/users/lategoodbye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lategoodbye/subscriptions","organizations_url":"https://api.github.com/users/lategoodbye/orgs","repos_url":"https://api.github.com/users/lategoodbye/repos","events_url":"https://api.github.com/users/lategoodbye/events{/privacy}","received_events_url":"https://api.github.com/users/lategoodbye/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-03-31T15:16:58Z","updated_at":"2016-04-01T10:52:58Z","closed_at":null,"body":"Hello guys, i am having issues reading this meter.\r\n\r\nLink to meter: http://www.uk.endress.com/en/Tailor-made-field-instrumentation/System-Components-Recorder-Data-Manager/energy-manager-RMS621\r\n\r\nCheck the output :)\r\n\r\nReading 1:\r\n\r\n<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n<MBusData>\r\n\r\n    <SlaveInformation>\r\n        <Id>28336</Id>\r\n        <Manufacturer>EAH</Manufacturer>\r\n        <Version>2</Version>\r\n        <ProductName></ProductName>\r\n        <Medium>Bus/System</Medium>\r\n        <AccessNumber>15</AccessNumber>\r\n        <Status>00</Status>\r\n        <Signature>0000</Signature>\r\n    </SlaveInformation>\r\n\r\n    <DataRecord id=\"0\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Time Point (time &amp; date)</Unit>\r\n        <Value>2016-03-31T17:02:00</Value>\r\n        <Timestamp>2016-03-31T15:03:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"1\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Volume flow ( m^3/h)</Unit>\r\n        <Value>166659104.000000</Value>\r\n        <Timestamp>2016-03-31T15:03:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"2\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Flow temperature (deg C)</Unit>\r\n        <Value>0.000000</Value>\r\n        <Timestamp>2016-03-31T15:03:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"3\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Return temperature (deg C)</Unit>\r\n        <Value>-27733311640882380800.000000</Value>\r\n        <Timestamp>2016-03-31T15:03:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"4\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Energy (kWh)</Unit>\r\n        <Value>-0.000000</Value>\r\n        <Timestamp>2016-03-31T15:03:21</Timestamp>\r\n    </DataRecord>\r\n\r\n</MBusData>\r\n\r\n\r\nReading2:\r\n\r\n\r\n<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n<MBusData>\r\n\r\n    <SlaveInformation>\r\n        <Id>28336</Id>\r\n        <Manufacturer>EAH</Manufacturer>\r\n        <Version>2</Version>\r\n        <ProductName></ProductName>\r\n        <Medium>Bus/System</Medium>\r\n        <AccessNumber>3</AccessNumber>\r\n        <Status>00</Status>\r\n        <Signature>0000</Signature>\r\n    </SlaveInformation>\r\n\r\n    <DataRecord id=\"0\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Time Point (time &amp; date)</Unit>\r\n        <Value>2016-03-31T17:06:00</Value>\r\n        <Timestamp>2016-03-31T15:07:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"1\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Volume flow ( m^3/h)</Unit>\r\n        <Value>0.000000</Value>\r\n        <Timestamp>2016-03-31T15:07:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"2\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Flow temperature (deg C)</Unit>\r\n        <Value>-0.000000</Value>\r\n        <Timestamp>2016-03-31T15:07:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"3\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Return temperature (deg C)</Unit>\r\n        <Value>0.000000</Value>\r\n        <Timestamp>2016-03-31T15:07:21</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"4\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Energy (kWh)</Unit>\r\n        <Value>-19056912498688.000000</Value>\r\n        <Timestamp>2016-03-31T15:07:21</Timestamp>\r\n    </DataRecord>\r\n\r\n</MBusData>\r\n\r\n\r\nThe ID=4 isn't even kWh, it's Mw but shows kWh? Also.. negative value?\r\n\r\nAlso when i scan for the meter it keeps changing meter place? Very weird. It is set to address 1.\r\n\r\n<pre>\r\nScanning primary addresses:\r\n0 [2016-03-31 15:07:52] SEND (005): 10 40 00 40 16\r\n1 [2016-03-31 15:07:52] SEND (005): 10 40 01 41 16\r\n[2016-03-31 15:07:52] RECV (001): E5\r\nFound a M-Bus device at address 1\r\n2 [2016-03-31 15:07:52] SEND (005): 10 40 02 42 16\r\n3 [2016-03-31 15:07:52] SEND (005): 10 40 03 43 16\r\n4 [2016-03-31 15:07:52] SEND (005): 10 40 04 44 16\r\n5 [2016-03-31 15:07:53] SEND (005): 10 40 05 45 16\r\n6 [2016-03-31 15:07:53] SEND (005): 10 40 06 46 16\r\n7 [2016-03-31 15:07:53] SEND (005): 10 40 07 47 16\r\n8 [2016-03-31 15:07:53] SEND (005): 10 40 08 48 16\r\n9 [2016-03-31 15:07:54] SEND (005): 10 40 09 49 16\r\n10 [2016-03-31 15:07:54] SEND (005): 10 40 0A 4A 16\r\n</pre>\r\n\r\nBut comes also up as:\r\n\r\n<pre>\r\nScanning primary addresses:\r\n0 [2016-03-31 15:08:21] SEND (005): 10 40 00 40 16\r\n1 [2016-03-31 15:08:21] SEND (005): 10 40 01 41 16\r\n2 [2016-03-31 15:08:22] SEND (005): 10 40 02 42 16\r\n3 [2016-03-31 15:08:22] SEND (005): 10 40 03 43 16\r\n[2016-03-31 15:08:22] RECV (001): E5\r\nFound a M-Bus device at address 3\r\n4 [2016-03-31 15:08:22] SEND (005): 10 40 04 44 16\r\n5 [2016-03-31 15:08:22] SEND (005): 10 40 05 45 16\r\n6 [2016-03-31 15:08:23] SEND (005): 10 40 06 46 16\r\n7 [2016-03-31 15:08:23] SEND (005): 10 40 07 47 16\r\n8 [2016-03-31 15:08:23] SEND (005): 10 40 08 48 16\r\n</pre>\r\n\r\n\r\n\r\nDebug output:\r\n\r\n\r\nmbus-serial-request-data -d -b 2400 /dev/ttyUSB0 1\r\ninit_slaves: debug: sending init frame #1\r\n[2016-03-31 15:14:21] SEND (005): 10 40 FD 3D 16\r\ninit_slaves: debug: sending init frame #2\r\n[2016-03-31 15:14:22] SEND (005): 10 40 FD 3D 16\r\n[2016-03-31 15:14:22] SEND (005): 10 5B 01 5C 16\r\n[2016-03-31 15:14:22] RECV (051): 68 2D 2D 68 08 01 72 36 83 02 00 28 14 02 0E 01 00 00 00 04 6D 0D 91 1F 23 05 3E 12 3A EB 42 05 5B 1E 8E 7F 42 05 5F FE A6 70 42 05 06 4C 2F B0 44 91 16\r\nmbus_frame_print: Dumping M-Bus frame [type 4, 51 bytes]: 68 2D 2D 68 08 01 72 36 83 02 00 28 14 02 0E 01 00 00 00 04 6D 0D 91 1F 23 05 3E 12 3A EB 42 05 5B 1E 8E 7F 42 05 5F FE A6 70 42 05 06 4C 2F B0 44 91 16 \r\n<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n<MBusData>\r\n\r\n    <SlaveInformation>\r\n        <Id>28336</Id>\r\n        <Manufacturer>EAH</Manufacturer>\r\n        <Version>2</Version>\r\n        <ProductName></ProductName>\r\n        <Medium>Bus/System</Medium>\r\n        <AccessNumber>1</AccessNumber>\r\n        <Status>00</Status>\r\n        <Signature>0000</Signature>\r\n    </SlaveInformation>\r\n\r\n    <DataRecord id=\"0\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Time Point (time &amp; date)</Unit>\r\n        <Value>2016-03-31T17:13:00</Value>\r\n        <Timestamp>2016-03-31T15:14:22</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"1\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Volume flow ( m^3/h)</Unit>\r\n        <Value>0.000000</Value>\r\n        <Timestamp>2016-03-31T15:14:22</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"2\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Flow temperature (deg C)</Unit>\r\n        <Value>0.000000</Value>\r\n        <Timestamp>2016-03-31T15:14:22</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"3\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Return temperature (deg C)</Unit>\r\n        <Value>-110617361593742888303337684056997363712.000000</Value>\r\n        <Timestamp>2016-03-31T15:14:22</Timestamp>\r\n    </DataRecord>\r\n\r\n    <DataRecord id=\"4\">\r\n        <Function>Instantaneous value</Function>\r\n        <StorageNumber>0</StorageNumber>\r\n        <Unit>Energy (kWh)</Unit>\r\n        <Value>46055696.000000</Value>\r\n        <Timestamp>2016-03-31T15:14:22</Timestamp>\r\n    </DataRecord>\r\n\r\n</MBusData>\r\n\r\n\r\nThanks, much help is appreciated.\r\n\r\nRegards,\r\nAdo\r\n"},"comment":{"url":"https://api.github.com/repos/rscada/libmbus/issues/comments/204347197","html_url":"https://github.com/rscada/libmbus/issues/98#issuecomment-204347197","issue_url":"https://api.github.com/repos/rscada/libmbus/issues/98","id":204347197,"user":{"login":"ado464","id":8365564,"avatar_url":"https://avatars.githubusercontent.com/u/8365564?v=3","gravatar_id":"","url":"https://api.github.com/users/ado464","html_url":"https://github.com/ado464","followers_url":"https://api.github.com/users/ado464/followers","following_url":"https://api.github.com/users/ado464/following{/other_user}","gists_url":"https://api.github.com/users/ado464/gists{/gist_id}","starred_url":"https://api.github.com/users/ado464/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ado464/subscriptions","organizations_url":"https://api.github.com/users/ado464/orgs","repos_url":"https://api.github.com/users/ado464/repos","events_url":"https://api.github.com/users/ado464/events{/privacy}","received_events_url":"https://api.github.com/users/ado464/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T10:52:58Z","updated_at":"2016-04-01T10:52:58Z","body":"Hello, i have resolved the \"problem\" with the unit Energy (kWh), it was all in the documentation of the m-bus for Endress Hauser.\r\n\r\nThe process values are always transmitted in the following basic units:\r\nVolume flow.....m3/h\r\nTemperature.....°C\r\nPressure.....bar\r\nHeat flow (performance) for steam applications.....MW\r\nHeat flow (performance) for all other applications.....kW\r\nMass flow for steam applications.....t/h\r\nMass flow for all other applications.....kg/h\r\nStandard volume.....(N)m3/h\r\nTotal volume.....m3\r\nTotal mass for steam applications.....t\r\nTotal mass for all other applications.....kg\r\nTotal heat quantity for steam applications....MWh\r\nTotal heat quantity for all other applications.....kWh\r\nTotal standard volume.....(N)m3\r\nDensity.....kg/m3\r\nEnthalpy.....kJ/kg\r\n\r\nAnd with that making the unit correct since we are measuring heat and not steam and kWh applies to everything else unless it's steam which would then report MWh, sorry about that.\r\n\r\nThe documentation link: https://portal.endress.com/wa001/dla/5000429/0191/000/04/Ba00216ren_0211.pdf\r\n\r\n\r\n\r\nRegards,\r\nAdo"}}