I have a thing that sends a msg to my flow, like this:
{
"msg": {
"version": null,
"topic": "action",
"response": true,
"pins": [
{
"number": 5,
"value": null,
"action": "digitalWrite"
},
{
"number": 17,
"value": 141,
"action": "analogRead"
}
],
"fromUuid": "xxxx"
},
"node": "yyyy"
}
When I want to create a function to test if the "value" under "number":17 is 141, what should I use as function?
@KenanTarikTufekci right, you're using Windows. I've had similar issues running gateblu plug-ins on Windows. There is a hack that you can do to run the plugin outside of Gateblu:
1) Download the plugin from https://github.com/octoblu/meshblu-ms-azure-ml I downloaded the ZIP file and extracted to c:\meshblu-plugins\mesblu-ms-azure-ml (I tried with the version that Gateblu downloaded but had no joy, therefore grab it directly from GitHub).
2) Create a Generic Device in Octoblu, you'll find this under "Things". Call it something sensible "Azure ML" Grab the UUID and Token and put it in Notepad or similar.
3) Create a meshblu.json in same directory as the index.js:
{
"uuid": "<YOUR UUID>",
"token": "<YOUR TOKEN>",
"server": "meshblu.octoblu.com",
"port": 443
}
4) Now, your plugin has it's own meshblu.json, you can connect it directly to Octoblu.
5) Open an Administrative CMD prompt, navigate to C:\meshblu-plugins\meshblu-ms-azure-ml
6) run NPM Install - stuff will install
7) run NPM Start - you should see something like "node command.js" displayed in the CMD prompt.
8) Go to Octoblu and find your new Generic Thing "Azure ML" and you should now be able to configure as required.
Let me know how it goes!