Rasp-Node-Red

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche



MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Qu'est-ce que Node-Red?

Node-Red in its simplest form is an open source visual editor for wiring the internet of things produced by IBM. What does this mean? Well for someone lazy like me it means I can spend more time making stuff "talk" to each other than worrying about all of the interfacing code I will need to write.

The system contains "Nodes" which look simply to be icons that you drag and drop on to the canvas and wire together. Each Node offers different functionality which can range from a simple debug node to be able to see what's going on in your flow, through to a Raspberry Pi node which allows you to read and write to the GPIO pins of your Pi.

To give an example of what can be done here is my home twitter account telling me where I'm currently located and whether it is going to rain any time soon. I even have a Google maps link thrown in for good measure.

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

The flow to produce something like this within Node-Red is shown below and it took me literally 15 minutes to have everything set up.

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

To summarise the flow:

  • An App on my phone called MQTTitude send my location to Node-Red
  • The basic framework of my twitter message is then created in a function node
  • I take my location and query Forecast.io for the weather at that location
  • The returned data is then formatted in to my tweet message using further function nodes
  • The message is then sent to a Tweet node and tweeted for me

Normally this would have taken me a good few hours to complete. But with Node-Red I am able to do it in minutes. I am not worrying about all of the interfacing to MQTT, HTTP or Twitters API. All of that is done for me by Node-Red.

So now I've sold you the idea.. lets get to the installation!


Source: Raspberry Pi Hosting Node-Red
Créé par C. Mobberley pour AdaFruit Industries.

Traduction réalisée et augmentée par Meurisse D. pour MCHobby.be.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com