stason325 / node-red-contrib-miio-localdevices

Nodes for controlling MIIO devices via node-mihome lib. List of devices and commands to be extended.
GNU General Public License v3.0
17 stars 7 forks source link

Cannot set mode on zhimi.airpurifier.v7 #21

Open Tazintosh opened 1 year ago

Tazintosh commented 1 year ago

Hi @stason325

I'm trying to setup my second purifier (zhimi.airpurifier.v7 this time). I cannot achieve to get it in Auto mode. I'm trying to inject various values into a Custom JSON Command and none of the following are working:

msg.payload.Mode = 0 msg.payload.Mode = "0" msg.payload.Mode = "auto" msg.payload.Mode = "Auto"

(the definition is installed: ~/.node-red/node_modules/node-mihome/lib/devices/zhimi.airpurifier.v7.js) Any idea?

Similarly, I can see on this zhimi.airpurifier.v7.js file that the temperature should be divided by 10, but log attached to the getData node give x10 result.

stason325 commented 1 year ago

Hi, I haven't tested that one. Support came from node-mihome lib by default.

I can propose that you need to kick it with miio (https://github.com/aholstenson/miio/blob/master/docs/protocol.md) or python miio (https://github.com/rytilahti/python-miio) using miiocli tool.

Please test all the commands and based on your result I will update devices.md description and defFile if needed.

Here is link to official specs - it could be helpful: https://home.miot-spec.com/spec/zhimi.airpurifier.v7

Tazintosh commented 1 year ago

Hi @stason325, I've not been able to test again any of those, but what I'm sure is that more than 1 year ago, I used to have python-miio, and my v7 was working back then. But I wanted to switch because it was absolutely no friendly to use.

stason325 commented 1 year ago

Hello, I hear you and agree that python miio is not always friendly in terms of using it in Nodered. But those two (miio and python miio) are pretty good for testing, because the do have CLIs. If it is not possible to test the device (certain properties or commands) through my nodes you always need CLI third party CLI to understand what is wrong and adjust it.

As for my nodes they are just sort of a open source free wrapper for node-mihome lib. Friendly and easy-to-use wrapper, but still a wrapper.

It means that basically support for various devices comes by default together with lib. On the other hand list of supported devices and peculiarities of support of some devices can be improved as a result of end users' tests.

I can hardly help you here more than advising something from the specs. I don't have that device and you do have it. You can ask other users who has this device btw.

It is common situation that mi-devices sometimes work not 100% according to the specs.

So, as a result of your tests I will be happy to update my nodes.

Regards