[solved] Shelly Mini 1PM gen 4: Power value fault

Hi,
the power value is not displayed correctly in Phoscon App.



42 A current ? what is on the device ?
Effectively there is a problem If I try to compute the power it’s more 5 Kw than 5 W.
232 * 42 = 9.7KW (without power factor)

The code use


        {
          "name": "state/power",
          "refresh.interval": 360,
          "read": {
            "at": "0x050b",
            "cl": "0x0b04",
            "ep": 1,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x050b",
            "cl": "0x0b04",
            "ep": 1,
            "eval": "Item.val = Attr.val / 100;"
          }
        },

ATM it’s / 100, but I think it need to be * 1000.

Sorry @Smanar, but current is output in mA and you’re right, it could be due to the divider. @Olli You could check what value is represented by 0x0605.

Lol, ha yes right, it’s in mA, more logic ^^.
So just need to remove the “/100”

If It have worked, can you make a PR or ask for someone make it. (to have the change official)

I’m not in favor of simply removing “/100” if we don’t know what’s correct, since this screenshot was taken during the DDF creation process.

If it’s still correct, it may be necessary to integrate state/power_divisor. To find out, it’s necessary to connect different devices to the Shelly and then check the power divider value. If it changes (1/10/100), then state/power_divisor is needed.

For me it’s fine according to current value.
And it’s personnal but I prefer hardcoded convertion, easier, less stuff to use, and sometime the firwmare return bad values for multiplicator/divisor.

Right, I just wanted to be sure. I’ve now checked the Shelly DDFs and the values ​​are being passed exactly the same way with the Power Strip 4 Gen4. I have corrected it for the Shelly 1PM (Mini) Gen4.

I think it‘s okay.
0x0605 has value 1