indiefan / king_smith

Home Assistant Integration for King Smith treadmills (e.g. WalkingPad)
MIT License
17 stars 8 forks source link

KS A1 Pro not discover #11

Closed Yiivgeny closed 5 months ago

Yiivgeny commented 8 months ago

System Health details

System Information

version core-2023.12.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.58-haos-raspi
arch aarch64
timezone Europe/Moscow
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.33.0 Stage | running Available Repositories | 1361 Downloaded Repositories | 6
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.2 -- | -- update_channel | stable supervisor_version | supervisor-2023.12.0 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 457.7 GB disk_used | 58.7 GB healthy | true supported | true board | yellow supervisor_api | ok version_api | ok installed_addons | Mosquitto broker (6.4.0), Grafana (9.1.1), InfluxDB (4.8.0), Advanced SSH & Web Terminal (17.0.0), Zigbee2MQTT (1.34.0-1), Studio Code Server (5.14.2), ESPHome (2023.12.3), Home Assistant Google Drive Backup (0.112.1), Samba share (12.2.0)
Dashboards dashboards | 2 -- | -- resources | 0 views | 1 mode | storage
Recorder oldest_recorder_run | 24 декабря 2023 г. в 19:06 -- | -- current_recorder_run | 25 декабря 2023 г. в 03:18 estimated_db_size | 93.52 MiB database_engine | sqlite database_version | 3.41.2
Xiaomi Miot Auto component_version | 0.7.14 -- | -- can_reach_server | ok can_reach_spec | ok logged_accounts | 1 total_devices | 7

Checklist

Describe the issue

KS A1 Pro never discover

Reproduction steps

  1. Install integration via HACS (reboot, etc)
  2. Enable, reset, power cycle device (i trying many variants)
  3. Wait for long time (many hours)
  4. Device not discovered ...

Debug logs

Only one row related to this integration

2023-12-25 03:18:48.354 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration king_smith which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant


### Diagnostics dump

_No response_
Yiivgeny commented 8 months ago

Working for me. A1 Pro discovered successfully.

But speed incorrect bounds (0-4 in intergation), setting 4 value is 6 km/h on device

saladpanda commented 8 months ago

That's because the integration converts the speed to miles per hour. A quick fix to get it to kilometers per hour is:

Set KPH_TO_MPH = 1 in https://github.com/indiefan/king_smith/blob/30c59a89652818e01244fb6d0cec561827642e78/custom_components/king_smith/number.py#L20

And set MAX_VALUE = 6 in https://github.com/indiefan/king_smith/blob/30c59a89652818e01244fb6d0cec561827642e78/custom_components/king_smith/number.py#L22