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

a little help #14

Open
EMCSizl opened this issue Dec 13, 2017 · 1 comment
Open

a little help #14

EMCSizl opened this issue Dec 13, 2017 · 1 comment

Comments

@EMCSizl
Copy link

EMCSizl commented Dec 13, 2017

Hi guys, looking for some guidance here... I am attempting to use the plug-in to power a hardware hack.

simple particle function/API called "power" to control the pins on my particle.
json file is as follows and error at the bottom.

Looks like it cannot interpret the "name" string, which I am assuming is the devices name but???
Also I cannot figure out who the args are supposed to work. If I want to feed it a simple strong of on or off.. how do I go about that?

Thanks

"platform": "ParticleIO",
"name": "Particle Devices",
"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"cloudurl": "https://api.spark.io/v1/devices/",
"devices": [
{
"name": "Coffee Machine",
"type": "lightbulb",
"device_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"function_name": "power",
"args": "on={STATE}"

type: 'lightbulb',

device_id: 'xxxxxxxxxxxxxxxxxxxxxx',

function_name: 'power',

args: 'on={STATE}' }

�[37m[2017-12-13 12:59:57]�[39m �[36m[Particle Devices]�[39m Initializing platform accessory 'Coffee Machine'...

�[37m[2017-12-13 12:59:57]�[39m Loading 1 accessories...

/usr/local/share/.config/yarn/global/node_modules/homebridge/lib/api.js:50

if (name.indexOf('.') == -1) {
^

TypeError: Cannot read property 'indexOf' of undefined

@BrotherBrine
Copy link

@EMCSizl can you post the whole conifg.json file? it looks like you may be missing some keys in your json. also, does the particle function work properly when calling from https://console.particle.io/events?

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

2 participants