HTTP Endpoint Examples

I'm currently preparing a set of Node-RED flows and use cases for my students in order to motivate and encourage them to invent and build web sites and REST services without having to know, learn and program much.

To speed up familiarizing oneself with Node-RED HTTP endpoints, I've prepared a set of examples and published it on GitHub.

Feel free to use them in any way you want. Feedback is welcome.

With greetings from Germany,

Andreas Rozek

10 Likes

Nice ! Thank you very much for sharing.

You are welcome! Thanks for liking it!

Hi Andreas,
Just thought I should touch-base with you. I tutor a group of students (12 to 16 year old) at an after school club (two afternoons a week) here in the UK.
I've written an extensive set of tutorials about using Wemos D1 Minis (ESP8266-based microcontrollers) with Node-RED to interface to many real world situations mainly via MQTT.

Maybe we could exchange ideas in the future??

Kind regards, David.

Definitely, although my students are university students of computer science and I want them to build online services or services which need some kind of internet access - perhaps even encouraging them to find some ideas and found their own startups.

However, I'm also preparing a set of Node-RED examples with obniz devices as these have Wifi access built-in, are quite robust (even in case of short circuits) and can be brought into the internet within seconds - these devices are based on ESP32.

Somewhere in the internet I also already have published some information on Wemos D1 for colleagues at my former work.

Are you thinking about web pages which display information originating at a Wemos or allowing to control such a device?

Hi Andreas,
I thought your students would be much older than mine. I only have 45-mins to an hour on each session so I needed to have tutorial sessions that could be fitted in to this time frame. Our set-up is a couple of towers of RPi-Zero-W, 6 Pi(es) in each tower, that commuicate to the Club's router and out through a hole that the IT people punched in the web-filter for us.

I've made up 24 or more breadboards that each have a Wemos D1 Mini running ESP-Easy. The students are given a breadboard and a tutorial guide and build things incorporating LEDs, push buttons, ultrasonic distance measuring devices, temp/humidity/pressure sensors, accessing weather data, writing data to MySQL dB, some of my advanced students did some aircraft tracking and displaying the position of trains on the UK British Rail network.

When I get a spare moment I'll send you a could sample tutorials.

Thanks for taking the time to read this.

Thanks for sharing these examples.

We do have https://cookbook.nodered.org that was my attempt to gather these sorts of things in and to provide a solid guide to the core nodes.

Sadly it hasn't seen the sort of contributions I had hoped my initial seeding of recipes would have led to.

If you wanted to turn some of your examples into recipes in the cookbook, that would certainly be welcomed.

1 Like

Hi Nick,
I'll take a look at your format and see how much work would be needed to do this.
I must have 24 or more tutorials, many of which I've published on 'Share Your Projects'.

The key thing is the recipes are meant to fairly focussed solutions to specific problems. Rather than large scale examples that combine many different concepts.

The goal is to be able to give each recipe a title that helps a user find the answer to their question of "how do I do X" with Node-RED.

Thanks Nick - I understand the focus.
That will probably discount my current offerings, but I'll keep that in mind when I produce future ones.

In the meantime, I'll keep publishing new ones to 'Share Your Projects'.

I've always dreamed of building a "multi-node computer" based on RPi-0(-W)s and doing some parallel processing on it - but never had the time (and a good demonstrator besides calculating fractals) to realize it.

Currently, I cannot expect my students to have much affinity to electronics and have to proceed cautiously when dealing with hardware. Thus, it may even be advantageous that your students are younger than mine.

Have you published your tutorials on the internet?

Currently, I am under high time pressure as the whole series of examples has to be finished by end of this week in order to be useful in this semester.

But, if you come back to me, let's say, by end of this month, we may discuss which of my examples should be converted into a "recipe" and how that should be done to fit seamlessly into your cookbook.

However, please keep in mind that many of the more advanced examples heavily rely on my "reusable flows" which you probably won't like. Thus, you will have to have an alternative ready by then - and the "cookbook" may be a good motivation for me to convert my existing work.

Yes I have and here are a few links for you.

Link to the Mini Tower of RPi-Zeros.

A previous tower I built at home using old RPi-2Bs and 3Bs.

Ultrasonic distance measuring
http://resources-area.co.uk/node-red-flows/ultrasonic_distance_sensor.pdf

Pulse Width Modulation controlling a model racing car

Plane Spotting - no hardware at all, just nodes in a flow.

The school where I tutor the IoT Club has an IT/Technology bias. They have 3D printers and a laser cutting machine as well as 3D modelling programs, so some of the students are quite knowledgeable about hardware. I'm very careful at letting them wire-up things and they appreciate I need to check it before they plug things in. As everything is driven off of USB 5V power it is a fairly safe environment. Also using Wemos D1 Mini (ESP8266-based microcontrollers) are very in-expensive - probably 2 Euros each, so if a student did accidently destroy one - it's not the end of the world. Having said that - I've been running the club for nearly 4-years and the only disaster we have had is a lead/leg got broken off of an LED.

1 Like

Well,

given the number of (positive) feedbacks it may be about time to write some Cookbook examples.

Is there a "recipe" that explains how to write (and publish) "recipes"?

1 Like

Hi @rozek

Recipes can be contributed as pull-requests against this repository: GitHub - node-red/cookbook.nodered.org: Node-RED Cookbook

There is a style guide here: cookbook.nodered.org/styleguide.md at master · node-red/cookbook.nodered.org · GitHub

I strongly suggest, doing one to begin with so you and I can make sure we're on the same page in terms of style/content etc.

1 Like

I strongly suggest, doing one to begin with so you and I can make sure we're on the same page in terms of style/content etc.

Yep, that was my intention, indeed.

Thanks for the hints - let's see if I can write s.th. by next week.

With greetings from Germany,

Andreas Rozek

1 Like