twocolors / node-red-contrib-midea-hvac

Nodes for controlling Midea HVAC in Node-RED
MIT License
5 stars 2 forks source link

Issues when httpAdminRoot is customized #1

Closed offtherailz closed 4 years ago

offtherailz commented 4 years ago

First of all great job 👍 When httpAdminRoot is configured, the devices request fails, because it uses absolute path The fix could be very simple, as for documentation, by placing RED.settings.httpAdminRoot before the path at this line:

https://github.com/twocolors/node-red-contrib-midea/blob/a95f0f8ca8687b4558df952d493b92cbd984a0b4/nodes/cloud.html#L57

Anyway it seems to be undefined on my instance, even if it is configured in settings.js

I fixed it in my installation hard-working the path, but I'm wandering if there is a way to fix it getting this setting somewhere else

twocolors commented 4 years ago

@offtherailz thx, try

midea/cloud/devices

Remove first slash

fix in https://github.com/twocolors/node-red-contrib-midea/commit/58e6c29f0972dbe0873dedb9a24e6cee58f7e9ae

offtherailz commented 4 years ago

Thank you, Sorry, I didn't noticed that the URL of admin UI was at the same path of the admin http API (I did everything from mobile), I could do the PR with the relative path on my own.