# Samsung Smartthings plug 2019 inccorectly reporting consumption

**URL:** <https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776>\
**Category:** Bug reports\
**Created:** [October 14, 2024, 10:56am UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776 "2024-10-14T10:56:42Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 14, 2024, 10:56am UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/1 "2024-10-14T10:56:42Z")

</div>

Hi all,  
I have replaced the buggy Heimann smart plugs with Samsung Smartthings smartplug 2019 and I just noticed that the power is incorrectly reported in Phoscon.

In Deconz I can see it is correct:

 ![image](https://forum.phoscon.de/uploads/default/original/2X/7/7ef5a80a385884f9aa870952f9780ba3caa2a264.jpeg)  
As per Deconz it should be 4.83 KWH (483 value and divisor is 100 and the measurements is in KWh)  
In Phoscon it reports 483wH so either should be 48300 wH or 4.83 KwH  
 ![image](https://forum.phoscon.de/uploads/default/original/2X/d/d9f6609bdb62b3f1a7f2c95589e49da680a8392c.png)

Other screenshots that would be useful I think

 ![image](https://forum.phoscon.de/uploads/default/original/2X/7/76c69c11fada18d9b64c8178f8784314bac646cd.jpeg)

Is DDF to be corrected or what is the issue? I am using Home Assistant add on , Conbee III, Firmware 26530900 version 2.28.1

Many thanks!

---

<div class="post-metadata">

**Author:** ![Mimiix](https://forum.phoscon.de/user_avatar/forum.phoscon.de/mimiix/32/10_2.png) [@Mimiix](https://forum.phoscon.de/u/Mimiix)\
**Post date:** [October 14, 2024, 4:36pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/2 "2024-10-14T16:36:59Z")

</div>

What’s the api showing

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 14, 2024, 8:20pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/3 "2024-10-14T20:20:23Z")

</div>

I am unsure how to get the info via API

[http://IP](http://IP):PORT/api/KEY/lights/45

{“capabilities”:{“alerts”:[“none”,“select”,“lselect”]},“config”:{“groups”:[“0”]},“etag”:“0367ba37718d661fb975af22be472e86”,“hascolor”:false,“lastannounced”:“2024-10-12T17:00:05Z”,“lastseen”:“2024-10-14T20:16Z”,“manufacturername”:“LDS”,“modelid”:“ZB-ONOFFPlug-D0005”,“name”:“Smart and AV Hub”,“state”:{“alert”:“none”,“on”:true,“reachable”:true},“swversion”:“20190716-165”,“type”:“Smart plug”,“uniqueid”:“ec:1b:bd:ff:fe:43:79:94-01”}

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 14, 2024, 8:34pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/4 "2024-10-14T20:34:08Z")

</div>

in the debug is showing

21:29:00:590 DB sql exec REPLACE INTO sensors (sid, name, type, modelid, manufacturername, uniqueid, swversion, state, config, fingerprint, deletedState, mode, lastseen, lastannounced) VALUES (‘202’, ‘Consumption 202’, ‘ZHAConsumption’, ‘ZB-ONOFFPlug-D0005’, ‘LDS’, ‘ec:1b:bd:ff:fe:43:79:94-01-0702’, ‘2.3’, ‘{“consumption”:551,“lastupdated”:“2024-10-14T20:28:32.099”}’, ‘{“on”:true,“reachable”:true}’, ‘{“d”:81,“ep”:1,“in”:[0,1794],“p”:260}’, ‘normal’, ‘1’, ‘2024-10-14T20:28Z’, ‘2024-10-12T17:00:05Z’)

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 14, 2024, 8:35pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/5 "2024-10-14T20:35:23Z")

</div>

the correct value should be 5.51 KwH and it is reporting 0.551 KwH in Home assistant and 551 wH in Deconz…

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 20, 2024, 4:56pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/6 "2024-10-20T16:56:55Z")

</div>

So do we agree that it is a bug? Something that I can try to fix?

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [October 21, 2024, 4:10pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/7 "2024-10-21T16:10:42Z")

</div>

Hello, idk if it’s a bug, to be sure you can use a device with big consumption like a heater during at least 30mn and check values.  
But this device don’t have DDF, it’s actually managed by legacy code, So no other method than creating a DDF.

You can mimic for exemple this one to start [deconz-rest-plugin/devices/blitzwolf/bw\_shp13\_smart\_plug.json at master · dresden-elektronik/deconz-rest-plugin · GitHub](https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/blitzwolf/bw_shp13_smart_plug.json)

With just replacing the modelId/ManufactureName

---

<div class="post-metadata">

**Author:** ![Swoop](https://forum.phoscon.de/letter_avatar_proxy/v4/letter/s/b77776/32.png) [@Swoop](https://forum.phoscon.de/u/Swoop)\
**Post date:** [October 21, 2024, 4:30pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/8 "2024-10-21T16:30:49Z")

</div>

> [@Smanar](#):
>
> You can mimic for exemple this one to start [deconz-rest-plugin/devices/blitzwolf/bw\_shp13\_smart\_plug.json at master · dresden-elektronik/deconz-rest-plugin · GitHub](https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/blitzwolf/bw_shp13_smart_plug.json)

Please, don’t! There is already a suggested DDF for this device without any feedback: [Aeotec Smart Plug (AU) · Issue #5700 · dresden-elektronik/deconz-rest-plugin · GitHub](https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5700#issuecomment-1126949625)

And it’s not a bug, it’s just not the right divisor being used 🙂 @andys73 you are correct, the value exposed in deconz GUI must be multiplied by 10, as the REST API is reporting in Wh (5510 Wh).

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 22, 2024, 3:21pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/9 "2024-10-22T15:21:20Z")

</div>

But actual value is fully wtong. What shall I do in Home assistan, define a template sensor and set the calculated value value there? Will it ever be corrected in the rest api and then will get correcly in HA?

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [October 23, 2024, 3:07pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/10 "2024-10-23T15:07:50Z")

</div>

Try the DDF proposed on the previous link.  
It’s possible to correct output if needed if the device use a DDF.

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 24, 2024, 9:23pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/11 "2024-10-24T21:23:02Z")

</div>

Hi @Smanar  
Great suggestion, I have added \* 10 in the Edit DDF and it shows now correctly in Home Assistant!  
I guess that this will be gone at next update, can someone commit the DDF change?

 ![image](https://forum.phoscon.de/uploads/default/original/2X/8/87facf08061128651c6b53e6e1857aea67b8facf.jpeg)  
This is what I have in my DDF

```auto
{
  "schema": "devcap1.schema.json",
  "manufacturername": "LDS",
  "modelid": "ZB-ONOFFPlug-D0005",
  "product": "ZB-ONOFFPlug-D0005",
  "sleeper": false,
  "status": "Gold",
  "path": "/devices/zb-onoffplug-d0005.json",
  "subdevices": [
    {
      "type": "$TYPE_SMART_PLUG",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/alert",
          "description": "The currently active alert effect.",
          "default": "none"
        },
        {
          "name": "state/on",
          "description": "True when device is on; false when off.",
          "refresh.interval": 5
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_POWER_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0b04"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0B04"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/mode",
          "description": "Operational mode.",
          "default": 1
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/power",
          "description": "The measured power (in W).",
          "refresh.interval": 300,
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0702"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0702"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/mode",
          "description": "Operational mode.",
          "default": 1
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/consumption",
          "refresh.interval": 300,
          "parse": {
            "at": "0x0000",
            "cl": "0x0702",
            "ep": 0,
            "eval": "Item.val = Attr.val * 10"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0006",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x10",
          "min": 5,
          "max": 180
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0000"
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [October 25, 2024, 3:03pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/12 "2024-10-25T15:03:45Z")

</div>

I can make the PR if you are sure it’s the correct value.  
But can you re-include the devive to be sure the DDF is working ? For me it miss a bind/report part, and it work for you because they was already set previously (by the legacy core).

Sorry I know this DDF is from me, but long time I have make it.

---

<div class="post-metadata">

**Author:** ![andys73](https://forum.phoscon.de/user_avatar/forum.phoscon.de/andys73/32/1155_2.png) [@andys73](https://forum.phoscon.de/u/andys73)\
**Post date:** [October 29, 2024, 4:37pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/13 "2024-10-29T16:37:01Z")

</div>

Hi @Smanar I did not use directly your ddf (as I am with the HA plug in) I just used the DDF editor and multiplied by 10 the simple metering cluster and then as I save it and change it as gold, all my samsung plugs used the updated ddf and reported the correct consumption. Does this answer your question? Thanks!

---

<div class="post-metadata">

**Author:** ![Smanar](https://forum.phoscon.de/user_avatar/forum.phoscon.de/smanar/32/60_2.png) [@Smanar](https://forum.phoscon.de/u/Smanar)\
**Post date:** [October 30, 2024, 4:38pm UTC](https://forum.phoscon.de/t/samsung-smartthings-plug-2019-inccorectly-reporting-consumption/5776/14 "2024-10-30T16:38:52Z")

</div>

He, not realy ^^  
This device don’t have DDF, so you can’t have edited an actual one with a \*10, it mean you have created yourself a complete DDF
