Skip to content
This repository was archived by the owner on Apr 13, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/fiz1962/ESP-adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
willif committed Mar 2, 2018
2 parents 1fcd7b7 + 52afbf7 commit 301f5a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
19 changes: 16 additions & 3 deletions esp-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@

'use strict';

const Adapter = require('../adapter');
const Device = require('../device');
const Property = require('../property');
const fetch = require('node-fetch');

let Adapter, Device, Property;
try {
Adapter = require('../adapter');
Device = require('../device');
Property = require('../property');
} catch (e) {
if (e.code !== 'MODULE_NOT_FOUND') {
throw e;
}

const gwa = require('gateway-addon');
Adapter = gwa.Adapter;
Device = gwa.Device;
Property = gwa.Property;
}

class ESPProperty extends Property {
constructor(device, name, propertyDescription) {
super(device, name, propertyDescription);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP-adapter",
"version": "0.4.0",
"version": "0.4.1",
"description": "ESP Mozillia-IOT adapter",
"main": "index.js",
"keywords": [
Expand Down Expand Up @@ -31,7 +31,7 @@
"moziot": {
"api": {
"min": 1,
"max": 1
"max": 2
},
"plugin": true,
"exec": "{nodeLoader} {path}",
Expand Down

0 comments on commit 301f5a6

Please sign in to comment.