This project's goal is to validate and demostrate we can control devices by Webby via some messengers.
Now tested on Telegram and Facebook messenger.
Rotate rotery angle sensor to control LED's light level
led > LED is off
- Change state
led on > LED is on(255) led off > LED is off
- Set value
> led 800 > set LED level to 200 > led > LED is on(200)
- Mainboard: Respberry Pi 2 or 3
- GrovePi+ extension board to connect Grove modules
- Grove sensors: Green LED
(They are also avaialble via Grove starter kit)
Connect GrovePi+ and Respberry Pi together.
Plug Rotery angle sensor in pin
A2, Plug Green LED in pin
D5 on GrovePi+ board.
You need a 4G Micro SD Card and flash with linux image
You need to make GrovePi works first by following this instructions.
Then you need clone webby_template which provide the basic setup of chatbot framework.
$ git clone https://github.com/gasolin/webby_template.git demo $ cd demo
Then you have to get this project and install a messenger adapter from npm. (Let's take telegram adapter for example. I've test it with Facebook messenger as well, so you can try on it in the same manner)
$ npm install --save hubot-telegram webby-grove-demo $ npm install
external-scripts.json and add
"webby-grove-demo" string in it
Edit node_modules/hubot-telegram/src/telegram.coffee and replace
webbybot at the first line.
Then you need create a telegram bot and put the token in
Refresh the bash environment with
Then you can host your bot on telegram and control the sensors.
$ ./bin/webby -a telegram