-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
WalkingPad A1 #261
Comments
Check for the device related logs. |
This error originated from a custom integration. Logger: custom_components.xiaomi_miot.sensor Xiaomi Miot Walking Pad Status: Got MiioException while fetching the state: {'code': -9999, 'message': 'user ack timeout'}, mapping: {'walking_pad.on': {'siid': 2, 'piid': 1}, 'walking_pad.mode': {'siid': 2, 'piid': 2}, 'walking_pad.status': {'siid': 2, 'piid': 3}, 'walking_pad.speed_level': {'siid': 2, 'piid': 4}, 'walking_pad.current_distance': {'siid': 2, 'piid': 5}, 'walking_pad.working_time': {'siid': 2, 'piid': 6}, 'walking_pad.current_step_count': {'siid': 2, 'piid': 7}, 'current_calorie_consumption-2-8': {'siid': 2, 'piid': 8}}, max_properties: 9/8 |
It seems that your device may not support local mode. It is recommended that you integrate it through Xiaomi account (Automatic mode). |
I have no issue controlling device using miiocli, if that's what you're talking about |
Well, I tried Automatic mode and it helped. |
You can control through
Show me the state attributes of this entity. |
|
Show me the state attributes of |
This is when speed is set to 1
this is when speed is set to 0.5
|
There seems no issue. |
Well, actually mode works, but it's label is misleading (changing manual to standby, not auto) |
The label of working mode is from miot-spec. if you want to change it, you can configure # configuration.yaml
xiaomi_miot:
translations:
walking_pad.mode:
none: manual
auto: standby
This log is not related to the set speed. Maybe you can try to upgrade to the master branch (commit: 26c2cfd), which will generate a |
Ok, I was wrong, "auto" is labeled currently (was checking at custom app which displays it wrong) |
Is there no way you could add autostart on/off toggle and selecting autostart speed? Both features are available over miio protocol |
Also is there a way to specify poll frequency? right now it's not very frequent |
Sorry for my English, I don't quite understand this sentence. |
# customize.yaml
sensor.ksmb_v1_d595_walking_pad_2:
interval_seconds: 20 # seconds |
Two most critical features are still missing
|
They don't seem to be defined in the miot-spec of the device, but maybe you can call them through service: service: xiaomi_miot.send_command
data:
entity_id: sensor.ksmb_v1_d595_walking_pad_2
method: miio_method
params: [] |
That works!
does disable autostart
does enable it |
Get miio state to entity attributes: # customize.yaml
sensor.ksmb_v1_d595_walking_pad_2:
miio_properties: auto Create a switch entity via template: # configuration.yaml
switch:
- platform: template
switches:
skylight:
value_template: |
{{ state_attr('sensor.ksmb_v1_d595_walking_pad_2', 'miio.auto') | int == 1 }}
turn_on:
service: xiaomi_miot.send_command
data:
entity_id: sensor.ksmb_v1_d595_walking_pad_2
method: set_auto
params: [1]
turn_off:
service: xiaomi_miot.send_command
data:
entity_id: sensor.ksmb_v1_d595_walking_pad_2
method: set_auto
params: [0] |
Set |
Well since I updated master I can't get walkingpad working at all.
|
But it would be really awesome to be able to specify props I want to bу red and written using miio protocol (is that what you just implemented?), since devices like walkingpad can not be added to local server (tried both Russia and UK and it's not supported) and connection with China server from Russia is very poor (not to mentioned local performance is always much better than cloud). I have other devices that can only be added to China server and they also keep failing off. |
Do you know what the miio properties corresponding to each property here is ? on: true # ?
mode: 0 # mode or auto ?
status: 0 # ?
speed_level: 0.5 # start_speed
current_distance: 0 # dist
working_time: 3 # time
current_step_count: 0 # step
current_calorie_consumption: 0 # cal |
There is a discussion about miio protocol for WalkingPad here rytilahti/python-miio#797
it's critical to use get_prop ["all"] because each get_prop takes about second to complete, and commands can not be processed in parallel on -> mode (true->1, false->2) |
It seems that the |
unfortunately yes |
same as |
|
Happy New Year! :) |
🎉 Now the device supports local mode. You can update to the master branch and try again. hass-xiaomi-miot/custom_components/xiaomi_miot/core/miio2miot_specs.py Lines 89 to 131 in 11ca179
|
How do I enable it? |
You only need to upgrade to the master branch and access it through automatic mode (account). I think it should also be possible through token. |
Any error/warning logs ? |
Here is what I get in log for ip/token (disabled everything else) Walkingpad Walking Pad Status: Got MiioException while fetching the state: {'code': -9999, 'message': 'user ack timeout'}, mapping: {'walking_pad.on': {'siid': 2, 'piid': 1}, 'walking_pad.mode': {'siid': 2, 'piid': 2}, 'walking_pad.status': {'siid': 2, 'piid': 3}, 'walking_pad.speed_level': {'siid': 2, 'piid': 4}, 'walking_pad.current_distance': {'siid': 2, 'piid': 5}, 'walking_pad.working_time': {'siid': 2, 'piid': 6}, 'walking_pad.current_step_count': {'siid': 2, 'piid': 7}, 'current_calorie_consumption-2-8': {'siid': 2, 'piid': 8}}, max_properties: 9/8 |
Try edit |
Something must be broken with HACS, I tried to update to latest master using HACS and file content didn't change. |
|
Speed and switch status are working for both read and write |
I'm not getting reading for autostart, event after adding
Update: but I can see it in state, hmm... |
Can't the [
{
'method': 'get_prop',
'params': ['all'],
'values': ['mode', 'time', 'speed', 'dist', 'calorie', 'step'],
},
{
'method': 'get_prop',
'params': ['auto'],
'values': ['auto'],
'delay': 2,
},
{
'method': 'get_prop',
'params': ['state'],
'values': ['state'],
'delay': 2,
},
] In this way, each time the status of the device is obtained, it will be blocked for 4 seconds. |
Upgrade to master branch and try again. Without |
You right, that's an issue. If we add autostart speed check, it will be blocked for 6 seconds, and what's more important controls will be unreliable. In my IOS app I solve that by prioritising controls over sensors, so that each sensor check is suspended until there are no control commands pending Simpler solution would be to use 3-4 second delay instead of 1-2, so that after each sensor check there is enough room for another control command |
Unfortunately, the component cannot execute multiple commands asynchronously to obtain the device status. |
There are two different things.
|
Just checked last master, reading "walking pad mode" now works but writing doesn't |
Changelog says WalkingPad is supported, but when I add it with ip and token (whenever I enable cloud or not) I just get one sensor and it's not available. At the same time WalkingPad does respond to network requests
The text was updated successfully, but these errors were encountered: