Dirnei / node-red-contrib-zigbee2mqtt-devices

Node-red nodes for controlling and managing zigbee devices managed by zigbee2mqtt
MIT License
30 stars 7 forks source link

makes sure devices are listed if node-red has httpAdminRoot configured #47

Closed brunoamaral closed 3 years ago

brunoamaral commented 3 years ago

this needs to be tested with and without the httpAdminRoot to make sure it works.

Related to #46

Dirnei commented 3 years ago

Sadly its not working in both situations. Without httpAdminRoot there is a / to much and then you will get a 404 http://localhost:1880//z2m..... But I have an idea. I will try and come back later.

Dirnei commented 3 years ago

Did you tried the following?

$.getJSON(window.location.pathname + 'z2m/devices/'...

It's much simpler and I think its doing the same.

brunoamaral commented 3 years ago

Just tried it and it also works, I have sent a new commit.