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

Debug message for a client not in the config #10

Closed magic7s closed 2 years ago

magic7s commented 3 years ago

For some odd reason a debug message for a client, that I have never added to my homebridge configuration is showing up in the log.

[27/09/2021, 10:38:49] [Meraki] Debug dashboardClientsData: {
  id: 'k018d18',
  mac: '1a:2b:95:6f:71:40',
  description: 'Brad iPhone 13 Pro',
  ip: '192.168.128.190',
  ip6: null,
  ip6Local: 'fe80:0:0:0:1489:5c33:b5a4:a634',
  user: null,
  firstSeen: '2021-09-25T02:20:25Z',
  lastSeen: '2021-09-27T17:38:24Z',
  manufacturer: null,
  os: 'Apple iPhone',
  deviceTypePrediction: null,
  recentDeviceSerial: 'REMOVED-XXX-XXXX',
  recentDeviceName: 'MyMR33',
  recentDeviceMac: 'ac:17:c8:99:99:00',
  recentDeviceConnection: 'Wireless',
  ssid: 'MYSSID',
  vlan: 0,
  switchport: null,
  usage: [Object],
  status: 'Online',
  notes: null,
  smInstalled: false,
  groupPolicy8021x: null,
  adaptivePolicyGroup: null
}
[27/09/2021, 10:38:49] [Meraki] Network: Meraki Network, requesting dashboardClientsPolicyData.

This error also appeared near this debug but has stopped showing up now. Maybe related to the other issue about offline clients, not sure. [27/09/2021, 10:05:44] [Meraki] Network: Meraki Network, dashboardClientsData error: TypeError: Cannot read property 'name' of null at merakiDevice.updateDashboardClientsData (/usr/local/lib/node_modules/homebridge-meraki-control/index.js:163:71) at processTicksAndRejections (internal/process/task_queues.js:95:5)

grzegorz914 commented 3 years ago

Can You post your config? looks like the name was not set in clients settings.

magic7s commented 3 years ago

This device description: 'Brad iPhone 13 Pro', has never been in my HB config. This debug just keeps scrolling every 10 seconds. Just this one device.

{
    "devices": [
        {
            "name": "Meraki Network",
            "host": "https://n36.meraki.com",
            "apiKey": "REMOVED",
            "organizationId": "123456789",
            "networkId": "L_99999999999",
            "refreshInterval": 10,
            "disableLogInfo": true,
            "dashboardClientsPolicy": [
                {
                    "name": "Luka iPad",
                    "mac": "74:e1:b6:b0:b2:cc",
                    "type": "Normal",
                    "mode": true
                },
                {
                    "name": "Luna iPad",
                    "mac": "10:40:f3:c5:ee:b6",
                    "type": "Normal",
                    "mode": true
                },
                {
                    "name": "Luka iPhone",
                    "mac": "ee:f7:25:56:8e:f4",
                    "type": "Normal",
                    "mode": true
                },
                {
                    "name": "Luka Fire",
                    "mac": "4c:ef:c0:39:59:68",
                    "type": "Normal",
                    "mode": false
                },
                {
                    "name": "Luna Fire",
                    "mac": "00:71:47:c7:6c:17",
                    "type": "Normal",
                    "mode": false
                }
            ],
            "accessPointsControl": false,
            "hideUnconfiguredSsids": true,
            "switchesControl": false
        }
    ],
    "platform": "Meraki"
}
grzegorz914 commented 3 years ago

The debug is get from Meraki server, first get all Clients then compare it to the config and filter. The refresh time can be changed in config. All is OK here.