# Homeyduino: unable to add device to homey

**URL:** <https://community.homey.app/t/homeyduino-unable-to-add-device-to-homey/106890>\
**Category:** Questions & Help\
**Created:** [March 23, 2024, 2:48pm UTC](https://community.homey.app/t/homeyduino-unable-to-add-device-to-homey/106890 "2024-03-23T14:48:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/moer/32/81900_2.png) [@Moer](https://community.homey.app/u/Moer)\
**Post date:** [March 23, 2024, 2:48pm UTC](https://community.homey.app/t/homeyduino-unable-to-add-device-to-homey/106890/1 "2024-03-23T14:48:06Z")

</div>

I got an Arduino MKR wifi 1010 in combination with a RS485 shield for modbus RTU control of my mechanical ventilation (itho Daalderop HRU 400). I got the Arduino on the wifi network, however I cannot add the Arduino to my Homey; I get the following errors:

 ![Schermafbeelding 2024-03-23 153349](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bf5e5d43d765641d9e8edd87a175cd8d90a5a269.png)

and after adding the IP manually:

 ![Schermafbeelding 2024-03-23 153416](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/c/3c80811f6b0ed800b7b5b896bfb54997e9b13691.png)

I can ping the of the Arduino just fine so it is connected. I did add the “Homey.begin(name);” to the setup part and “Homey.loop();” to the loop part in the Arduino code. Also tried some of the example code but that gave the same result. Anybody has an idea what is going wrong here?

Note that the homey library for Arduino’s seems to be a bid bugged when using Aruidno IDE version 2+. Had to go back to version 1.8.19 to make it compile.

Edit: found the answer in this topic/post:  
[https://community.homey.app/t/homeduino-setup-with-aduino-nano-33-iot-issue/62177/8?u=moer](https://community.homey.app/t/homeduino-setup-with-aduino-nano-33-iot-issue/62177/8)

seems you need to add:

#elif defined(ARDUINO\_ARCH\_SAMD)  
#include \<WiFiNINA.h\>  
#include \<WiFiUdp.h\>  
#define CLIENT\_TYPE WiFiClient  
#define UDP\_SERVER\_TYPE WiFiUDP  
#define TCP\_SERVER\_TYPE WiFiServer  
#define UDP\_TX\_PACKET\_MAX\_SIZE 1024  
#define MAXCALLBACKS 10  
#define CAN\_NOT\_STOP\_TCP

to homey.h.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [March 23, 2024, 2:51pm UTC](https://community.homey.app/t/homeyduino-unable-to-add-device-to-homey/106890/2 "2024-03-23T14:51:52Z")

</div>

> First of all, welcome to the Homey Community!
> 
> To make sure you are aware of the forum rules, please read the _ **Welcome to the forum!** _ post [here](https://community.homey.app/t/welcome-to-the-forum/31).

> Please Edit your post and Add your Pictures on the forum (No Links)
