Query SMA Energy Meter / Home Manager by UDP in

yeah I want !

    var t = typeof value;
    if (t==="number") {
        msg.result[valuename + " " + typeName] = value / (sma_units[unit] || 1)
    } else if (t === "bigint") {
        msg.result[valuename + " " + typeName] = value / BigInt(sma_units[unit] || 1)
    } else {
        msg.result[valuename + " " + typeName] = value / BigInt(sma_units[unit] || 1)

I think this part is responsible for dividing the counter value by 3600000 - but it does´t, only for the actually values.
Because a BigInt can´t be divided ? I need some help here.


the next question is: I want to show the values in the dashboard, but it don´t like BigInt.

How can I convert all actually values to "number" in a 2nd function ?
Like this:
msg.payload = Number(msg.payload["P Verbrauch momentan"]);
return msg;