Skip to content

sebastienjouhans/node-red-flows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-red-flows

This a place for playground with node red. Some of the flows require some BlueMix services.

I used postman to make all the web requests

##watson-translator.json

  • requires a Watson Language translation service from Bluemix
    • use username and password given by the service
  • use postman to generate the POST request to this url https://localhost:1880/translate
    • add the header Content-Type = application/json
    • add the follwing raw body
    {
        "text":"one small step for men one giant leap for mankind",
        "target":"fr",
        "source":"en"
    }

##watson-text-speech.json

  • requires a Watson Text toSpeech service from Bluemix
    • use username and password given by the service

In the browser type the url https://localhost:1880/audio keep this page open. Then press the inject button on the flow. The web page (https://localhost:1880/audio) should speak out the text contained in the inject module. Open the inject module and change the text.

##mashup-watson-translator+text-speech.json This combines watson-translator.json and watson-text-speech.json

##get-request-triggers-ifttt.json

  • make sure the event and the apikey in the ifttt url is replaced with the relevant information from your receipy This shows how to get a ifttt reciepy containing the Maker module to send an email when the the request is sent. The url to go to in the browser is https://localhost:1880/test-ifttt

insert-find-in-mogodb.json

  • insert data in a mongodb collection
    {
    	"first":"arnold",
    	"last":"schwarzenegger",
    	"dob":"03/06/1925",
    	"gender":"m",
    	"hair_colour":"brown",
    	"occupation":"actor",
    	"nationality":"american"
    }

or for multiple insert

[{
	"first":"arnold",
	"last":"schwarzenegger",
	"dob":"03/06/1925",
	"gender":"m",
	"hair_colour":"brown",
	"occupation":"actor",
	"nationality":"american"
},
{
	"first":"tony",
	"last":"curtis",
	"dob":"21/04/1978",
	"gender":"m",
	"hair_colour":"brown",
	"occupation":"developer",
	"nationality":"american"
}]

ifttt-maker-email-channels.json

For this flow you need a ifttt account so that you can produce a receipy with the Maker and email channels. The idea is that when the POST request to https://localhost:1880/ifttt with the body {"value1":"some value", "value2":"some value", "value3":"some value"} is received an email is sent to the email address set in the email channel. The values contained in the body will also be part of the email.

image-classifier.json

This flow is used in conjunction of the image classifier on BlueMix. The classifier needs to be trained before it can be used with this flow. This is the url to use https://localhost:1880/recognise_nike?url={url to the image}&classifier_id={nike classifier}&version={version}&apikey={api key} or go to this url https://localhost:1880/recognise_nike and enter the necessary information in the form

arduino-test.json

This flow requires an Arduino board with an led on pin 12 and 13. And a button pin 2.

  • Pressing the button will light up the led 12.
  • Clicking the button whick on the flow will light up the led 13.

blynk-websocket.json

This is an example that shows how Blynk (https://www.blynk.cc/) can be used with web socket in order to update a webpage (https://127.0.0.1:1880/blynk).

gps-simulator--mqtt-ibm-iot--websocket.json

This flow shows how a gps simulator sending data to the ibm iot cloud. Then another flow recives that data extracts long and lat sends it via web socket to a webpage (https://127.0.0.1:1880/iotfeedback) so it can be displayed.

ibm-iot-mqtt.json

ibm iot module connected to a debug module.

simple-web-socket.json

This flow shows how web socket can be used with a web page (https://127.0.0.1:1880/simple). Clicking a button on the webpage will update all the webpages connected to the socket with the current time. Clicking the button on the flow will also do the same.

tube-status.json

Clicking the button on the flow will get the tube status and display them on the webpage (https://127.0.0.1:1880/tubestatus)

web-socket-and-html-widget.json

Synchs two webpages, when one thing is updated on a webpage https://127.0.0.1:1880/testing) the other automatically update.

About

playground for node red

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published