Homeyduino versus HTTP_GET

Hi all,
I successfully used the HTTP_GET cards in my first ESP8266 project and then discovered the Homeyduino app. For Homeyduino just put something like Homey.trigger(“TuinSensor”,Sensor); in the ESP code and it runs fine. The HTTP_GET method is using http.begin(address+URI); with http.GET(); to call the Homey API. It returns the http code, normaly 200. However approximately 15% of the transfers return 404 or -5. If that happens I repeat the call. Not nice, but this seems to work fine. No data loss.
So now my question:

  • If so many transfers fail when using the GET card app, I am afraid Homeyduino also has no 100% of success. But how does Homeyduino deal with failing transfers? Can Homeyduino notify me when a transfer fails?
    I have read all I could find about the Homeyduino app, but still need your help here. Thanks.

Hi Jan, I am using Homeyduino without any issues. Of course that might be different in your case. I however think the app works just fine. Not sure how it handles failed transfers. I assume it just skips failed transmissions.

Homeyduino is indeed running fine in several other ESP projects. I don’t think it skips failed transmissions as that would be quite unreliable. I still hope someone can explain us the algorithm.

The code is available.

But from looking at it, I don’t get the impression that there’s any mitigation for failed transmissions.

For sending data back to Homey, it makes an HTTP connection to Homey (so I assume that the Homeyduino app on Homey creates an HTTP server to receive these messages).

If the connection fails, nothing is done about it.

If the Homeyduino app returns an error as response to the transmission, nothing is done about it either.

So any error mitigation has to be done in your own code.

1 Like

Thanks Robert for pointing me to the lines that matter. I’ll have a try in understanding what it means for my project.

Is anyone interested in developing this code for the RP2040 so that is could use the same app?
I could be wrong but I was thinking that the code might be simular but with a few adjustments.
I was looking at writing my own in micropython but I could not find detailed documentation of the json formatting for each use case to work it out. If anyone has more details on this I can give it a try?

1 Like

Thanks, I found that article but it only really shows the discovery payload. It does also mention the URL for the GET and POST but wanted to undertand what should be returned to Homey Pro when requested and also what does Homey send when registering a trigger event? I’m guessing its sending me information to posibly a webhook but was not fully sure.
i.e. If Homey Pro sens a GET to the URL “/cap/measure_humidity” do I just send raw data back or shoudl be be json formatted?

Use The Source :wink: