homebridge-mqttthing icon indicating copy to clipboard operation
homebridge-mqttthing copied to clipboard

GetWatts for lights

Open bmpalmeida opened this issue 3 years ago • 2 comments

I have a bunch of Shelly devices that control lights and expose the power consumption via the eve app. Will be possible to add the power consumption to the lights via mqtt?

bmpalmeida avatar Oct 30 '21 17:10 bmpalmeida

    {
        "accessory": "mqttthing",
        "type": "lightSensor",
        "name": "power consumption",
        "url": "url",
        "username": "username",
        "password": "password",
        "topics": {
            "getCurrentAmbientLightLevel": {
                "topic": "shellies/shellyXXX-XXX/relay/0/power",
                "apply": "if (message < 0.0001) message = 0.0001; return message;"
            },
            "getStatusActive": "shellies/shellyXXX-XXX/relay/0"
        },
        "integerValue": false,
        "onlineValue": "true"
    },

FermedePommerieux avatar Nov 11 '21 13:11 FermedePommerieux

only these characteristics are supported by Apple:

https://developer.apple.com/documentation/homekit/hmcharacteristic/characteristic_types

rbswift avatar Jan 16 '22 01:01 rbswift