# Homeyduino versus HTTP\_GET

**URL:** <https://community.homey.app/t/homeyduino-versus-http-get/29562>\
**Category:** Apps\
**Created:** [May 8, 2020, 7:29pm UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562 "2020-05-08T19:29:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Pathuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_pathuis/32/15546_2.png) [@Jan\_Pathuis](https://community.homey.app/u/Jan_Pathuis)\
**Post date:** [May 8, 2020, 7:29pm UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/1 "2020-05-08T19:29:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lars\_Machiels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lars_machiels/32/10295_2.png) [@Lars\_Machiels](https://community.homey.app/u/Lars_Machiels)\
**Post date:** [May 9, 2020, 11:06am UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/2 "2020-05-09T11:06:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jan\_Pathuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_pathuis/32/15546_2.png) [@Jan\_Pathuis](https://community.homey.app/u/Jan_Pathuis)\
**Post date:** [May 9, 2020, 7:32pm UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/3 "2020-05-09T19:32:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [May 10, 2020, 6:57am UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/5 "2020-05-10T06:57:03Z")

</div>

The code [is available](https://github.com/athombv/homey-arduino-library/blob/master/src/Homey.cpp).

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](https://github.com/athombv/homey-arduino-library/blob/3fd721be1afa2e40a22829fd9aadffd215e7bbaa/src/Homey.cpp#L799), it [makes an HTTP connection to Homey](https://github.com/athombv/homey-arduino-library/blob/3fd721be1afa2e40a22829fd9aadffd215e7bbaa/src/Homey.cpp#L812) (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](https://github.com/athombv/homey-arduino-library/blob/3fd721be1afa2e40a22829fd9aadffd215e7bbaa/src/Homey.cpp#L845-L846).

If the Homeyduino app returns an error as response to the transmission, [nothing is done about it either](https://github.com/athombv/homey-arduino-library/blob/3fd721be1afa2e40a22829fd9aadffd215e7bbaa/src/Homey.cpp#L839).

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

---

<div class="post-metadata">

**Author:** ![Jan\_Pathuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_pathuis/32/15546_2.png) [@Jan\_Pathuis](https://community.homey.app/u/Jan_Pathuis)\
**Post date:** [May 11, 2020, 5:48pm UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/6 "2020-05-11T17:48:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [June 10, 2020, 9:07am UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/7 "2020-06-10T09:07:19Z")

</div>

> [@\[App\]\[Pro\] ESP Easy (Firmware for ESP32, NodeMCU, Wemos...)](https://community.homey.app/t/esp-easy/30381):
>
> I created an app for communicating with [ESP Easy firmware](https://www.letscontrolit.com/wiki/index.php/ESPEasy) for development boards like the NodeMCU v3 and Wemos D1. You can use this combination to easily build your own sensors, switches and actuators and interface then with Homey. The app should support the latest release 2.\* version of the firmware, you can find those on their [Github page](https://github.com/letscontrolit/ESPEasy/releases). I currently run release [mega-20200608](https://github.com/letscontrolit/ESPEasy/releases/tag/mega-20200515). You can install the app from the [Homey app store](https://homey.app/a/nl.joolee.homey.espeasy/) I maintain a [Github Wiki page](https://git.io/homey-esp-wiki) that contains a lot of information …

---

<div class="post-metadata">

**Author:** ![Gary\_Russell](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_russell/32/79265_2.png) [@Gary\_Russell](https://community.homey.app/u/Gary_Russell)\
**Post date:** [July 1, 2023, 11:07pm UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/8 "2023-07-01T23:07:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 2, 2023, 6:36am UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/9 "2023-07-02T06:36:14Z")

</div>

> [@Gary\_Russell](#):
>
> but I could not find detailed documentation of the json formatting for each use case to work it out

> <https://github.com/athombv/homey-arduino-library/blob/master/docs/protocol.md>

---

<div class="post-metadata">

**Author:** ![Gary\_Russell](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_russell/32/79265_2.png) [@Gary\_Russell](https://community.homey.app/u/Gary_Russell)\
**Post date:** [July 2, 2023, 10:11pm UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/10 "2023-07-02T22:11:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 3, 2023, 5:08am UTC](https://community.homey.app/t/homeyduino-versus-http-get/29562/11 "2023-07-03T05:08:09Z")

</div>

[Use The Source](https://github.com/athombv/homey-arduino-library/tree/master/src) 😉
