n8henrie / homebridge-rcswitch-gpiomem

Integrate your 433 remote switches into homebridge
MIT License
11 stars 3 forks source link

error indexOF undefined #7

Closed fynnit closed 8 years ago

fynnit commented 8 years ago

dear henrie, big props to this amazing plugin. i almost got it to work, even sniffed out the codes, but after adding them to my config.json, and reloading homebrige, i got this error.

do you know how to fix it? im a rookie in the pi business!

cheers and thank you!

fynn

[11/1/2016, 10:59:36 PM] [Switch A] Initializing RCSwitch accessory...
[11/1/2016, 10:59:36 PM] [Switch B] Initializing RCSwitch accessory...
[11/1/2016, 10:59:36 PM] [Switch C] Initializing RCSwitch accessory...
[11/1/2016, 10:59:36 PM] [Switch D] Initializing RCSwitch accessory...
/usr/local/lib/node_modules/homebridge/lib/api.js:46
  if (name.indexOf('.') == -1) {
          ^

TypeError: Cannot read property 'indexOf' of undefined
fynnit commented 8 years ago

and the config.json part:

},  {
                "accessory": "RCSwitch",
                "name": "Switch A",
                "onCode": 5359777,
                "offCode": 5353887,
                "pulseLength": 329,
                "bitLength": 24,
            "repeats": 10
        },{
        "accessory": "RCSwitch",
                "name": "Switch B",
                "onCode": 5352849,
                "offCode": 5352852,
                "pulseLength": 329,
                "bitLength": 24,
                "repeats": 10
        },{
        "accessory": "RCSwitch",
                "name": "Switch C",
                "onCode": 5353617,
                "offCode": 5353620,
                "pulseLength": 329,
                "bitLength": 24,
                "repeats": 10
        },{
        "accessory": "RCSwitch",
                "name": "Switch D",
                "onCode": 5353809,
                "offCode": 5353812,
                "pulseLength": 329,
                "bitLength": 24,
                "repeats": 10
        },{ 
n8henrie commented 8 years ago

Huh. Sorry for the slow reply. What version of homebridge and homebridge-rcswitch-gpiomem are you running? I'll see if I can replicate. Also are you sure about the pulse length of 329?

Nate

On Tue, Nov 1, 2016 at 4:09 PM, fynn notifications@github.com wrote:

and the config.json part: }, { "accessory": "RCSwitch", "name": "Switch A", "onCode": 5359777, "offCode": 5353887, "pulseLength": 329, "bitLength": 24, "repeats": 10 },{ "accessory": "RCSwitch", "name": "Switch B", "onCode": 5352849, "offCode": 5352852, "pulseLength": 329, "bitLength": 24, "repeats": 10 },{ "accessory": "RCSwitch", "name": "Switch C", "onCode": 5353617, "offCode": 5353620, "pulseLength": 329, "bitLength": 24, "repeats": 10 },{ "accessory": "RCSwitch", "name": "Switch D", "onCode": 5353809, "offCode": 5353812, "pulseLength": 329, "bitLength": 24, "repeats": 10 },{

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/n8henrie/homebridge-rcswitch-gpiomem/issues/7#issuecomment-257714233, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLYDLGB8iutgcNorR3FSTq0iDvd7_G9ks5q57iygaJpZM4Kmo_0 .

fynnit commented 8 years ago

thanks nate for your reply. the original error was due to a misconfig. i take it has to be the exact puls length? what if i have a different length on the out frequence?

fynn

fynnit commented 8 years ago

ur right. the puls length was incorrect. extraordinary work nate! you made my year!

n8henrie commented 8 years ago

Sweet! Glad you got it working. If there's nothing else, would you mind closing the issue?