An example of a Mobile App written in Node-RED Dashboard 2.0

INTRODUCTION

The main focus of Dashboard 2.0 is rightly, developing dashboards, however I was intrigued to see if it was possible to develop a mobile app using Node-RED and the Dashboard 2.0 nodes.

Below are details of the resulting App. It is a generic App for managing items. Each Item has a name, type, priority and a status.
We use it as a family To-Do List App, keeping track of the day-to-day tasks we need to do.
It is installed on all our iPhones, giving everyone access to the shared family to-do list.

This will be my blueprint for developing further Apps.
However, I am fairly new to Node-RED & Dashboard 2.0, so I would appreciate any feedback on how the implementation could be improved.

Many Thanks Tim

APP HIGHLIGHTS

  1. The target device is a Mobile smartphone. First and last.
  2. The App has Display, Add, Edit and Delete (CRUD) capabilities.
  3. There is a consistent look and feel across the App
  4. The App has an intuitive look & feel.
  5. The App consists of 5 interconnected screens, plus a Splash Screen
  6. The display part of each screen is built with a paramerised version of a single D2.0 Template node
  7. The App has been implemented with only standard Node-RED and Dashboard 2.0 nodes.
  8. The app uses a centralised, rules-based Navigation Service to route the flow between screens. The Navigation Service is Independant from the screen definitions.
  9. The Data Persistance Service is plug-and-play. \n I.e. It is possible to unplug the the Node-RED Context Data variant of the Data Persistance service and replace it with another variant which stores data in a different data stores. \n E.g. A flat files variant, a MySQL variant, a SQL Server variant, etc.

SCREENSHOTS


Splash Screen


Display Items Screen


New Item Screen


Display Item Details


Edit Screen


Display Items with completed task


Delete Item Screen


FLOW OVERVIEW

THE APP CODE

[Item Mgt V1 Prod.json|attachment](upload://aEqLAqVL6h0E5uDcSGJENok1TDz.json) (162.3 KB)

CONCLUSION

From my perspective, this was a successful project. :grinning:

  • All requirements have been met.
  • Performance is great, even though I am running on a Raspberry Pi Zero 2 W :scream:
  • The design pattern is capable of being used for future apps.

It definitely is possible to develop a mobile app using Node-RED and the Dashboard 2.0 nodes.

6 Likes

Great stuff :+1:

Reminds me of me when I started out with Node-RED and came here to share RedBack which is a backend created in Node-RED, hence RedBack! :wink: The web app was coded in python, so it was the perfect mix of confusion.

If you read the discussion over there, you'll know that your definitely using Node-RED in the wrong way - DON"T DO WHAT YOU DID !!!1!!1! :wink:

--> Node-RED is only for home automation and (I)IoT <--

Most people didn't quite understand what I was doing but hey :man_shrugging: So I started to use NR as a mind map tool - definitely don't do that :wink:

Thanks @gregorius. Had a quick scan of your thread from 2 years ago. It certainly ruffled feathers :smile:

It's interesting people's differing perspective.
I view Node-RED primarily as middleware, sitting between the GUI front-end, and the back-end data-services (e.g. a database). With the advent of Dashboard 2.0, Node-Red can now also be used to build sexy looking VueJS GUI front ends. Brilliant News!

Many Thanks Tim

2 Likes

Indeed Node-RED is extremely flexible and sometimes even malleable. I see it as a visual programming environment for NodeJS, so anything I can do with NodeJS, I can do with NodeRED and hence visually.

For me, the key here is visual. If one works with other people, who happen not to be coders, then a visual approach could be advantageous: creating the business logic in a visual tool allows non-coders (i.e. business people) to potentially alter that logic without need a coder.

1 Like

Hi @Tim99

Very nice. Thanks for sharing. In your playing around, do you know if iOS or Android will let you attach photos to an item, e.g. for "Repair the Shed Roof" could you have an "Attach image" button and it would allow access to your photos and/or camera?

This is great @Tim99 - thanks for your work and sharing your progress

Normally, when you (at least I) would use a mobile to access Node-RED, I assume the mobile and the server that runs Node-RED would not be on the same network. So don't forget the security...

Thanks @grant1, uploading an image would make a great enhancement to the app.

I did see some reference to uploading images during my journey up the Node-REd/D2.0/Vuetify/VueJS/HTML/Javascript/CSS learning mountain (more than a curve that one).
I'll see if I can find it.

I tested it using the file-input v2 dashboard node and it worked great from a mobile phone. It did not allow attachments larger than 1MB, but there are workarounds for that.

Yes The File-input node enables the upload of an image.

A concept that took a bit of getting used to is that this uploads it to the node-red flow, NOT to the file system :scream: But makes sense when you better understand Node-Red.

The File-Input node produces a Buffer as a payload.

Steve's video on buffers is useful reading ( https://www.youtube.com/watch?v=830xM4nRaxs ).

So I guess the next step in the flow would be to store it in a data-store. E.g. a file system using the file read/write nodes.

Can it be stored in Node-Red Context flow variable(s) I wonder?

Yes that is possible, you can do it in a function node or change node, easily enough.

@Tim99 Is it possible to share the complete .JSON file here? The above 'code' appears to reference an uploaded attachment, but nothing that one can download.

Very nice! I'm currently building an entire CMMS with node-red and D2. I'm a glutton for punishment.

Sorry I'll have another go at uploading the code.

Whooo @gemini86 that's some project!

Can you share the specification/design?

It's for my employer, so I can't share too much... here are some screenshots though.
When feature complete, it will have Asset management, work order management and deployment, parts inventory management (including allocating parts to work orders and low inventory notifications), preventative maintenance scheduling per asset, documents library per asset, attachments on work orders, and automated reporting configuration. In its current state, it's capable of asset and work order management, which is a start, and helpful to keep track of tasks that need to be done in the future.

*Note: Pam Gerts is not a real person. Don't try to dox her, she values her privacy.




yes, this is in the settings.js file: