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

viomi.heater.vxtj01 support #889

Closed
aalbul opened this issue Dec 13, 2020 · 4 comments · Fixed by #1581
Closed

viomi.heater.vxtj01 support #889

aalbul opened this issue Dec 13, 2020 · 4 comments · Fixed by #1581

Comments

@aalbul
Copy link

aalbul commented Dec 13, 2020

Before submitting a new request, use the search to see if there is an existing issue for the device.

Device information:

Use miiocli device --ip <ip address> --token <token> info.

  • Model: viomi.heater.vxtj01
  • Hardware version: esp8266
  • Firmware version: 2.1.0

Additional context

I am a 'happy' owner of this device. I spent some time today trying to make it work with miiocli, but every time I execute:

miiocli device --ip 192.168.2.190 --token a405643e7dffd6a6xxxxxxxx00 raw_command get_prop

i'm getting:

Error: {'code': -9998, 'message': 'user ack invalid'}

I think it is not related to the token, because if I change it a bit (say changing last 0 to 1) then I cannot even get info about the device.

I Will be happy to follow your instructions/ideas and help to add its support to this beautiful tool.

P.S.: Spec can be found here: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:heater:0000A01A:viomi-vxtj01:1 (leaving it here for myself mainly :))

@rezmus
Copy link

rezmus commented Dec 13, 2020

use miot commands according to spec json.

@aalbul
Copy link
Author

aalbul commented Dec 13, 2020

Unfortunately, i didn't manage to find the way how to do that :(
Could you please point me in the right direction by giving some example?

@IhorSyerkov
Copy link
Contributor

IhorSyerkov commented Dec 14, 2020

miiocli device --ip <ip> --token <token> raw_command get_prop '[{ "did": "comand_name", "siid": 1, "piid": 1, "code": 0}]'
siid == service.iid
piid == property.iid
if you want to set value use
miiocli device --ip <ip> --token <token> raw_command set_prop '[{ "did": "comand_name", "siid": 1, "piid": 1, "value": <value_to_set>, "code": 0}]'

For ex. in your case

miiocli device --ip <ip> --token <token> raw_command get_prop '[{ "did": "comand_name", "siid": 2, "piid": 1, "code": 0}]' returns you status of heater (True/False) on/off

miiocli device --ip <ip> --token <token> raw_command set_prop '[{ "did": "comand_name", "siid": 2, "piid": 1, "code": 0, value: True}]' will turn on heater

P.S. Will add it to the docs

@IhorSyerkov
Copy link
Contributor

Or take a look in python-miio/miio/heater.py file there common properties for heater, maybe it will work you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants