# Polling data

**URL:** <https://community.homey.app/t/polling-data/32916>\
**Category:** Developers\
**Created:** [July 28, 2020, 12:25pm UTC](https://community.homey.app/t/polling-data/32916 "2020-07-28T12:25:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freddie\_Welvering](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/freddie_welvering/32/12623_2.png) [@Freddie\_Welvering](https://community.homey.app/u/Freddie_Welvering)\
**Post date:** [July 28, 2020, 12:25pm UTC](https://community.homey.app/t/polling-data/32916/1 "2020-07-28T12:25:18Z")

</div>

Hi All,

Yesterday i started to convert the HomeWizard app (originally developed by Jeroen\_Tebbens).  
The app uses pollers to get data from the homewizard api (as you can see at [https://github.com/fwelvering/com.homewizard/blob/master/drivers/thermometer/device.js](https://github.com/fwelvering/com.homewizard/blob/master/drivers/thermometer/device.js) on line 32)

I would really like to know if this is the best way to do this?  
And i would really like to know how i can call the ‘startPolling’ function from the driver.js after adding an new device to it.

Any help would be appriciated.

---

<div class="post-metadata">

**Author:** ![Some1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/some1/32/8283_2.png) [@Some1](https://community.homey.app/u/Some1)\
**Post date:** [September 4, 2020, 8:02am UTC](https://community.homey.app/t/polling-data/32916/2 "2020-09-04T08:02:19Z")

</div>

I start polling on the on init in the device.js.

How I do it for the SDK v3 you can see [here](https://github.com/bochove/nl.bochove.knmi/blob/master/drivers/knmi/device.js).

The timeout delay is somewhat complex, to make sure it happens at 30 seconds past every whole 10 minutes, as that is (for as far as I know) the optimal time to fetch data from my source.
