Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor "no data" 0.112 #6

Closed
1 task done
fufar opened this issue Jul 6, 2020 · 2 comments
Closed
1 task done

Sensor "no data" 0.112 #6

fufar opened this issue Jul 6, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@fufar
Copy link

fufar commented Jul 6, 2020

Select Add-On (place a lowercase x for the relevant add-on)

  • Xiaomi Mi Scale 2

Describe the bug
I get updates in addons log, but sensor is "no data"

To Reproduce
I installed plugin from repo(using easy way as addon)
Set up my config

HCI_DEV: hci0
MISCALE_MAC: 'C8:47:8C:A0:XX:XX'
MQTT_PREFIX: miScale
MQTT_HOST: 192.168.1.2
MQTT_USERNAME: mqtt
MQTT_PASSWORD: mqtt
MQTT_PORT: 1883
TIME_INTERVAL: 30
MQTT_DISCOVERY: true
MQTT_DISCOVERY_PREFIX: homeassistant
USER1_GT: 80
USER1_SEX: male
USER1_NAME: Ilya
USER1_HEIGHT: 175
USER1_DOB: '1990-08-02'
USER2_LT: 79
USER2_SEX: female
USER2_NAME: Anastasiia
USER2_HEIGHT: 165
USER2_DOB: '1990-10-03'
USER3_SEX: male
USER3_NAME: emptyuser
USER3_HEIGHT: 150
USER3_DOB: '1990-01-01'

Get a log


2020-07-06 19:59:21 - Starting Xiaomi mi Scale...
2020-07-06 19:59:21 - Loading Config From Add-On Options...
2020-07-06 19:59:21 - Config Loaded...
2020-07-06 19:59:22 - Discovery Completed...
2020-07-06 20:07:34 - Publishing data to topic miScale/Ilya/weight: {"Weight":"104.60","BMI":"34.16","Basal Metabolism":"2042.15","Visceral Fat":"27.03","TimeStamp":"2020-07-06-20:07:34"}
2020-07-06 20:07:34 - Data Published ...

In mqtt explorer also get updates
Then make sensors

  • platform: mqtt
    name: "Илья Вес"
    state_topic: "miscale/Ilya/weight"
    value_template: "{{ value_json['Weight'] }}"
    unit_of_measurement: "kg"
    json_attributes_topic: "miScale/Ilya/weight"
    icon: mdi:scale-bathroom

  • platform: mqtt
    name: "Настя Вес"
    state_topic: "miScale/Anastasiia/weight"
    value_template: "{{ value_json['Weight'] }}"
    unit_of_measurement: "kg"
    json_attributes_topic: "miScale/Anastasiia/weight"
    icon: mdi:scale-bathroom

After restart in object explorer find new sensors, but they have no data

Expected behaviour
Get data

Screenshots
image
image

Scale (please complete the following information):

  • Model # Xiaomi Mi Scale 2

Device running Home Assistant (please complete the following information):

  • Device used to run the Script/Container [e.g. Raspberry Pi, NUC] Synology
  • Bluetooth device used [e.g. Built-in, USB Dongle] Orico Bluetooth 4 dongle
    home assistant version 0.112.2
@fufar fufar added the bug Something isn't working label Jul 6, 2020
@lolouk44
Copy link
Owner

lolouk44 commented Jul 6, 2020

Thanks. The issue is worth the discovery. Topic is miScale when it should be miscale (lowercase s)
For the time being set an mqtt prefix. I'll fix in the next version

@lolouk44
Copy link
Owner

lolouk44 commented Jul 7, 2020

The issue is actually with the default data in the config.json
The workaround remains the same, set miscale as your MQTT Prefix instead of leaving blank.
I've fixed the config.json on the repo, but I think you won't see the changes until there is a change in the version tag (I believe it'll reuse the cached version)

@lolouk44 lolouk44 closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants