Xiaomi Mi Air Purifier (Xiaomi Mi IO)

It is not something that is configurable.
The above mail has the link to the change I made in the program to make it happen.
It is incorporated now in the 3.0 build, and I also requested it to be incorporated in the 2.5.x build. As a release is about to be created, maybe it will still be incorporated.

After placing my xiaomi 2S in an IOT vlan, openhab does not see the device anymore. Is there anything I need to change in my router(pfsense) that will enable this?

Unfortunately Xiaomi devices refuse commands from outside the subnet. Some still allow discovery, but no commands.

On the mihome app it still works as it will send the commands via the cloud to the devices on the other clan in this scenario

Bummer…is there any known workarounds for this? I would rather have my IOT devices in their own seprate vlan from my home vlan

I have the same issue with Sonos devices and multicast. Still wondering if there is a pfsense solution for it

Maybe if you add a network adaptor in the vlan with your oh server? Maybe that will work.

@druciak maybe already tried this?

I had the same problem… My solution was to temporary assign the access point to my internal VLAN where I run my OH-instance in order to setup the WiFi-connection. After setup, I switched the access point back to the IoT-VLAN… This way you won’t lose the generated key (due to wifi-reset)…

I also setup a firewall rule which allows communication between OH and the IoT-VLAN… Another approach would be (as @marcel_verpaalen suggested) to add a network adaptor on your OH-instance and assign it to your VLAN…

I am totally confused.
How does attaching a network adapter for the vlan work?

BTW, my OH is a docker container residing in ubuntu server VM in esxi. my MQTT, node red, frontail, influxdb etc are all docker containers as well. Not sure if this info is important.

You will need to create a virtual network interface:

For docker I’m not quite sure how this works but I guess it’s called macvlan - something like:

docker network create -d macvlan
–subnet=10.0.10.0/24 --gateway=10.0.10.1
-o parent=eth0.10
macvlan10

If you run your OH container as “host” network you don’t need to do anything, your vlan adapter should be visible from the container.

Yes I did and it worked. But it does not satisfy my needs.

Interesting… Is there any other communication between OH and Air Purifier that must be done in the same network (to initialize connection)? When I removed VLAN adapter from the system it stopped working again regardless it worked before. The problem is that there is no response from the device even though it was properly discovered and initialized. When the requests come from an other network the device stops responding. That’s my experience however it used to work some time ago and I am wondering why it is not working now.

The only additional setting I did was to choose the interface in PaperUi system settings as by default OH seems to only work with /24 and therefore it might be the wrong broadcast address if your network is other than /24…

But whenever you reset your wifi connection on your device you have to run through the whole process again…

When I did my setup, the AP was in the same VLAN as my OH instance… I added the device in the app and then ran a discover within OH… After you switch back the AP to the other VLAN, you might also need to change the IP accordingly within the thing-settings as you normally have a different ip address range in your VLANs (my best practice: All my IoT devices are getting static IPs via DHCP… This way you have a better overview of all your connected devices)

So you have definitely different issue. Your device cannot be discovered when is not in the same network. Likely you don’t have mDNS reflector/repeater. My issue is that the device can be discovered, but for some reason it does not reply to OH requests. When I move this WiFi network to OH vlan it starts talking, but moving back to other vlan puts the thing offline.

Hello All

I have OpenHAB 2.5 and Xiaomi Mi IO binding (installed from Paper OU)
I have successfully connected Xiaomi Air Purifier to openhab - works well except temperature data.
It show value which is not true

3
23.1
3
23.1
1
23.1
22.6
23.1
2
23.1
2
23.1
8
23.1
8
23.1

I use influxdb and Grafana and chart looks strange

Does someone where can be an issue? Temperature sensor itself?
No issue with Humidity or PM2.5

UPD.
This I saw in the logs

Seems all data from Xiaomi is mixed

looks like either the binding or the device sometimes mixes up the data.
If you have a debug log of when this is happening I can take a look who to blame :wink:
Also which specific model do you have (the model as it can be seen in OH) as there are plenty

Hello,

i have zhimi.airpurifier.mb3

In DEBUG mode i see correct data from Xiaomi (Filtered by “temperature”)

Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}], fullresponse: {“id”:310,“result”:[{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}]}
2020-11-04 10:02:42.175 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:339,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 6)
2020-11-04 10:02:44.063 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}], fullresponse: {“id”:339,“result”:[{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}]}
2020-11-04 10:03:12.263 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:367,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 6)
2020-11-04 10:03:14.085 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}], fullresponse: {“id”:367,“result”:[{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}]}
2020-11-04 10:03:42.366 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:396,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 6)
2020-11-04 10:03:44.464 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}], fullresponse: {“id”:396,“result”:[{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}]}
2020-11-04 10:04:12.461 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:424,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 6)
2020-11-04 10:04:14.186 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}], fullresponse: {“id”:424,“result”:[{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}]}
2020-11-04 10:04:42.578 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:453,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 4)
2020-11-04 10:04:44.382 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}], fullresponse: {“id”:453,“result”:[{“did”:“temperature”,“siid”:3,“piid”:8,“code”:0,“value”:22.600000},{“did”:“filter-life-level”,“siid”:4,“piid”:3,“code”:0,“value”:95}]}
2020-11-04 10:05:12.681 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:481,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 6)

But next message is quite strange

2020-11-04 10:25:46.791 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1645,“method”:“get_properties”,“params”:[{“did”:“fault”,“siid”:2,“piid”:1},{“did”:“on”,“siid”:2,“piid”:2}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 1)
2020-11-04 10:25:46.795 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1646,“method”:“get_properties”,“params”:[{“did”:“fan-level”,“siid”:2,“piid”:4},{“did”:“mode”,“siid”:2,“piid”:5}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 2)
2020-11-04 10:25:46.798 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1647,“method”:“get_properties”,“params”:[{“did”:“firmware-revision”,“siid”:1,“piid”:4},{“did”:“manufacturer”,“siid”:1,“piid”:1}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 3)
2020-11-04 10:25:46.801 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1648,“method”:“get_properties”,“params”:[{“did”:“model”,“siid”:1,“piid”:2},{“did”:“serial-number”,“siid”:1,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 4)
2020-11-04 10:25:46.805 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1649,“method”:“get_properties”,“params”:[{“did”:“pm2.5-density”,“siid”:3,“piid”:6},{“did”:“relative-humidity”,“siid”:3,“piid”:7}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 5)
2020-11-04 10:25:46.809 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1650,“method”:“get_properties”,“params”:[{“did”:“temperature”,“siid”:3,“piid”:8},{“did”:“filter-life-level”,“siid”:4,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 6)
2020-11-04 10:25:46.812 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1651,“method”:“get_properties”,“params”:[{“did”:“filter-used-time”,“siid”:4,“piid”:5},{“did”:“alarm”,“siid”:5,“piid”:1}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 7)
2020-11-04 10:25:46.816 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1652,“method”:“get_properties”,“params”:[{“did”:“brightness”,“siid”:6,“piid”:1},{“did”:“on1”,“siid”:6,“piid”:6}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 8)
2020-11-04 10:25:46.819 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1653,“method”:“get_properties”,“params”:[{“did”:“physical-controls-locked”,“siid”:7,“piid”:1},{“did”:“button-pressed”,“siid”:8,“piid”:1}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 9)
2020-11-04 10:25:46.822 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1654,“method”:“get_properties”,“params”:[{“did”:“filter-max-time”,“siid”:9,“piid”:1},{“did”:“filter-hour-debug”,“siid”:9,“piid”:2}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 10)
2020-11-04 10:25:46.826 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1655,“method”:“get_properties”,“params”:[{“did”:“motor-strong”,“siid”:10,“piid”:1},{“did”:“motor-high”,“siid”:10,“piid”:2}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 11)
2020-11-04 10:25:46.829 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1656,“method”:“get_properties”,“params”:[{“did”:“motor-med”,“siid”:10,“piid”:3},{“did”:“motor-med-l”,“siid”:10,“piid”:4}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 11)
2020-11-04 10:25:46.831 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“country-code”,“siid”:15,“piid”:11,“code”:0,“value”:44}], fullresponse: {“id”:1643,“result”:[{“did”:“country-code”,“siid”:15,“piid”:11,“code”:0,“value”:44}]}
2020-11-04 10:25:46.832 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1657,“method”:“get_properties”,“params”:[{“did”:“motor-low”,“siid”:10,“piid”:5},{“did”:“motor-silent”,“siid”:10,“piid”:6}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 12)
2020-11-04 10:25:46.835 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1658,“method”:“get_properties”,“params”:[{“did”:“motor-favorite”,“siid”:10,“piid”:7},{“did”:“motor-speed”,“siid”:10,“piid”:8}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 13)
2020-11-04 10:25:46.835 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Unexpected size different. Request size 2, response size 1. (Req: [{“did”:“fault”,“siid”:2,“piid”:1},{“did”:“on”,“siid”:2,“piid”:2}], Resp:[{“did”:“country-code”,“siid”:15,“piid”:11,“code”:0,“value”:44}])
2020-11-04 10:25:46.838 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1659,“method”:“get_properties”,“params”:[{“did”:“motor-set-speed”,“siid”:10,“piid”:9},{“did”:“favorite-fan-level”,“siid”:10,“piid”:10}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 13)
2020-11-04 10:25:46.841 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1660,“method”:“get_properties”,“params”:[{“did”:“use-time”,“siid”:12,“piid”:1},{“did”:“purify-volume”,“siid”:13,“piid”:1}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 14)
2020-11-04 10:25:46.844 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1661,“method”:“get_properties”,“params”:[{“did”:“average-aqi”,“siid”:13,“piid”:2},{“did”:“average-aqi-cnt”,“siid”:13,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 15)
2020-11-04 10:25:46.847 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1662,“method”:“get_properties”,“params”:[{“did”:“aqi-zone”,“siid”:13,“piid”:4},{“did”:“sensor-state”,“siid”:13,“piid”:5}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 16)
2020-11-04 10:25:46.850 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1663,“method”:“get_properties”,“params”:[{“did”:“aqi-goodh”,“siid”:13,“piid”:6},{“did”:“aqi-runstate”,“siid”:13,“piid”:7}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 17)
2020-11-04 10:25:46.853 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1664,“method”:“get_properties”,“params”:[{“did”:“aqi-state”,“siid”:13,“piid”:8},{“did”:“aqi-updata-heartbeat”,“siid”:13,“piid”:9}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 18)
2020-11-04 10:25:46.855 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1665,“method”:“get_properties”,“params”:[{“did”:“rfid-tag”,“siid”:14,“piid”:1},{“did”:“rfid-factory-id”,“siid”:14,“piid”:2}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 19)
2020-11-04 10:25:46.858 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1666,“method”:“get_properties”,“params”:[{“did”:“rfid-product-id”,“siid”:14,“piid”:3},{“did”:“rfid-time”,“siid”:14,“piid”:4}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 20)
2020-11-04 10:25:46.860 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1667,“method”:“get_properties”,“params”:[{“did”:“rfid-serial-num”,“siid”:14,“piid”:5},{“did”:“app-extra”,“siid”:15,“piid”:1}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 21)
2020-11-04 10:25:46.863 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1668,“method”:“get_properties”,“params”:[{“did”:“main-channel”,“siid”:15,“piid”:2},{“did”:“slave-channel”,“siid”:15,“piid”:3}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 22)
2020-11-04 10:25:46.866 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1669,“method”:“get_properties”,“params”:[{“did”:“cola”,“siid”:15,“piid”:4},{“did”:“buttom-door”,“siid”:15,“piid”:5}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 23)
2020-11-04 10:25:46.869 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1670,“method”:“get_properties”,“params”:[{“did”:“reboot-cause”,“siid”:15,“piid”:6},{“did”:“hw-version”,“siid”:15,“piid”:8}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 24)
2020-11-04 10:25:46.871 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1671,“method”:“get_properties”,“params”:[{“did”:“iic-error-count”,“siid”:15,“piid”:9},{“did”:“manual-level”,“siid”:15,“piid”:10}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 25)
2020-11-04 10:25:46.874 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:1672,“method”:“get_properties”,“params”:[{“did”:“country-code”,“siid”:15,“piid”:11}]} → 192.168.0.28 (Device: 10245C99 token: FD4ACCE8XXXXXXXXXXXXXXXXE7F0294E Queue: 26)
2020-11-04 10:25:47.356 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“fault”,“siid”:2,“piid”:1,“code”:0,“value”:0},{“did”:“on”,“siid”:2,“piid”:2,“code”:0,“value”:true}], fullresponse: {“id”:1645,“result”:[{“did”:“fault”,“siid”:2,“piid”:1,“code”:0,“value”:0},{“did”:“on”,“siid”:2,“piid”:2,“code”:0,“value”:true}]}
2020-11-04 10:25:47.359 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Error updating miio:generic:10245C99 property Mode with ‘true’ : java.lang.NumberFormatException: null
2020-11-04 10:25:47.676 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“fan-level”,“siid”:2,“piid”:4,“code”:0,“value”:1},{“did”:“mode”,“siid”:2,“piid”:5,“code”:0,“value”:0}], fullresponse: {“id”:1646,“result”:[{“did”:“fan-level”,“siid”:2,“piid”:4,“code”:0,“value”:1},{“did”:“mode”,“siid”:2,“piid”:5,“code”:0,“value”:0}]}
2020-11-04 10:25:48.024 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“firmware-revision”,“siid”:1,“piid”:4,“code”:-4001},{“did”:“manufacturer”,“siid”:1,“piid”:1,“code”:-4001}], fullresponse: {“id”:1647,“result”:[{“did”:“firmware-revision”,“siid”:1,“piid”:4,“code”:-4001},{“did”:“manufacturer”,“siid”:1,“piid”:1,“code”:-4001}]}
2020-11-04 10:25:48.027 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Error updating miio:generic:10245C99 property Model with ‘null’ : java.lang.NullPointerException: null
2020-11-04 10:25:48.031 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Error updating miio:generic:10245C99 property SerialNumber with ‘null’ : java.lang.NullPointerException: null
2020-11-04 10:25:48.315 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“model”,“siid”:1,“piid”:2,“code”:-4001},{“did”:“serial-number”,“siid”:1,“piid”:3,“code”:-4001}], fullresponse: {“id”:1648,“result”:[{“did”:“model”,“siid”:1,“piid”:2,“code”:-4001},{“did”:“serial-number”,“siid”:1,“piid”:3,“code”:-4001}]}
2020-11-04 10:25:48.319 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Error updating miio:generic:10245C99 property Pm25Density with ‘null’ : java.lang.NullPointerException: null
2020-11-04 10:25:48.322 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Error updating miio:generic:10245C99 property RelativeHumidity with ‘null’ : java.lang.NullPointerException: null
2020-11-04 10:25:48.597 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 10245C99 type: GET_PROPERTIES, result: [{“did”:“pm2.5-density”,“siid”:3,“piid”:6,“code”:0,“value”:1},{“did”:“relative-humidity”,“siid”:3,“piid”:7,“code”:0,“value”:57}], fullresponse: {“id”:1649,“result”:[{“did”:“pm2.5-density”,“siid”:3,“piid”:6,“code”:0,“value”:1},{“did”:“relative-humidity”,“siid”:3,“piid”:7,“code”:0,“value”:57}]}
2020-11-04 10:25:48.612 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 1.0. Returning min value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@1f46dcf
==> /var/log/openhab2/events.log <==
2020-11-04 10:25:48.612 [vent.ItemStateChangedEvent] - Temperature changed from 22.600000 to 1

Seems data from Xiaomi is OK. Where could be an issue?

2020-11-04 10:25:48.612 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 1.0. Returning min value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@1f46dcf
2020-11-04 10:25:48.612 [vent.ItemStateChangedEvent] - Temperature changed from 22.600000 to 1

This is indeed very strange. I don’t recall using any of that library in the binding. It appears some homekit component. Do you maybe have the item also connected to another binding/connection?

I see some more odd updates in the log. I’ll create an updated json file for you to test which will remove some of the non-working properties (like manufacturer, firmware etc) and request single property at the time instead of 2, as that is maybe causing the mix-up)

What was your specific model?

Model is Mi Air Purifier 3 - zhimi.airpurifier.mb3
I installed binding from Paper UI

Should i try to remove binding from Paper UI and install org.openhab.binding.miio-2.3.0-SNAPSHOT.jar ?

Or should i use this link to the latest version https://drive.google.com/file/d/1Y1XkBPVfnWHqp8IsjLjc-oinY2RVtaPs/view

Old versions (2.3.0): No, that won’t work. The model is only recently added. Best is to use latest (snapshot) version of the binding 2.5.11-snapshot, can be updated from the paperUI.
I don’t know the google drive one.

Here is the file that is slightly modified from the original. Note as it has tons of different properties, you may want to put the unused ones to refresh: false

zhimi.airpurifier.mb3-miot.json (14.2 KB)

see binding readme on where to put this file. hint: conf/misc/miio

Thank you,

I have openhabian and I could not find conf/misc/miio. Where i should save a json?

Did you load at the readme? You need to create part of the path yourself.
If it is really on a different location, you can enable debug logging and restart the binding.
At the startup it will give a message like " “Started miio basic devices local databases watch service. Watching for database files at path: …”

Hey,

I saved json filed, but no results - still the same…