planetk / homebridge-netatmo

This is a homebridge plugin for several netatmo devices
Apache License 2.0
108 stars 25 forks source link

Error connecting Netatmo to Homebridge #49

Closed boehmatron closed 7 years ago

boehmatron commented 7 years ago

Hey planetK, I have set up the Raspberry Pi and Homebridge so that is working fine, without having connected any devices like the Netatmo. Then I installed the homebridge-netatmo and added the mentioned lines of code to the config file - all keys are correct and no typos. When I trigger a restart of Homebridge I get this error in the terminal and I do not know what I have done wrong.

[2017-02-23 22:28:41] Loading 1 platforms... /usr/local/lib/node_modules/homebridge/lib/api.js:118 throw new Error("The requested platform '" + name + "' was not registered by any plugin."); ^

Error: The requested platform 'netatmo' was not registered by any plugin. at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:118:13) at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:284:45) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

Can you help? Thanks in advance, Johannes

planetk commented 7 years ago

Hi,

sounds like an issue with your config file. You might want to use http://jsonlint.com/ to validate the json structure.

Or you can post your config.json here (replacing your secret data with 'XXXXXX') and I'll check.

Kind regards Stefan

boehmatron commented 7 years ago

Hi Stefan, thank you for your reply. I validated the JSON and the file validates correctly.

You can look at my JSON here and maybe you find something that prevents Homebridge working:

`{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" },

"accessories": [],

"platforms": [{
        "platform": "netatmo",
        "name": "NAHome",
        "ttl": 5,
        "auth": {
            "client_id": "XXXXXX",
            "client_secret": "XXXXXX",
            "username": "XXXXXX",
            "password": "XXXXXX"
        }
    }

]

}`

I would be so happy if you find an error or something I can continue working to get it fixed. All the best, Johannes

planetk commented 7 years ago

Hi, hmm, that's strange. the config looks good. you might want to try to add , "deviceTypes": [ "thermostat", "weatherstation", "camera" ]

to the config, but I doubt this helps.

boehmatron commented 7 years ago

@planetk I added the deviceTypes Array and suddenly it started to work o_O I also can not explain, but who cares if it works, right? ;-) Thank you for your help. All the best*

planetk commented 7 years ago

Good to hear it works. I'll check the settings stuff in a few days time.

Regards