Hi,
I appreciate some help, as I am stuck trying to get my new Mi Scale to work. I installed miscale and mosquitto. It looks like the connection between miscale and mqtt is working fine.
The miscale log states:
2021-11-18 02:22:16 - Starting Xiaomi mi Scale...
2021-11-18 02:22:16 - Loading Config From Add-On Options...
2021-11-18 02:22:16 - Config Loaded...
2021-11-18 02:22:53 - Publishing data to topic miscale/Bjorn/weight: {"weight":XX.00,"weight_unit":"kg","bmi":XX.09,"basal_metabolism":XXXX.07,"visceral_fat":XX.78,"timestamp":"2021-11-18 02:22:53.058659"}
2021-11-18 02:22:53 - Data Published ...
2021-11-18 09:14:53 - btle disconnected: Device disconnected
So that looks good to me. Even the right user is identifiey by the weight. Also the mosquitto log looks good to me:
1637252878: New connection from 192.168.42.11 on port 1883.
1637252878: New client connected from 192.168.42.11 as auto-E99A6C92-1692-0DC7-D935-D00EC9D34659 (p2, c1, k60, u'mqtt').
1637252878: Client auto-E99A6C92-1692-0DC7-D935-D00EC9D34659 disconnected.
So I added this as sensor to my configuration.yaml:
- platform: mqtt
name: "Gewicht Bjorn"
state_topic: "miscale/Bjorn/weight"
value_template: "{{ value_json['weight'] }}"
unit_of_measurement: "kg"
json_attributes_topic: "miscale/Bjorn/weight"
icon: mdi:scale-bathroom
The sensor is initiated, but never populated. So I assume it has something to do with mqtt, but I have no experience and dont even know what to look for.
This are my mosquitto settings:
logins:
- username: mqtt
password: ***
customize:
active: true
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
And finally I configured the mqtt integration settings to
Broker: 192.168.42.11
Port: 1883
User: mqtt
Password: ****
Thanks for your help in advance!