johnlemonse / homebridge-telldus

36 stars 22 forks source link

Error when adding "unknown_accessories" #72

Closed juta44 closed 5 years ago

juta44 commented 5 years ago

Hi,

Running Homebridge on windows 7. Everything was working fine but a added some z-wave plugs with energy measurement. I have tried to follow all the good guides here but first thing I add the "unknown_accessories" and one of the bellow the system directly give me an error in red saying it has problem to read the config file. (the file has been validated) any ideas? //Tobias

     "id": 123,
      "model": "selflearning-switch",
      "manufacturer": "Nexa"
    },
    {
      "id": 456,
      "model": "temperaturehumidity",
      "manufacturer": "Oregon",
      "name": "My Custom Name"
    },
    {
      "id": 789,
      "name": "Only name altered"
    },
    {
      "id": 987,
      "disabled": true 
juta44 commented 5 years ago

Here is the message.. C:\Windows\system32>homebridge [2018-9-22 11:44:53] There was a problem reading your config.json file. [2018-9-22 11:44:53] Please try pasting your config.json file here to validate i t: http://jsonlint.com [2018-9-22 11:44:53] C:\Users\tobias\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:214 throw err; ^

SyntaxError: Unexpected token ? in JSON at position 0 at JSON.parse () at Server._loadConfig (C:\Users\tobias\AppData\Roaming\npm\node_modules\home bridge\lib\server.js:208:19) at new Server (C:\Users\tobias\AppData\Roaming\npm\node_modules\homebridge\l ib\server.js:56:38) at module.exports (C:\Users\tobias\AppData\Roaming\npm\node_modules\homebrid ge\lib\cli.js:30:16) at Object. (C:\Users\tobias\AppData\Roaming\npm\node_modules\home bridge\bin\homebridge:17:22) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3)

C:\Windows\system32>

juta44 commented 5 years ago

My config file....Any ideas??

//Tobias

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

"description": "HomeBridge HTTP status control",

"platforms": [

    {
        "platform": "Telldus",
        "name": "Telldus Live!",
        "public_key": "",
        "private_key": "",
        "token": "",
        "token_secret": "",
        "unknown_accessories": [ 

{ "id":2610212 , "model": "selflearning-switch", "manufacturer": "Nexa" }, { "id": 1518840497, "model": "temperaturehumidity", "manufacturer": "Nexa", "name": "Motorvärme" }, { "id":2610187 , "model": "selflearning-switch", "manufacturer": "Fibaro" }, { "id": 1518692282, "model": "temperaturehumidity", "manufacturer": "Fibaro", "name": "tvättmaskin" } ] } ] }

juta44 commented 5 years ago

Solved