stas-demydiuk / ewpe-smart-mqtt

MQTT bridge for EWPE Smart powered devices
MIT License
64 stars 26 forks source link

UnhandledPromiseRejectionWarning: Error: Device f4911edfdf6f not found #16

Closed Aaron0621 closed 3 years ago

Aaron0621 commented 4 years ago

Hi there! Today in the morning my AC wouldn't react to the flows I set up in Node-red, so started to look around what's happened. I got this message running npm start: UnhandledPromiseRejectionWarning: Error: Device f4911edfdf6f not found at DeviceManager.setDeviceState (/home/pi/ewpe-smart-mqtt/app/device_manager.js:82:19) at MqttClient. (/home/pi/ewpe-smart-mqtt/index.js:72:59) at MqttClient.emit (events.js:315:20) at MqttClient._handlePublish (/home/pi/ewpe-smart-mqtt/node_modules/mqtt/lib/client.js:1162:12) at MqttClient._handlePacket (/home/pi/ewpe-smart-mqtt/node_modules/mqtt/lib/client.js:351:12) at work (/home/pi/ewpe-smart-mqtt/node_modules/mqtt/lib/client.js:283:12) at processTicksAndRejections (internal/process/task_queues.js:79:11) (node:1335) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:1335) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 2020-08-01T08:20:26.130Z [info]: MQTT message received: ewpe-smart/devices []

Have no idea what happened, everything was fine yesterday at midnight (when I set up a flow to turn it off). This morning, nothing works.

Restarted node-red, rewrited index.js for this module, rewrited scanning ip from .255 to the AC's ip, .28 .... nothing. Can you help me please?

Thanks you

Aaron0621 commented 4 years ago

Ohh and another thing, my phone app (EWPE) doesn't seem to be able to connect to the AC once I start the command "npm start" for this node...the app only sees the unit again, if I readd it - mode+wifi buttons on remote, plugoff plugin, connect the ac to the router again...

Aaron0621 commented 4 years ago

Ok guys, seems like I have found the root of the problem....

Its not the bridge app, its not this github app to communicate with the gree-like wifi module-d ACs...

It's the effing "you can only start to control this AC IF you effing register an account on effing EWPE app on effing EWPE cloud with your email, where you wont even get a "hello to EWPE cloud" email...

Somehow, my wifi unit my AC stopped contacting with that "european server" I chose when I "registered" (btw, wtf are they doing with my data??? no service, but you have to register...)

I tried to reconfigure my effing router from 0 (AsusMerlin, had a lot of conf....), tried to move the router much closer (maybe it disconnects a lot) etc.

But when I tried to setup the AC again, it couldnt see the AC...I saw in my routers log, that the AC succesfully connects to it, but my phone app didn't pick it up...

After a long time, i figured, to make another "ACCOUNT", but on a different "server" from where I really live...

Low and behold, here comes The Greatest White Gandalf, and wusshh, it registers within seconds,_"npm start", then no more "memory leak" or anything...

So this problem has to do something with the wifi module registering (or just tries to, or the actual server rejects it for some reason etc) itself on this effing "ewpe cloud"...

My God, help these people...