jhschuster / homebridge-intesisweb

Homebridge plugin for IntesisHome devices
Other
1 stars 1 forks source link

Your plugin not working Error 404 #11

Closed mikibarba closed 1 year ago

mikibarba commented 1 year ago

I try to connect to intesisweb but it's not possible. The puglin connect woth the plataform but then not working:

[1/12/2022, 23:42:26] [IntesisWeb] PLANTA ALTA: power SET 1 1 [1/12/2022, 23:42:27] [IntesisWeb] POST device/setVal?id=127934806734&uid=1&value=1&userId=21688 HTTPError 404

I received this error always.

Bolebo commented 1 year ago

I have the same issue since november 30th. The accloud service was in maintainance in the morning and the plugin started to send errors just after. I suspect there was some changes in the API. Making the POST request via Postman works, with same query strings. I'm not familiar with NodeJS so I have difficulties to understand what goes wrong.

jhschuster commented 1 year ago

This is happening for me as well. Now to figure out why...

jhschuster commented 1 year ago

Fixed in 1.0.20. It looks like they got more restrictive about how the "X-Requested-With: XMLHttpRequest" header needed to appear.

Bolebo commented 1 year ago

No way !!! I spent 4 hours comparing my working request with yours. I missed the typo. I almost got mad. Thank you very much.

jhschuster commented 1 year ago

I think maybe the old request package translated underscores to dashes in header names, but maybe not? The switch to got clearly worked for a while, but maybe it didn’t do that translation? Or maybe AC Cloud didn’t care and then they did? Anyhow, I’m as surprised as you were. It was frustrating that my test queries outside of NodeJS worked fine but the (I thought) identical ones in Node did not.

Glad I could fix it!