OpenHaBot
This is NodeJS based implementation of openHAB Bot for Facebook Messenger
Installation
npm install express body-parser node-wit http-status-codes --save
git clone https://github.com/create1st/openhabot
Configuration
- Create a new Facebook Page for your Bot https://www.facebook.com/pages/create
- Create a new Facebook App for your Bot https://developers.facebook.com/quickstarts/?platform=web
- Add product Messanger and set up Webhooks with http://serveo.net/ host. Check http://serveo.net/ for more details how to configure your own domain
- Create Wit.Ai account
$ ./ssh -R mydomain:80:localhost:1337 serveo.net
- Create config.json
- Create sitemap.json
Keys in json are Wit.Ai entities/roles which do structure a look up path for OpenHab item. e.g. entries from Wit.Ai look up can look like:
openhab_set: confidence: 077588039802196 value: 'ustaw' type: 'value' length: 1 openhab_settings_temperature: confidence: 084355505856879 value: 'temperaturę' type: 'value' length: 1 openhab_location_sleeping_room: confidence: 077086080572739 value: 'sypialni' type: 'value' length: 1 number: confidence: 1 value: 23 type: 'value' length: 1 openhab_unit_degree: confidence: 061746979290351 value: 'stopnie' type: 'value' length: 1
- Create dictionary_{language_id}.json for your language