homebridge-lightwaverf

LightwaveRF Communi… > Forum > LightwaveRF Hackers > homebridge-lightwav…

LightwaveRF Community: Welcome Forums LightwaveRF Hackers homebridge-lightwaverf

This topic contains 2 replies, has 1 voice, and was last updated by  Lodan 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25058
     Lodan says:

    Lodan
    Participant

    Hello,

    I was wondering if anyone was able to help me please. I’m trying to run homebridge on a PI to integrate with my lightwave setup.

    I followed the Homebridge guides below:
    https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi
    https://github.com/nfarina/homebridge

    All looked good with Homebridge as it started with just the Apple bonjour / Avahi warning.

    The node version I have is 8.9.4.

    I then followed the install guide for homebridge-lightwaverf and created the config.json file but that didn’t exactly go as expected. When I next ran Homebridge I got the following and I am not sure if that is one or multiple issues:

    homebridge
    *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    [2018-2-22 09:30:26] Loaded plugin: homebridge-lightwaverf
    [2018-2-22 09:30:26] Registering platform ‘homebridge-lightwaverf.LightWaveRF’
    [2018-2-22 09:30:26] —
    [2018-2-22 09:30:26] There was a problem reading your config.json file.
    [2018-2-22 09:30:26] Please try pasting your config.json file here to validate it: http://jsonlint.com
    [2018-2-22 09:30:26]
    /usr/lib/node_modules/homebridge/lib/server.js:207
    throw err;
    ^

    SyntaxError: Unexpected token : in JSON at position 11
    at JSON.parse ()
    at Server._loadConfig (/usr/lib/node_modules/homebridge/lib/server.js:201:19)
    at new Server (/usr/lib/node_modules/homebridge/lib/server.js:57:38)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:26:16)
    at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)

    For the first part I did what it said and went to that URL and it returned this:

    Error: Parse error on line 1:
    “platforms”: [{ "platform": "L
    -----------^
    Expecting 'EOF', '}', ',', ']‘, got ‘:’

    My config.json file has this in it:
    “platforms”: [
    {
    "platform" : "LightWaveRF",
    "name" : "LightWaveRF",
    "ip_address": "192.168.0.139",
    "devices": [
    {
    "roomId": 1,
    "roomName": "Office",
    "deviceId": 1,
    "deviceName": "Cinema",
    "deviceType": "D"
    },
    {
    "roomId": 1,
    "roomName": "Office",
    "deviceId": 2,
    "deviceName": "Office",
    "deviceType": "D"
    },
    {
    "roomId": 1,
    "roomName": "Office",
    "deviceId": 3,
    "deviceName": "Middle",
    "deviceType": "D"
    },

    ]
    }
    ]

    Any help would be sincerely appreciated and I apologies if this is a simple newbie thing.

    Thanks very much in advance

    #25060
     Lodan says:

    Lodan
    Participant

    Actually the beauty of posting is I spent ages looking beforehand with no joy but as soon as I posted I think I have gotten a little further. I was missing some things in my config.json. Now my config.json looks like this (which I beleive is correct for a post 2016 lightwave link)

    {
    “bridge”: {
    “name”: “Homebridge”,
    “username”: “B8:27:EB:C8:81:39″,
    “port”: 51826,
    “pin”: “031-45-154″
    },

    “platforms”: [{
    "platform": "LightWaveRF",
    "name": "LightWaveRF",
    "ip_address": "192.168.0.139",
    "devices": [{
    "roomId": 1,
    "roomName": "Office",
    "deviceId": 1,
    "deviceName": "Cinema",
    "deviceType": "D"
    },
    {
    "roomId": 1,
    "roomName": "Office",
    "deviceId": 2,
    "deviceName": "Office",
    "deviceType": "D"
    },
    {
    "roomId": 1,
    "roomName": "Office",
    "deviceId": 3,
    "deviceName": "Middle",
    "deviceType": "D"
    }
    ]
    }]
    }

    That now gives me this:

    *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    [2018-2-22 11:17:25] Loaded plugin: homebridge-lightwaverf
    [2018-2-22 11:17:25] Registering platform ‘homebridge-lightwaverf.LightWaveRF’
    [2018-2-22 11:17:25] —
    [2018-2-22 11:17:25] Loaded config.json with 0 accessories and 1 platforms.
    [2018-2-22 11:17:25] —
    [2018-2-22 11:17:25] Loading 1 platforms…
    [2018-2-22 11:17:25] [LightWaveRF] Initializing LightWaveRF platform…
    [2018-2-22 11:17:25] [LightWaveRF] LightWaveRF Platform Plugin Version 0.1.5
    **[2018-2-22 11:17:25] [LightWaveRF] Fetching LightWaveRF switches and dimmers…
    No email or pin specified. The server configuration (rooms, devices, etc.) cannot be obtained**
    device =
    { roomId: 1,
    roomName: ‘Office’,
    deviceId: 1,
    deviceName: ‘Cinema’,
    deviceType: ‘D’ }
    device =
    { roomId: 1,
    roomName: ‘Office’,
    deviceId: 2,
    deviceName: ‘Office’,
    deviceType: ‘D’ }
    device =
    { roomId: 1,
    roomName: ‘Office’,
    deviceId: 3,
    deviceName: ‘Middle’,
    deviceType: ‘D’ }
    [2018-2-22 11:17:25] [LightWaveRF] Initializing platform accessory ‘Office Cinema’…
    [2018-2-22 11:17:25] [LightWaveRF] Initializing platform accessory ‘Office Office’…
    [2018-2-22 11:17:26] [LightWaveRF] Initializing platform accessory ‘Office Middle’…
    Setup Payload:
    X-HM://0023ISYWY173G
    Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

    Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐
    │ 031-45-154 │
    └────────────┘

    Receiver socket listening 0.0.0.0:9761
    /usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
    dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
    ^

    Error: dns service error: name conflict
    at new Advertisement (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:47:30)
    at Bridge.Accessory._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:661:20)
    at emitOne (events.js:116:13)
    at HAPServer.emit (events.js:211:7)
    at HAPServer._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:190:8)
    at emitOne (events.js:116:13)
    at EventedHTTPServer.emit (events.js:211:7)
    at EventedHTTPServer. (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10)

    I think the bit where it is asking me for an email pin is for the pre 2016 systems and I just need to find a way to pair it. It also looks like I have found myself a new error at the bottom.

    #25061
     Lodan says:

    Lodan
    Participant

    Sorry I would edit / delete the above if I could work out how.

    I solved the DNS issue by rebooting the PI. Now I just have the following which I am not sure if its a problem or not. First I need to research how to register homebridge with the LINK:

    *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    [2018-2-22 11:50:53] Loaded plugin: homebridge-lightwaverf
    [2018-2-22 11:50:53] Registering platform ‘homebridge-lightwaverf.LightWaveRF’
    [2018-2-22 11:50:53] —
    [2018-2-22 11:50:53] Loaded config.json with 0 accessories and 1 platforms.
    [2018-2-22 11:50:53] —
    [2018-2-22 11:50:53] Loading 1 platforms…
    [2018-2-22 11:50:53] [LightWaveRF] Initializing LightWaveRF platform…
    [2018-2-22 11:50:53] [LightWaveRF] LightWaveRF Platform Plugin Version 0.1.5
    [2018-2-22 11:50:53] [LightWaveRF] Fetching LightWaveRF switches and dimmers…
    No email or pin specified. The server configuration (rooms, devices, etc.) cannot be obtained
    device =
    { roomId: 1,
    roomName: ‘Office’,
    deviceId: 1,
    deviceName: ‘Cinema’,
    deviceType: ‘D’ }
    device =
    { roomId: 1,
    roomName: ‘Office’,
    deviceId: 2,
    deviceName: ‘Office’,
    deviceType: ‘D’ }
    device =
    { roomId: 1,
    roomName: ‘Office’,
    deviceId: 3,
    deviceName: ‘Middle’,
    deviceType: ‘D’ }
    [2018-2-22 11:50:53] [LightWaveRF] Initializing platform accessory ‘Office Cinema’…
    [2018-2-22 11:50:53] [LightWaveRF] Initializing platform accessory ‘Office Office’…
    [2018-2-22 11:50:53] [LightWaveRF] Initializing platform accessory ‘Office Middle’…
    Setup Payload:
    X-HM://0023ISYWY173G
    Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

    Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐
    │ 031-45-154 │
    └────────────┘

    Receiver socket listening 0.0.0.0:9761
    [2018-2-22 11:50:53] Homebridge is running on port 51826.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.