Giter Club home page Giter Club logo

node-red-contrib-azure's Introduction

node-red-contrib-azure

node-red-contrib-azure is an open source repo with a collection of Node-RED nodes that allows you to work with the different Azure services and offerrings.

This is sample code only and should not be used in production. This repo is NOT actively being worked on!

blob-storage - Azure Blob Storage

documentdb Azure CosmosDB (formerly DocumentDB)

event-hub Azure Event Hub

iot-hub Azure IoT Hub

sql Azure SQL

table-storage Azure Table Storage

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

node-red-contrib-azure's People

Contributors

1ft-seabass avatar dzeyelid avatar jongio avatar kasarol avatar lcarli avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar rasavant-ms avatar sandro-k avatar zuhitocom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-azure's Issues

Cant set content type and encoding in message

According to the Azure docs for the message schema for telemetry data you need to set the "iothub-content-type" and "iothub-content-encoding" systemProperties otherwise the body data will be base64 encoded and will require decoding to be used. This has an unwanted side affect of not allowing you to use body data to control routing in Azure iot side.

    "systemProperties": {
      "iothub-content-type": "application/json",
      "iothub-content-encoding": "utf-8",
      ...

Node-red IoT Hub: Verification of Sended message

I was wondering if there is a way to verify that the message that I want to send from Node-Red Flow is also received by the Azure environment or not. At the moment the only response is: message-sent, but I don't know which message is sent. And if the message has not been not sent the Azure-Iot-Hub gives an error and brakes.
I am receiving many messages in my MQTT broker and I want to be sure all the messages are send and if they not have been send, they will be resend in a later moment.
Would it be an idea to add to the msg.payload also the data that has been succesfully send to azure?
And is it possible to catch the error's generated by the Azure environment by another node? The Catch node does not seem to do the trick.

What kind of communication protocol is used in these Nodes?

Hi, sorry if my question is dumb. I am a beginner in this but I am using this node for a project and I need to say what kind of protocol is used in this node, like HTTP, MQTT...
Can anyone tell me and also show me where I can find this in the code? I tried but I don't really understand. Thanks!

Bug in azureblogstorage.js row 170

azureblobstorage.js has typo/bug in row 170.

When downloadBlob thorws error the module crashes because of typo:
blobservice.getBlobToLocalFile(containerName, blobName, fileName, function (error2) { if (error2) { node.log(error); }

Row 170 should be node.log(error2).

Path to file is node-red-contrib-azure/blob-storage/azureblobstorage.js

I can provide PR to this if you want.

Conflict with node-red-contrib-azureiothubnode

I am having trouble with this set of node red code however I can get this one working. There seems to be a registry conflict between the two. Can you please tell me which one I should be using?

node-red-contrib-azureiothubnode
or
node-red-contrib-azure-iot-hub

get container name and blob name from msg for blob storage

Hi,

We're currently using the blob storage component to fetch files from azure.

Seems it's not possible to fetch blob files by dynamically setting their container and blob name through the "msg" object.

I understand that the account name and account key should be inside the credential file, but is that really necessary to save fixed values of the container name and the blob name in credential too ?

Thanks
Jac

Uncaught Exception RowKey should be a string - forces node red restart

Hi,
Using this node, I'm getting an uncaught exception that makes node red restart:

Jan  6 21:23:53 raspberrypi Node-RED[3397]: 6 Jan 21:23:53 - [info] [Table Storage:Azure Table Storage] entity created successfully
Jan  6 21:23:53 raspberrypi Node-RED[3397]: 6 Jan 21:23:53 - [red] Uncaught Exception:
Jan  6 21:23:53 raspberrypi Node-RED[3397]: 6 Jan 21:23:53 - TypeError: Parameter entityDescriptor.RowKey._ for function entityOperation should be a string
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at ArgumentValidator.stringAllowEmpty (/home/pi/.node-red/node_modules/azure-storage/lib/common/util/validate.js                                                  :434:13)
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at /home/pi/.node-red/node_modules/azure-storage/lib/services/table/tableservice.js:1274:9
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at Object.validateArgs (/home/pi/.node-red/node_modules/azure-storage/lib/common/util/validate.js:495:3)
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at TableService._performEntityOperation (/home/pi/.node-red/node_modules/azure-storage/lib/services/table/tables                                                  ervice.js:1262:12)
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at TableService.insertEntity (/home/pi/.node-red/node_modules/azure-storage/lib/services/table/tableservice.js:9                                                  79:8)
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at senddata (/home/pi/.node-red/node_modules/node-red-contrib-azure-table-storage/azuretablestorage.js:47:32)
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at /home/pi/.node-red/node_modules/node-red-contrib-azure-table-storage/azuretablestorage.js:163:17
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at /home/pi/.node-red/node_modules/azure-storage/lib/services/table/tableservice.js:592:7
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at finalCallback (/home/pi/.node-red/node_modules/azure-storage/lib/services/table/tableservice.js:1225:7)
Jan  6 21:23:53 raspberrypi Node-RED[3397]:     at /home/pi/.node-red/node_modules/azure-storage/lib/common/services/storageserviceclient.js:961:11
Jan  6 21:23:54 raspberrypi systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE
Jan  6 21:23:54 raspberrypi systemd[1]: nodered.service: Failed with result 'exit-code'.
Jan  6 21:23:54 raspberrypi systemd[1]: nodered.service: Service RestartSec=100ms expired, scheduling restart.
Jan  6 21:23:54 raspberrypi systemd[1]: nodered.service: Scheduled restart job, restart counter is at 10.
Jan  6 21:23:54 raspberrypi systemd[1]: Stopped Node-RED graphical event wiring tool.
Jan  6 21:23:54 raspberrypi systemd[1]: Started Node-RED graphical event wiring tool.
Jan  6 21:24:23 raspberrypi Node-RED[3427]: 6 Jan 21:24:23 - [info]
Jan  6 21:24:23 raspberrypi Node-RED[3427]: Welcome to Node-RED
Jan  6 21:24:23 raspberrypi Node-RED[3427]: ===================
Jan  6 21:24:23 raspberrypi Node-RED[3427]: 6 Jan 21:24:23 - [info] Node-RED version: v1.0.3
Jan  6 21:24:23 raspberrypi Node-RED[3427]: 6 Jan 21:24:23 - [info] Node.js  version: v10.18.0
Jan  6 21:24:23 raspberrypi Node-RED[3427]: 6 Jan 21:24:23 - [info] Linux 4.19.75+ arm LE
Jan  6 21:24:39 raspberrypi Node-RED[3427]: 6 Jan 21:24:39 - [info] Loading palette nodes

OCR / Text recognition

This project is awesome; thank you! I've tied it into my RaspberryPi which processes an image on a reed-switch trigger (front gate) and it analyzes the image - sending the results to Slack (with Redbot for Nodered!)

Would it be possible to add another node (or drop down) for OCR / text recognition? I'm hoping to pull number plates and warn if not recognised.

Found this online, and their demo on the landing page seems to work well too:
https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts/node-print-text

thanks again

Cognitive services nodes have static westus endpoints

westus api endpoint will not work with cognitive services instances and API keys issued outside US.

Valid keys from UK Azure Computer Vision subscription are rejected by westus -- need to be select endpoint to match subscription
e.g
westeurope.api.cognitive.microsoft.com for UK subscription
northeurope.api.cognitive.microsoft.com for DE subscription
etc
please add a select to the config menu for the API endpoint

Do you have a plan to unify three nodes about IoT Hub into official one?

Now, following three nodes that related to IoT Hub seem to exist.

I'd like to make unify nodes that related IoT Hub into one official node to become to use easier to use by users. Do you have a plan to do that? For example, I'd like to know which one is that you'd like to use as a base to unify.

Then, this issue seems to be related to #17.

Cannot send JSON object to Azure using node-red-contrib-azureiothub

Azure IoT Hub node does not pass JSON objects to Azure using MQTT protocol.
It errors out with: "TypeError: "string" must be a string, Buffer, or ArrayBuffer"

Object

I can send JSON objects to Azure by using a MQTT node with a SAS token, and it shows up in Azure:

MQTT

Is this intended behaviour?

This can be replicated by creating an inject node with the following as a string or JSON (substitute with active key and correct deviceID) and pointing it to Azure IoT Hub:

{"deviceID":"NODE-RED","key":"xxxxxx","protocol":"mqtt","data":{"Speed":"25"}}

NR

Thanks in advance!

Empty Virtual Folders being Created in Blob Storage

Passing a full filepath + filename as a msg.payload to the Azure Save Blob Storage node places the desired file into Azure; however, it is appending the filepath to the Storage Container Name causing the file to be placed several levels deeper in the hierarchy than desired. It is causing the automatic addition of the unnecessary, and empty virtual folders.

Example: local filepath = /home/pi/Images
local filename = lastimage.jpeg
msg.payload = "/home/pi/Images/lastimage.jpeg"
storage container = mystoragecontainer

As-Is the node will place the file in Azure as = /mystoragecontainer/home/pi/images/lastimage.jpeg
To-Be the node will place the file in Azure as = /mystoragecontainer/lastimage.jpeg

Azure Portal, Azure Storage Explorer, and Azure Image Explorer all do not work with the deep virtual folder structure. Suggest that localfilepath be stripped from the localfilename before sending to Azure.

NodeRED dies when using TextToSpeech (Cannot set property headersSent of #<OutgoingMessage> which has only a getter)

nodered 0.19.4
node-red-contrib-cognitive-services 0.5.3
Using Text-To Speech Node kills nodered, exiting with

2 Oct 13:18:45 - TypeError: Cannot set property headersSent of # which has only a getter
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:16)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at _clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:162:18)
at clone (/usr/lib/node_modules/node-red/node_modules/clone/clone.js:202:10)
at Object.cloneMessage (/usr/lib/node_modules/node-red/red/runtime/util.js:55:13)
at textToSpeechNode.Node.send (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:177:61)
at /home/pi/.node-red/node_modules/node-red-contrib-cognitive-services/cognitive-services/textToSpeech.js:101:11
at Request._callback (/home/pi/.node-red/node_modules/node-red-contrib-cognitive-services/cognitive-services/textToSpeech.js:34:5)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:344:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.