# Trying my first app.. error initialising driver

**URL:** <https://community.homey.app/t/trying-my-first-app-error-initialising-driver/85174>\
**Category:** Questions & Help\
**Tags:** app, homey-pro\
**Created:** [July 24, 2023, 11:43am UTC](https://community.homey.app/t/trying-my-first-app-error-initialising-driver/85174 "2023-07-24T11:43:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin072](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martin072/32/70637_2.png) [@Martin072](https://community.homey.app/u/Martin072)\
**Post date:** [July 24, 2023, 11:43am UTC](https://community.homey.app/t/trying-my-first-app-error-initialising-driver/85174/1 "2023-07-24T11:43:46Z")

</div>

I am trying to create an app for my Aflamo fire place, it has IR control, and managed to catch the codes for it. I used the example found here on the community ([IR Device](https://community.homey.app/t/creating-an-infrared-ir-device/79385)) but it fails to run. I can install the app, add a devices, but it gets stuck with a spinning circle in the device icon.

When I use the CLI run command, it shows the following error.

```auto
2023-07-24T11:36:52.415Z [log] [MyApp] MyApp has been initialized
2023-07-24T11:36:52.423Z [err] [ManagerDrivers] Error Initializing Driver aflamo: /app/drivers/aflamo/signal.js:2

SyntaxError: Invalid or unexpected token
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1124:15)
    at Module._compile (node:internal/modules/cjs/loader:1160:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
    at Module.load (node:internal/modules/cjs/loader:1074:32)
    at Function.Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1098:19)
    at Module.homeyRequire [as require] (/node_modules/@athombv/homey-apps-sdk-v3/index.js:12:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (/app/drivers/aflamo/driver.js:2:18)

```

**signal.js**

```auto
const { RFSignal } = require('homey-rfdriver');
​
class MySignal extends RFSignal {
  static FREQUENCY = 'ir';
  static ID = 'aflamo';
}
​
module.exports = MySignal;

```

**driver.js**

```auto
const { RFDriver } = require('homey-rfdriver');
const MySignal = require('./signal.js');

class MyDriver extends RFDriver {
  static SIGNAL = MySignal;
}

module.exports = MyDriver;

```

This is my first go with making an app for Homey pro 2023, not much experience with node/java, any help would be welcome 🙂

---

<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:** [July 24, 2023, 12:07pm UTC](https://community.homey.app/t/trying-my-first-app-error-initialising-driver/85174/2 "2023-07-24T12:07:20Z")

</div>

The file `signal.js` contains a few zero width space characters which shouldn’t be there:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/c/dc5173e13ab4ca9bd3cc13b526f36d03126b71e2.png)  
(lines 2 and 7)

> [@Martin072](#):
>
> not much experience with node/java,

Javascript isn’t Java 😉

---

<div class="post-metadata">

**Author:** ![Martin072](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martin072/32/70637_2.png) [@Martin072](https://community.homey.app/u/Martin072)\
**Post date:** [July 24, 2023, 1:15pm UTC](https://community.homey.app/t/trying-my-first-app-error-initialising-driver/85174/3 "2023-07-24T13:15:12Z")

</div>

Many thanks Robert,

Guess it was from the copy and paste… and of course javascript 😉

Seems to work now.

Is it possible to explain in short how to add an Action Flow card to an app? It does not need any trigger, I would just like to control the device as “Then”, ie turn it on.

Looked for some examples but still little complicated for me, and as there is no other logic involved, except for custom cababilities (change the color/speed etc of the fire), I am not sure how to do this.
