grzegorz914 / homebridge-meraki-control

Homebridge plugin for Meraki devices using RESTFull API, publish as independent external platform accessory.
MIT License
0 stars 3 forks source link

Request failed with status code 400 after inital config #12

Closed SigmaScott closed 2 years ago

SigmaScott commented 2 years ago

I am getting the following error when setting up this plugin for the first time. I have only configured the required fields(key,network,organizations) to start.

[11/12/2021, 8:48:36 AM] [Meraki] Network: my test, dashboardClientsData error: Error: Request failed with status code 400
    at createError (/usr/lib/node_modules/homebridge-meraki-control/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/lib/node_modules/homebridge-meraki-control/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-meraki-control/node_modules/axios/lib/adapters/http.js:293:11)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  config: [Object],
  request: [ClientRequest],
  response: [Object],
  isAxiosError: true,
  toJSON: [Function: toJSON]

The meraki portion of my config file configured through the homebridge gui:

{
            "devices": [
                {
                    "name": "my test",
                    "apiKey": "xxxxxxde24a3f04ae53fb904b117d4xxxxxxxxxxx",
                    "organizationId": "391xxx",
                    "networkId": "L_63050394783xxxxxxx",
                    "refreshInterval": 10,
                    "disableLogInfo": false,
                    "accessPointsControl": true,
                    "hideUnconfiguredSsids": false,
                    "switchesControl": false
                }
            ],
            "platform": "Meraki"
        }
grzegorz914 commented 2 years ago

You miss the host in config.

SigmaScott commented 2 years ago

Thanks I did not even notice that. I assume that what was showing up in the gui was the default unless you changed it.