This project is a how-to guide on using Watson Visual Recognition service to analyse an image and based on a trigger word then send a event command to IoT Device.In this example node-red is used to create an image upload form which sends the image to Watson Visual Recognition and trigger an iot device whenever fire is detected in the image.
- Login/signup in to your IBM Cloud Account
- Goto Catalog and create the following services:
- Internet of things Platform starter NOTE : You need to create the A Platform Starter App,not Internet of things Platform service.I suggest you use the link above to quickly avoid confusion.
- Visual Recognition
NOTE: You can skip steps 3,4 & 9
- Goto connections tab and open IotF Service and Launch Watson Iot Platform
- Navigate to Devices tab and Add Device
- Once the Starter app is running,visit app url and configure Node-red
- Login to your node-red flows dashboard and import flow from flows.json
- Create new visual recognition credentials
- Update api key in the visual recognition node-red flow
- Update the device details in IBM Iot device node {Optional}
- Visit <app_url>/upload and upload required image
- Change the string inside includes from trigger action function to set a different trigger