# Homeyduino: Unknown Error occured, no adding in homey possible

**URL:** <https://community.homey.app/t/homeyduino-unknown-error-occured-no-adding-in-homey-possible/17587>\
**Category:** Questions & Help\
**Created:** [September 1, 2019, 11:41am UTC](https://community.homey.app/t/homeyduino-unknown-error-occured-no-adding-in-homey-possible/17587 "2019-09-01T11:41:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holger](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/holger/32/15108_2.png) [@Holger](https://community.homey.app/u/Holger)\
**Post date:** [September 1, 2019, 11:41am UTC](https://community.homey.app/t/homeyduino-unknown-error-occured-no-adding-in-homey-possible/17587/1 "2019-09-01T11:41:14Z")

</div>

I‘m running the actual versions of homey and homeyduino.  
I have the original Arduino.cc Rev 3 and the original Ethernet Shield 2. The necessary libraries are integrated.  
I used the following recommended Sketch, which I uploaded to Arduino ( with the Macadress sticked on the shield):  
#include \<SPI.h\>  
#include \<Ethernet2.h\>  
#include \<EthernetUdp2.h\>  
#include \<Homey.h\>

byte mac = { 0x12,0x34,0x56,0x78,0x90,0x11 };  
const char\* name = “Homeyduino1” ;  
void setup() {  
Ethernet.begin(mac);  
Homey.begin(name);  
}

void loop() {  
// put your main code here, to run  
}  
I can find Arduino in my AVM7490 Fritzbox Router, it is active and got an IP-adress, I fixed the IP. When starting now homeyduino the Arduino is not automatically recognized. Then I enter the fixed IP manually and I get then after a few seconds the message : „an unknown error occured“.

What could be here wrong, could anyone help? Do I have to do anything to activate UDP-Broadcast in my Router?

---

<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:** [September 1, 2019, 12:14pm UTC](https://community.homey.app/t/homeyduino-unknown-error-occured-no-adding-in-homey-possible/17587/2 "2019-09-01T12:14:42Z")

</div>

Your code doesn’t match the [basic example](https://github.com/athombv/homey-arduino-library/blob/master/docs/usage.md#the-basics); specifically, it doesn’t call `Homey.loop()` inside of the `loop` function.

---

<div class="post-metadata">

**Author:** ![Holger](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/holger/32/15108_2.png) [@Holger](https://community.homey.app/u/Holger)\
**Post date:** [September 1, 2019, 5:09pm UTC](https://community.homey.app/t/homeyduino-unknown-error-occured-no-adding-in-homey-possible/17587/3 "2019-09-01T17:09:55Z")

</div>

Thank you very much, sorry it was my mistake, now it works.  
I uploaded now the remote configuration script to Arduino and want to control everything with homey.

Do you know how to include the state of the inputs/ outputs to homey. There is no Flowcard. I tried as workaround to configure a flow and to switch a virtual device depending of the state of an digital input.

But I can in the condition card only define a pin, but I can‘t change the tag, so that I can‘t differentiate between yes and no in the case of an digital input.

Dears  
Holger

---

<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:** [September 1, 2019, 5:30pm UTC](https://community.homey.app/t/homeyduino-unknown-error-occured-no-adding-in-homey-possible/17587/4 "2019-09-01T17:30:42Z")

</div>

> [@Holger](#):
>
> Do you know how to include the state of the inputs/ outputs to homey

That’s what [capabilities](https://github.com/athombv/homey-arduino-library/blob/master/docs/usage.md#capabilities) are for. You declare that your device has, for instance, an `onoff` capability, and in your Arduino code, you set the value depending on the state of the GPIO pin (high/low). When the capability callback is called, meaning that the state got changed on the “Homey side”, you change the state of the GPIO pin.
