Maker API event problem

Hi!

I have two hubs, one C7 and one C5. I've configured hacs-hubitat for both of them with a different port for each of the hubs. From the C7 all works as expected, the events are posted to the POST URL configured. But for the C5 it's not working. I've monitored the traffic with Wireshark and I can see the traffic from the C7 but not the C5. When I compare the setup page for the Maker API on the different hubs it looks exactly the same except for the port for the hacs-hubitat event listener. I've called the URL with curl and they both work. I'm at a loss here now, as don't know how to debug stuff on properly on the C5.

Kind regards,

Niklas

If you can't get a solution, you could always try using Hub Mesh to share the devices from the C-5 to the C-7, but I would think only if you can't get a solution on the C-5.

1 Like

Have you checked the logs on your C5 for any errors (or messages of any kind) from the Maker API app?

Might be a typo, or leading/trailing space, in the URL field, which is not immediately apparent to the human eye, but causes problems with the machine-to-machine interface?

A 3rd idea is to try changing the port used for the C5 event handler - maybe something in your LAN/router is blocking the selected port?

1 Like

No errors from the Maker API app in the logs of the C5. No typo as they values are set automatically by hacs-hubitat. I'll turn off the Maker API integration on the C7 and reuse that port for the C5, as I know that that port is working through all network.

I switched the ports on the hubs, and it still doesn't work.

Using a port is optional in the integration. Have you tried not using a port? I have two instances setup and I'm just using the hub's IP address along with the Maker API app ID and access token,

1 Like

Well, there are some problems with that approach, as far as I can see at least.

The hacs-hubitat integration bootstraps a small python web server in order to listen to event posts from the Maker API. If no port is given but an "Event server URL" is entered, the event server is bootstrapped with a random port, but the URL that is sent to the Maker API is without that port. This means that events being posted to the event server is posted on port 80 but is never picked up because the event server is bootstrapped on another port.

If both the server URL and the port is omitted, the IP address of the Home Assistant server together with the random port is sent to the Maker API. This could in essence work, but, I'm running Home Assistant in a Kubernetes (docker) setup and because of this it will not work. I'm going to run it on a dedicated Raspberry Pi (when I can buy one...) and that may solve the problem.

But I'm still at a loss why my setup isn't working on the C5 when it works without a flaw on the C7.

Well, I happened to have an old Raspberry PI 3 lying around, so I installed Home Assistant OS on that and it works like a charm with both C5 and C7. I guess there's something wrong with my old setup...

2 Likes