# Homeyduino: are multiple classes on single Arduino possible?

**URL:** <https://community.homey.app/t/homeyduino-are-multiple-classes-on-single-arduino-possible/14354>\
**Category:** Developers\
**Created:** [June 12, 2019, 10:33pm UTC](https://community.homey.app/t/homeyduino-are-multiple-classes-on-single-arduino-possible/14354 "2019-06-12T22:33:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [June 12, 2019, 10:33pm UTC](https://community.homey.app/t/homeyduino-are-multiple-classes-on-single-arduino-possible/14354/1 "2019-06-12T22:33:01Z")

</div>

Is it possible to create multiple classes to a Homeyduino project? For example I created motorized curtain controller and with the class “curtain” and with the capability “windowcoverings\_set” and I can adjust the curtain position. Also in Apple Homekit it turns up as a curtain -device.

Now there are a lot of extra giopins to control various things. For example I would like to add simple switches to control lights. Is it possible to create an extra class that is separate from the curtains (and a separate device)? Or is the only solution to add an extra “capability” to the “curtain”-class (What would clutter the device settings with illogical options.)

---

<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:** [June 13, 2019, 6:43am UTC](https://community.homey.app/t/homeyduino-are-multiple-classes-on-single-arduino-possible/14354/2 "2019-06-13T06:43:25Z")

</div>

As far as I know, a single hardware module is added as a single device in Homey, which means it can only have one class. You can add multiple capabilities to the device, but like you said, it will clutter the device settings.

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [June 13, 2019, 1:55pm UTC](https://community.homey.app/t/homeyduino-are-multiple-classes-on-single-arduino-possible/14354/3 "2019-06-13T13:55:50Z")

</div>

That’s unfortunate…

What would happen if I duplicate and include the whole Homeyduino library, and rename every “homey” instance in the library to “homey2”. And do something like this:

homey.setClass(“curtain”);  
homey2.setClass(“button”);

Would Homey add separate devices, or would homey base its device handling on ip addresses?  
I should just try it, but what if it creates a paradox which would implode the complete space time continuum and wipe out the universe as we know it…

---

<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:** [June 13, 2019, 2:43pm UTC](https://community.homey.app/t/homeyduino-are-multiple-classes-on-single-arduino-possible/14354/4 "2019-06-13T14:43:45Z")

</div>

> [@Satoer](#):
>
> I should just try it

That would have been my suggestion too 😅
