Open MPowerData opened 5 months ago
Hello @MPowerData
I just tried on my own configuration : i have no issue
In order to answer to request, I also tried with "postman" the following request
what do you get with the following command (if you are able to do it)
curl --location 'https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin' \ --data-raw ' { "Email":"youremail@yourdomain.com", "Password":"yourpassword", "AppVersion":"1.22.7.0", "Persist":false, "CaptchaResponse":null }'
Hmm, interesting. When executing the curl command with my own credentials, I get:
404 - File or directory not found.
Am I doing something wrong?
Maybe you can try without the \ just before --data-raw, on 1 line command
curl --location 'https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin' --data-raw ' { "Email":"youremail@yourdomain.com", "Password":"yourpassword", "AppVersion":"1.22.7.0", "Persist":false, "CaptchaResponse":null }'
I got
ysimonx@MacBook-Air-M1 ~ % curl --location 'https://app.melcloud.com/Mitsubishi.Wifi.Client/Login/ClientLogin' --data-raw ' { "Email":"youremail@yourdomain.com", "Password":"yourpassword", "AppVersion":"1.22.7.0", "Persist":false, "CaptchaResponse":null }' {"ErrorId":1,"ErrorMessage":null,"LoginStatus":0,"UserId":0,"RandomKey":null,"AppVersionAnnouncement":null,"LoginData":null,"ListPendingInvite":null,"ListOwnershipChangeRequest":null,"ListPendingAnnouncement":null,"LoginMinutes":0,"LoginAttempts":0,"EnableRegistration":true,"EnableEditStructure":true,"EnableFrostProtection":true,"EnableHolidayMode":true,"EnableTimer":true,"EnableScenes":true,"EnableInviteNewGuests":true,"EnableManageGuestAccess":true,"EnableControlOfGuestDevices":true}%
Yeah, that's better. :-)
{"ErrorId":1,"ErrorMessage":null,"LoginStatus":0,"UserId":0,"RandomKey":null,"AppVersionAnnouncement":null,"LoginData":null,"ListPendingInvite":null,"ListOwnershipChangeRequest":null,"ListPendingAn nouncement":null,"LoginMinutes":0,"LoginAttempts":0,"EnableRegistration":true,"EnableEditStructure":true,"EnableFrostProtection":true,"EnableHolidayMode":true,"EnableTimer":true,"EnableScenes":true ,"EnableInviteNewGuests":true,"EnableManageGuestAccess":true,"EnableControlOfGuestDevices":true}
ok
So, I do not understand the reason why the node-red module is not able to scrap data with this json error
did you upgrade something on your server (like npm, node or something else ?)
Same here, I've not changed something on the raspi
Hello,
Same problem in my config.
ok
So, I do not understand the reason why the node-red module is not able to scrap data with this json error
did you upgrade something on your server (like npm, node or something else ?)
No, nothing changed in my setup.
@MPowerData @romainlataye @iontichy123
Can you give me some informations about your setup please ? linux ? docker ? node version ?
@MPowerData @romainlataye @iontichy123 I managed to have the same result It seem that melcloud is denying access after some requests
give me some times to find a solution
@MPowerData @romainlataye @iontichy123
Melcloud just changed that
Hmmm, that could very well be the issue. I check the status every 5 minutes, but will need to adjust then,
Curious what the new limits are.
Unfortunatelly, I have the same issue here:
Update: the guys from HomeAssitent seem to deal with the same issue: https://github.com/home-assistant/core/issues/109728
Yup, same here. I'll try to set a longer timeout, was fetching temps each minute
I just tried to update the node-red module extension to version 1.5.0 in order to avoid login each time and retains ContextKey http header between each request ... not sure it will be better
Yup, same here. I'll try to set a longer timeout, was fetching temps each minute
I tried 2 minutes, it seems to be good
I just tried to update the node-red module extension to version 1.5.0 in order to avoid login each time and retains ContextKey http header between each request ... not sure it will be better
I was just going to say this, I was already logged in to melcloud in another browser and that worked fine, so the fetch request does not seem to be blocked, just the login. I'll see if i can figure out how to get the update, that was a good solution that should help one would think :)
EDIT:oh it was there in the pallette already. 1.5.0 let's give it a go :P Excellent work @ysimonx
EDIT2: I just need to wait now to get unblocked - i changed the polling interval to 24 hours for now, hope I get let in tomorrow
What happens if context key times out server side? Will this force a new login from the node?
Hi @OverWorldD @tinoetzold @iontichy123 @MPowerData @romainlataye
I just published a 1.6.0 version of the extension palette for node-red-contrib-melcloud
As you can see, I now return in msg.context the famous ContextKey needed each time you want to scrap data from Melcloud
I managed to find a way to keep this data between each call
It should be reset when it expires (@OverWorldD )
Hope it will be better
regards to everyone
Hi @OverWorldD @tinoetzold @iontichy123 @MPowerData @romainlataye it seems to be good with the last update 1.6.0 of this palette module extension. can you test please ?
Thanks to @ysimonx for your effort, it is highly appreciated! Will do a test when I return home in the afternoon!
Hi @OverWorldD @tinoetzold @iontichy123 @MPowerData @romainlataye it seems to be good with the last update 1.6.0 of this palette module extension. can you test please ?
I'll test! 1.5.0 got me locked out again after running requests every 2 minutes
They are blocking everyone that uses polling too often. At first (before 5th) I were using 30 seconds polling without issues (for more than a year I guess). Then I was unbanned and tried with 1 minute polling, still banned after a while. Now I'm using 15 minutes and since yesterday it seems to ben working fine. I'm still on version 1.4.x.
Is there anything relevant on this new version?
Is there anything relevant on this new version?
Yes @miguelpruivo : with the 1.6.0 version, i can pull each minute and more
@ysimonx but the polling was being done in my side (with a repeat inject node) isn't that the right way? I don't see any polling config in the melcloud node.
@ysimonx but the polling was being done in my side (with a repeat inject node) isn't that the right way?
yes, you will be able to change your inject node with the frequency you want
@ysimonx but the polling was being done in my side (with a repeat inject node) isn't that the right way?
yes, you will be able to change your inject node with the frequency you want
Yes, but that was what I've been using ever since. My question is: what does 1.5.0 and 1.6.0 change.
Thank you @ysimonx , I am gonna try every 5 minutes again...
@miguelpruivo
My question is: what does 1.5.0 and 1.6.0 change.
I had to fix another time the process in charge of keeping the ContextKey given by the login process
Still locked out after a couple of hours ((since about 11:30, it's 16:25 here now) even though I shut down the timestamp trigger nodes. Anyone know how long the lockout is?
Edit, was back in at around 18 so looks like 6 hours or so
Hi @OverWorldD @tinoetzold @iontichy123 @MPowerData @romainlataye it seems to be good with the last update 1.6.0 of this palette module extension. can you test please ?
Did some tests with the 1.6.0 version. On my end the "melcloud-connect" issue seems to be fixed, but I got temporary blocked with one of the five "melcloud-device" nodes I am using. Does your fix also apply for the "melcloud-device" node? I did some random switching stuff to see if it may fail again. Thx, Tino
thank you @tinoetzold I will do some additional tests with your comment
I'm getting the same [object,object] response from the device node in my flow when trying to write to melcloud. I only have one device node and the connect nodes work. Just to confirm the same symptoms here.
I just noticed that Melcloud for me does not update the inside temperature correctly. It seems stuck for me. Anyone else noticed this in the melcloud app? It's the same problem in the app, web, and the node-red node. Also the app seems to do strange refreshes every other second or three. It did not do this before. It feels like the melcloud team is updating something.
Hi @OverWorldD Yes, you're right Mitsubishi changed again the limit of scrapping values ...
I decided to create a new node "melcloud-context" : a specific node that will return a msg.ContextKey ... however, I have lots of job to do nowadays... not sure I will be able to fix all of this
Hi @OverWorldD Yes, you're right Mitsubishi changed again the limit of scrapping values ...
I decided to create a new node "melcloud-context" : a specific node that will return a msg.ContextKey ... however, I have lots of job to do nowadays... not sure I will be able to fix all of this
Thanks for your work! Would be great if you could fix this, but I understand that this is challenging. Found a (quite awful) workaround to deal with the device node: I created a guest accout for each of my 5 devices, so the commands are quite distributed and do not seem to trigger the MelCloud limits, since I set at least 7 Minutes between each command to be send. I also reduced the temperature scrapting to each 30 Minutes, since I have additional sensors where they are crucial.
My complain at the MelCloud technical service was not sucessful, they rely on safety issues and pointed to the possibility of using Google Home for automation (which I do not think is as powerful as Node-Red). But they said that there will be an a change to the API which will be announced by their marketing in the next time (I ask why they do not make their API safe in order to alllow third party apps the access).
Have a great day! Tino
Hello, sorry for hijacking the thread but just tried the postman pasted above and getting the following answer :
{ "ErrorId": 1, "ErrorMessage": null, "LoginStatus": 0, "UserId": 0, "RandomKey": null, "AppVersionAnnouncement": null, "LoginData": null, "ListPendingInvite": null, "ListOwnershipChangeRequest": null, "ListPendingAnnouncement": null, "LoginMinutes": 0, "LoginAttempts": 0, "EnableRegistration": true, "EnableEditStructure": true, "EnableFrostProtection": true, "EnableHolidayMode": true, "EnableTimer": true, "EnableScenes": true, "EnableInviteNewGuests": true, "EnableManageGuestAccess": true, "EnableControlOfGuestDevices": true }
Shouldn't LoginStatus be one and be getting a ContextKey?
Thanks in advance for helping
EDIT : Working now, I just had to remove a ' before around my Body :
{ "Email": "{{email}}", "Password": "{{password}}", "AppVersion": "1.22.7.0", // "Language":{{language}}, "Persist": false, "CaptchaResponse": null }
Since last night connecting to melcloud fails with below error:
SyntaxError: Unexpected token T in JSON at position 0.
Logging in to Melcloud with an internet browser and my credentials works fine.
How to debug this further?