PervasiveComputing / Brightnest

Home Automation System
MIT License
1 stars 4 forks source link

Hue - Test Apply #19

Open benjaminplanche opened 10 years ago

benjaminplanche commented 10 years ago

Now that apply has been implemented, it can be tested for the Hue driver.

Rules can be used to call the apply functions, or you can directly access it through the request PUT /api/actuator/:id/apply/:value.

bim9262 commented 10 years ago

do you need the colon before the id and the value?

benjaminplanche commented 10 years ago

No no, that's a way to tell they are variables.

You have to replace :id by the actuator's ID and :value by the string you want to send to it.

bim9262 commented 10 years ago

TypeError: Cannot call method 'apply' of undefined at serviceApplyActuatorValue (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/services.js:233:34) at callbacks (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/lib/router/index.js:164:37) at param (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/lib/router/index.js:138:11) at param (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/lib/router/index.js:135:11) at pass (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/lib/router/index.js:145:5) at Router._dispatch (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/lib/router/index.js:173:5) at Object.router (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/lib/router/index.js:33:10) at next (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/node_modules/connect/lib/proto.js:190:15) at next (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/node_modules/connect/lib/middleware/session.js:312:9) at /home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/node_modules/express/node_modules/connect/lib/middleware/session.js:336:9

benjaminplanche commented 10 years ago

Should be fixed in #20

bim9262 commented 10 years ago

on node app.js launch:

[error] TypeError: Cannot read property 'name' of undefined at /home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/services.js:86:54 at /home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/drivers/actuators/hue.js:25:6 at IncomingMessage. (/home/bmalyn/Documents/School Stuff/College/Junior/Fall/Q2/M7012E/Brightnest/web/drivers/actuators/hue.js:84:6) at IncomingMessage.EventEmitter.emit (events.js:117:20) at _stream_readable.js:920:16 at process._tickCallback (node.js:415:13)