# Driver without driver.js

**URL:** <https://community.homey.app/t/driver-without-driver-js/87305>\
**Category:** Developers\
**Created:** [August 17, 2023, 9:35am UTC](https://community.homey.app/t/driver-without-driver-js/87305 "2023-08-17T09:35:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![torarnv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torarnv/32/83065_2.png) [@torarnv](https://community.homey.app/u/torarnv)\
**Post date:** [August 17, 2023, 9:35am UTC](https://community.homey.app/t/driver-without-driver-js/87305/1 "2023-08-17T09:35:07Z")

</div>

I’m looking at making some changes to a homey app, and notice that some of the driver directories do not have a `driver.js`.

Is this a pattern from an older Homey SDK? Or is it still supported?

The drivers in question seem to have a custom pairing HTML template as well, that ends up calling `Homey.addDevice()`.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [August 17, 2023, 9:58am UTC](https://community.homey.app/t/driver-without-driver-js/87305/2 "2023-08-17T09:58:49Z")

</div>

I’m not 100% sure but I don’t think that ZWave or ZigBee devices have a driver.js as it use the built in driver for that type of device. I guess it is also possible to not have one if the standard driver does everything that is required.

---

<div class="post-metadata">

**Author:** ![torarnv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torarnv/32/83065_2.png) [@torarnv](https://community.homey.app/u/torarnv)\
**Post date:** [August 17, 2023, 10:10am UTC](https://community.homey.app/t/driver-without-driver-js/87305/3 "2023-08-17T10:10:54Z")

</div>

This is a custom app, not using ZWave or ZigBee. It looks like the implementation relies on the custom pairing template, and since it doesn’t need any custom logic in a Driver subclass, it doesn’t add driver.js, and homey-compose doesn’t complain about that. I assume a Driver instance is created still at runtime, but using the base class.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [August 17, 2023, 10:15am UTC](https://community.homey.app/t/driver-without-driver-js/87305/4 "2023-08-17T10:15:16Z")

</div>

> [@torarnv](#):
>
> I assume a Driver instance is created still at runtime, but using the base class.

Correct. Even if you include a driver.js it has to extend the base Driver class, so if it’s not there just the base class is used.

Normally the driver.js is required for paring as the method of fetching the devices has to be defined somewhere. With ZWave and ZigBee that is a standard built into the base driver, hence not being needed for those So I’m intrigued how a custom app provides the list of devices to the add device procedure.

---

<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:** [August 17, 2023, 10:18am UTC](https://community.homey.app/t/driver-without-driver-js/87305/5 "2023-08-17T10:18:42Z")

</div>

> [@Adrian\_Rockall](#):
>
> So I’m intrigued how a custom app provides the list of devices to the add device procedure.

If the pairing process uses just a custom pairing template that handles everything (and not any of the built-in templates that work with a list of devices), I don’t think it has to. I assume this app provides “virtual” devices (in the sense that they aren’t coupled to actual hardware).

---

<div class="post-metadata">

**Author:** ![torarnv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torarnv/32/83065_2.png) [@torarnv](https://community.homey.app/u/torarnv)\
**Post date:** [August 17, 2023, 12:23pm UTC](https://community.homey.app/t/driver-without-driver-js/87305/6 "2023-08-17T12:23:09Z")

</div>

> I assume this app provides “virtual” devices (in the sense that they aren’t coupled to actual hardware).

Yepp, it’s a Tuya app, so the devices do not use any of the Homey built in HW (except for the Wifi/network of course) 🙂

---

<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:** [August 17, 2023, 12:25pm UTC](https://community.homey.app/t/driver-without-driver-js/87305/7 "2023-08-17T12:25:21Z")

</div>

Which means they _are_ coupled to actual hardware, so how does the pairing template know which device(s) to pair? 🤔

---

<div class="post-metadata">

**Author:** ![torarnv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torarnv/32/83065_2.png) [@torarnv](https://community.homey.app/u/torarnv)\
**Post date:** [August 17, 2023, 11:05pm UTC](https://community.homey.app/t/driver-without-driver-js/87305/8 "2023-08-17T23:05:47Z")

</div>

The user configures the IP, device ID, and device key, in a simple form 🙂 Then the pairing template calls `Homey.addDevice`.

---

<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:** [August 18, 2023, 5:20am UTC](https://community.homey.app/t/driver-without-driver-js/87305/9 "2023-08-18T05:20:14Z")

</div>

Ah right, that makes sense 👍🏻
