Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string #11

Open
lboue opened this issue Jul 5, 2018 · 0 comments

Comments

@lboue
Copy link

lboue commented Jul 5, 2018

Hello,

I am facing an issue with the homebridge-mi-gateway-security accessory plugin on my raspberrypi:

pi@raspberrypi:~/.homebridge $ homebridge -D 2>&1
[2018-7-5 21:52:24] Loaded plugin: homebridge-mi-aqara
[2018-7-5 21:52:24] Registering platform 'homebridge-mi-aqara.MiAqaraPlatform'
[2018-7-5 21:52:24] ---
[2018-7-5 21:52:24] Loaded plugin: homebridge-mi-gateway-security
[2018-7-5 21:52:24] Registering accessory 'homebridge-mi-gateway-security.MiGatewaySecurity'
[2018-7-5 21:52:24] ---
[2018-7-5 21:52:24] Loaded plugin: homebridge-mqtt-power-consumption
[2018-7-5 21:52:24] Registering accessory 'homebridge-mqtt-power-consumption.mqtt-power-consumption'
[2018-7-5 21:52:25] ---
[2018-7-5 21:52:25] Loaded plugin: homebridge-plex
[2018-7-5 21:52:25] Registering accessory 'homebridge-plex.Plex'
[2018-7-5 21:52:26] ---
[2018-7-5 21:52:27] Loaded plugin: homebridge-videodoorbell
[2018-7-5 21:52:27] Registering platform 'homebridge-videodoorbell.Video-doorbell'
[2018-7-5 21:52:27] ---
[2018-7-5 21:52:28] Loaded plugin: homebridge-weather
[2018-7-5 21:52:28] Registering accessory 'homebridge-weather.Weather'
[2018-7-5 21:52:28] ---
[2018-7-5 21:52:28] Loaded plugin: homebridge-webos3
[2018-7-5 21:52:28] Registering accessory 'homebridge-webos3.webos3'
[2018-7-5 21:52:28] ---
[2018-7-5 21:52:28] Loaded config.json with 1 accessories and 5 platforms.
[2018-7-5 21:52:28] ---
[2018-7-5 21:52:28] Loading 5 platforms...
...
[2018-7-5 21:52:28] Loading 1 accessories...
[2018-7-5 21:52:28] Initializing MiGatewaySecurity accessory...
internal/crypto/hash.js:58
    throw new ERR_INVALID_ARG_TYPE('data',
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, TypedArray, or DataView. Received type undefined
    at Hash.update (internal/crypto/hash.js:58:11)
    at Object.generate (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/uuid.js:14:11)
    at Object.parseAccessoryJSON (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/AccessoryLoader.js:85:51)
    at Server._createAccessory (/usr/lib/node_modules/homebridge/lib/server.js:395:28)
    at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:276:26)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)

Here is my config.json file:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:21:3E:E4:DE:33",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "Configuration file for (e)xtended Domoticz platform.",
    "platforms": [
	{
		"platform": "MiAqaraPlatform",
		"gateways": {
				"286c0785bf83": {
					"password": "*******************",
					"ip": "192.168.1.4"
		}
		},
		"defaultValue": {
				"158d0001d3a168": {
					"ContactSensor_ContactSensor": {
							"name": "Porte d'entrée"
					}
				},
				"158d000123053e": {
					"motion": {
							"name": "Détecteur mouvement salon"
					}	
				}
		}
	}
	],
    "accessories": [{
		"accessory": "MiGatewaySecurity",
		"ip": "192.168.1.4",
		"token": "81264c64d56238aa92dcfb82f774bccf",
		"securityName": "MiGatewaySecurity",
		"securityDisable": false,
		"switchName": "MiGatewaySecuritySwitch",
		"switchDisable": true
	}]
}

Could you tell me what is wrong with my setup?

Regards,
Ludovic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant