Sometimes, You might want to send a message and let others whether you are home or not. (or a specific place) Let's suppose that you want to let group members that you return or go out from home on slack. The thing you have to do is [Open Slack App] - [Type "I'm home" or "I'm leaving out"]. Let's make these steps hands-free and automatic by using bluetooth advertising app and obniz board!
obniz board will monitor BLE advertising from your smartphone apps. If the obniz detect BLE advertising, a message “In Home Now” will be sent to Slack. If it does not detect BLE advertising anymore, a message “Leaving” will be sent.
Step 1You get Webhook URL to send messages on Slack. Please get it from here.
Choose a channel messages will be sent and click “Add Incoming WebHooks integration.”
Replace the “WEBHOOK_URL_HERE “(line50) with displayed Webhook URL. Additionally, replace the “CHANNEL_NAME_HERE” with the channel name you chose. Remember to write a channel name with “#.”
var url = 'WEBHOOK_URL_HERE';
var data = {
"channel": 'CHANNEL_NAME_HERE',
"username": 'obniz-bot',
"text": msg
};
Step 2download a smartphone app which emits BLE advertisement such as LightBlue Explorer (→for iOS, →for Android).
Step 3Connect an obniz to a power and emit BLE advertisement from your smartphone app.
If you execute the program(code) below, you can get notification on Slack when you go out and return home. Let's see how it works!
What is obniz?obniz is a cloud-connected IoT development board. You can program on the web browser of any smartphone or computer and the command is sent to obniz through the internet via obniz cloud. By connecting the obniz to the cloud through wifi, users can remotely control devices that are physically connected to obniz.
obniz has 12 IO and WiFi-BLE module. It can be controlled through the APIs – REST or WebSocket API – on obniz cloud. Not only simple IO on/off but also UART, I2C, BLE etc can be used by remotely controlling obniz via internet. All you need to do to connect obniz is to input unique ID by scanning QR code. Complicated processes are done by obniz and its cloud. You can just start programming in HTML, browser and circuit have already been integrated. If you write a program to collect sensor values, you can make a chart of the values easily.
For more information, please visit our website! https://obniz.io/
You can buy obniz board on Amazon too! https://www.amazon.com/obniz-IoT-Gateway-circuit-Web/dp/B07DD6FK8G
You can find a variety of projects made with obniz board! https://blog.obniz.io/example/
Comments