One more question from my side, is it discoverable through mDNS (does avahi-browse -a , avahi-browse -ar to see the IPs) too?
$ avahi-browse -ar
...
+ wlan0 IPv4 lumi-gateway-v3_miio522xxxxx _miio._udp local
...
= wlan0 IPv4 lumi-gateway-v3_miio522xxxxx _miio._udp local
hostname = [lumi-gateway-v3_miio522xxxxx.local]
address = [192.168.130.xxx]
port = [54321]
txt = ["mac=286c07xxxxxx" "epoch=1"]
...
You are right. We can discover the gateway by netdisco.
Yeah, I thought it was done already, does not really help with detecting those devices not used through the gateway, where the output from the discovery could be useful
Iâm sorry. I mixed up the two threads Iâm following. Please ignore my post. The Xiaomi Gateway + sub devices arenât comparable with WiFi plugs / strips and the vacuum clean IMHO. The discovery is different.
Can you or somebody else provide the response of
miio --control 192.168.x.y --method get_prop --params "['power', 'aqi', 'humidity', 'temp_dec', 'mode', 'led', 'led_b', 'buzzer', 'child_lock', 'limit_hum', 'trans_level', 'bright', 'favorite_level', 'filter1_life', 'act_det', 'f1_hour_used', 'use_time', 'motor1_speed']"
Please specify the version/type of your device also.
The result is like below.
Be careful for the single and double quotation
command >
miio --control 192.168.0.15 --method get_prop --params â[âpowerâ,âaqiâ,âhumidityâ,âtemp_decâ,âmodeâ,âledâ,âled_bâ,âbuzzerâ,âchild_lockâ,âlimit_humâ,âtrans_levelâ,âbrightâ,âfavorite_levelâ,âfilter1_lifeâ,âact_detâ,âf1_hour_usedâ,âuse_timeâ,âmotor1_speedâ]â)
Result>
[
âonâ,
41,
62,
293,
âautoâ,
âonâ,
null,
null,
âoffâ,
null,
null,
161,
17,
77,
null,
771
]
Thanks a lot! Can you provide the model name and devtype (see above) of your device?
Can you verify the output a second time? The get_prop requests 18 properties. Your reponse contains 16 properties. Maybe itâs necessary to split up the request in two parts?
miio --control 192.168.0.15 --method get_prop --params '["power","aqi","humidity","temp_dec","mode","led","led_b","buzzer","child_lock"]')
miio --control 192.168.0.15 --method get_prop --params '["limit_hum","trans_level","bright","favorite_level","filter1_life","act_det","f1_hour_used","use_time","motor1_speed"]')
Model : Mi Air Pro
I will response the next result after a few hours⌠I am working now
One more task for tonight: Can you report the supported modes of your Air Purifier Pro?
miio --control 192.168.0.15 --method set_mode --params '["auto"]')
miio --control 192.168.0.15 --method set_mode --params '["silent"]')
miio --control 192.168.0.15 --method set_mode --params '["favorite"]')
miio --control 192.168.0.15 --method set_mode --params '["medium"]')
miio --control 192.168.0.15 --method set_mode --params '["high"]')
miio --control 192.168.0.15 --method set_mode --params '["strong"]')
miio --control 192.168.0.15 --method set_mode --params '["idle"]')
Thanks!
See the below
pi@Tommy:~ $ miio --control 192.168.0.15 --method get_prop --params â[âpowerâ,âaqiâ,âhumidityâ,âtemp_decâ,âmodeâ,âledâ,âled_bâ,âbuzzerâ,âchild_lockâ]â
INFO Attempting to control 192.168.0.15
INFO Got result:
[
âoffâ,
45,
63,
298,
âautoâ,
âonâ,
null,
null,
âoffâ
]
pi@Tommy:~ $ miio --control 192.168.0.15 --method get_prop --params â[âlimit_humâ,âtrans_levelâ,âbrightâ,âfavorite_levelâ,âfilter1_lifeâ,âact_detâ,âf1_hour_usedâ,âuse_timeâ,âmotor1_speedâ]â
INFO Attempting to control 192.168.0.15
INFO Got result:
[
null,
null,
71,
17,
77,
null,
771,
2776200,
0
]
I am using the auto, silent, favorite modes.
I will check the rest modes tonight.
It looks that just 3 modes works.
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âautoâ]â
INFO Attempting to control 192.168.0.15
INFO Got result:
[
âokâ
]
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âsilentâ]â INFO Attempting to control 192.168.0.15
INFO Got result:
[
âokâ
]
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âfavoriteâ ]â
INFO Attempting to control 192.168.0.15
INFO Got result:
[
âokâ
]
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âmediumâ]â
INFO Attempting to control 192.168.0.15
ERROR Encountered an error while controlling device
Error was:
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âhighâ]â
INFO Attempting to control 192.168.0.15
ERROR Encountered an error while controlling device
Error was:
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âstrongâ]â
INFO Attempting to control 192.168.0.15
ERROR Encountered an error while controlling device
Error was:
pi@Tommy:~ $ miio --control 192.168.0.15 --method set_mode --params â[âidleâ]â
INFO Attempting to control 192.168.0.15
ERROR Encountered an error while controlling device
Error was:
pi@Tommy:~ $
Thanks! The last missing piece of the puzzle is the devtype (a number which will be shown on discovery). May be you have to enable the debug mode first or change the line from _LOGGER.debug to _LOGGER.info or _LOGGER.warning.
_LOGGER.debug("Discovered %s %s with ts: %s" % (self._devtype,
self._serial,
self._device_ts))
Apparently there were other modes exposed at some point which are not anymore available: https://github.com/aholstenson/miio/issues/13
I have removed the unsupported modes.
No. The new component is about the xiaomi gateway (zigbee) and sub devices (sensors & actors). The devices (air purifier & wifi plug != zigbee plug) mentioned here are WiFi devices and wonât official supported right now.
@syssi, wouldnât it make sense (or wouldnât it be possible) to merge support of both lines of Xiaomi products, Zigbee and non-Zigbee, in a common component? Here weâre talking about air purifier and sockets, but there are others that are only WiFi: IR remote, Vacuum robot, etcâŚ
@syssi, wouldnât it make sense (or wouldnât it be possible) to merge support of both lines of Xiaomi products, Zigbee and non-Zigbee, in a common component? Here weâre talking about air purifier and sockets, but there are others that are only WiFi: IR remote, Vacuum robot, etcâŚ
Letâs assume both devices (xiaomi gateway and f.e. the air purifier) has nothing in common. Do you still want to merge both lines?