Open benjaminplanche opened 10 years ago
do you need the colon before the id and the value?
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.
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
Should be fixed in #20
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.
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 requestPUT /api/actuator/:id/apply/:value
.