Maker API Multiple Hosts?

I am trying to put in multiple hosts in Maker API for CORS support. It appears that I am only able to put in one host and have it honored. For example:
If I put in just '', it works just fine.
If I put in ',' then it will only honor the first host and give an error in console that it only supports one value even though it says multiple hosts can be separated with a comma.
Am I doing something wrong?

It looks as though this is a bug. Will look into it.

Thank you so much!!

I've seen exactly the same issue. Reported it here but never saw a response (ok, my post was too cryptic :rofl:)...

I got a bit of another question.

Can you have multiple servers talking to the same maker instance ?

I’m finding using multiple connections, example Home Assistant and Homebridge breaks stuff. Homebridge will loose sensor state updates.

It’s easily fix if I turn off home assistant and restart homebridge.

Same thing with node red and homebridge.

I've done it with no issues before - on ad hoc requests and sending commands to hubitat. But it depends on hub loading, the request timing on the various hosts, and obviously doesn't work for POST events as those only go to one host at a time.

I would recommend installing multiple maker api apps for multiple applications.


The last couple of posts have made me think a little about what people might be thinking about why I might want this. I had not considered two Maker API apps and would be a good idea for someone looking for two different servers to hit Hubitat.

However, in the interest of full disclosure, I am technically looking to have the same server, but just a local IP address and the alias. That probably sounds silly but, truthfully, I am trying to work around a bug. I use XAMPP and create HTML dashboards for devices around my house. I setup my alias and works really well on all devices...except one device... I got a brand new Fire HD 10 for my main house panel and it looks beautiful and exactly what I wanted. Have Fully Kiosk loaded up and it behaves great except that it does not like to reach back to my local server with the alias. I can disconnect the WiFi and reconnect and it will work for a couple seconds but it just doesn't like the alias. Every other device on the network has no issues.

Now, if I trade out the alias in the HTML and use the IP address instead and use the IP address in Fully then it is rock solid on the new Fire HD 10 table and all devices as well. This is currently what I am doing for the time being and just have Hubitat using the server's local IP address. However, it drives the wife nuts! She is not one for remembering IP addresses at all, heck, she doesn't even remember her own devices let alone the server and while I have tried in vain to get her to create the shortcuts with Tasker or simply adding to home screen from Chrome, she always defaults to the alias, which I cannot use with the new main house panel.

I could setup another Maker API, one for the alias and one for the IP, and then just have the main house panel run from the IP Maker API and I think it would be fine since no smaller devices (phones) run that same dashboard because of it's size and layout. But, of course, simplicity would just be being able to have two different hosts in the same Maker API in case, one day, I decide to share a dashboard across all devices and not double up the number of HTMLs out there.

Checking back in on CORS. It is necessary for webapps and simple to implement. All I need is the ability to say "accept all CORS" or provide an address range. I cannot list all the IP addresses because I have many changing devices and using IP addresses is not sustainable.

Sorry to shout but the fix should be very simple.

Since I can't do CORS, plan B would be to host a site with just passive files on the habitat. Is there a way to do it?

Hey Bruce (@bravenel)

I just cloned a Maker API instance and wow, everything just worked. Good job. Now I have a backup NodeRed server ready to go, in case of failure. New tokens, new app number. It was too easy. Thanks for the continued updates to HE.

1 Like