hobbyquaker / homekit2mqtt

HomeKit to MQTT bridge 🏡📱
MIT License
349 stars 71 forks source link

Device status isn't updated #166

Open SandroK opened 3 years ago

SandroK commented 3 years ago

I have installed homekit2mqtt in a docker container (https://hub.docker.com/r/homesmarthome/homekit2mqtt)

It works, I can switch lights on an off My config.json

{"LichtSpeisekammer": { "id": "LichtSpeisekammer", "name": "Licht Speisekammer", "services": [ { "name": "Licht Speisekammer", "service": "Lightbulb", "topic": { "setOn": "zigbee2mqtt/LichtSpeisekammer/set/state", "statusOn": "zigbee2mqtt/LichtSpeisekammer", "setBrightness": "zigbee2mqtt/LichtSpeisekammer/set/brightness", "statusBrightness": "zigbee2mqtt/LichtSpeisekammer", "setHue": "", "statusHue": "", "setSaturation": "", "statusSaturation": "", "setColorTemperature": "", "statusColorTemperature": "", "statusRGB": "", "setRGB": "" }, "payload": { "onTrue": "ON", "onFalse": "OFF", "brightnessFactor": 2.54, "hueFactor": null, "saturationFactor": null }, "json": { "statusOn": ".state", "statusBrightness": "brightness" }, "config": {}, "props": {} } ], "payload": {}, "config": {} } }

One json attribute is preceded by a dot, the other one isn't. But neither status is updated when I change it outside of Homekit

The status comes in the topic zigbee2mqtt/LichtSpeisekammer and the payload looks like {"state":"ON","brightness":26,"linkquality":0}

I thus added the json property in the config

When I run homekit2mqtt with verbosity set to debug, I don't see any reaction to state changes outside of Homekit either. No output at all.

Obviously, I'd like it to work both ways and update the status. Is my use of the json property correct? Shouldn't I see the mqtt messages coming in? What might be the issue?

Thanks