# Control Homeyduinio device without flow charts?

**URL:** <https://community.homey.app/t/control-homeyduinio-device-without-flow-charts/14282>\
**Category:** Developers\
**Created:** [June 10, 2019, 2:34pm UTC](https://community.homey.app/t/control-homeyduinio-device-without-flow-charts/14282 "2019-06-10T14:34:58Z")\
**Posts on this page:** 3\
**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 10, 2019, 2:34pm UTC](https://community.homey.app/t/control-homeyduinio-device-without-flow-charts/14282/1 "2019-06-10T14:34:58Z")

</div>

I want to control my curtains remotely. The hardware part is almost done. It consist out of a nodemcu, Hbridge motor controller, optical sensor (to count the motor rotations) and a geared down motor connected to the curtains. Hardware-wise it works. Now I need to create the software.

I want to access it on the devices tab, and adjust a percentage (just like controlling a light brightness) that correspond with the position of the blinds (0% fully open, 100% fully closed). Anyhow, playing a bit with the library, I think access to the attributes of the device is only available inside the flow charts? Am I correct?

Do I need to connect it through a virtual device which is linked through flows, or is there a direct way?

---

<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 10, 2019, 5:23pm UTC](https://community.homey.app/t/control-homeyduinio-device-without-flow-charts/14282/2 "2019-06-10T17:23:15Z")

</div>

I would think that it should work if you give your device the class `curtain`, and use the `windowcoverings_set` [capability](https://github.com/athombv/homey-arduino-library/blob/master/docs/usage.md#capabilities) to set its position.

Something like this:

```auto
Homey.setClass("curtain");
Homey.addCapability("windowcoverings_set");
...
Homey.setCapabilityValue("windowcoverings_set", position);

```

However, I haven’t done anything with Homeyduino for a while, nor do I have controlled curtains, so not sure if those will be shown in the devices tab as you wish. If not, a (rather crude) fallback could be to use class `light` and capability `dim` (which also is a percentage).

---

<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 11, 2019, 5:33pm UTC](https://community.homey.app/t/control-homeyduinio-device-without-flow-charts/14282/3 "2019-06-11T17:33:24Z")

</div>

Excellent! it works perfectly. Thanks Robert

 ![IMG_8704](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/b/bb8adb0c000ae0d80a34c53caf1a9c0f0607f23f.png)
