spongioblast / node-red-contrib-local-mihome

Node Red nodes to get data from and send commands to devices connected to the local network using
GNU General Public License v3.0
1 stars 3 forks source link

SendCommand node for MIIO local devices #3

Open stason325 opened 2 years ago

stason325 commented 2 years ago

It seems like sendcommand node doesn't send any commands via miioProtocol at current version.

Are there any plans in the nearest future to update the code of that node so it could send any commands?

spongioblast commented 2 years ago

I'll have a look next week

spongioblast commented 2 years ago

I don't see any update of the node-mihome base since over a year. It seems to work fine for me and by the looks of it for many others currently using the library. Could you elaborate? What do you see in the console log? Are you sure you have the right access token? (Extracting it from the cloud doesn't seem to work for local applications, see guide linked to in readme)

stason325 commented 2 years ago

Everything ok with token. What I meant is that in your sendcommand node you are using miotSetProperty (line 32) and it works not for all devices. For example my humidifier (mjjsq) receives set-commands through miioCall. So using your set node for my humidifier I got warn with exception, that the device wasn't configured correctly...something like that.

Inspired by your nodes I wrote mine, having rewrite logic and interface a bit. Please see how I did it there, maybe it could be useful for you. https://github.com/stason325/node-red-contrib-miio-localdevices/blob/master/nodes/MIIOsendcommand.js