Node Red and the R1 Scratchpad


#1

Hi,

I was just wondering if there is any way to read/write the Scratchpad on an R1 through Node Red.

TIA,
Colin

(Used to post on here under CeeJay13, but for various reasons (emails/domain names) and having now retired, I had to open a new account.)


#2

Sort of…

There is no RESTful interface to the scratchpad area on the R1, so Node-RED can not read/write to it directly.
What you need to do is set up a chart that reads and writes the required scratchpad area in and out of variables.
You then use Node-RED to read and write to those variables.

If you have an EPIC in the mix could you might be able to use the api/v1/io/{device} to specify the R1 device… But I suspect the looping chart moving data in and out of the scratchpad would be the most straight forward way.

Lets know if you have any questions, there are a few posts on the forum about doing peer-to-peer with just such a chart…

(Also congrats on the retirement.)


#3

Thanks Beno,

Seems I will have to modify some of the methods that ‘we’ adopted in the past. We were using the Scratchpad and JSON for quite a few years ago for our Operator Interface. Times and methods change, so I have something to learn in Node Red!

Must say, Node Red does look good and I will be using the PAC as a self contained Home Controller with Node Red and, at least, MQTT as the interface, along with the Rapberry Pi, Arduino and (currently) ESP8266 integrations!

Retirement is great, you get to play most of the time, not that developing the PAC Control Systems wasn’t playing. Now I get to do it on my terms, along with a couple of PACs and all the other gizmos to play with!!

Still keeping a ‘weather eye’ on here.


#4

Just in case you were not aware, but Node-RED, with the addition of the ‘Dashboard’ nodes has a pretty sweet web UI interface.
I use it to supplement my groov screens. (AKA, my public facing interface as groov requires authentication).
Node-RED handles MQTT beautifully and most of the other cool gadgets you mentioned.
Don’t forget to keep an eye on https://flows.nodered.org for lots of inspiration.


#5

Yup, been there, and I am doing that. Purely as a result of the Node Red Tutorials in here!!

Trying to use it purely as the UI for the Home Control. Want to make the Home Control autonomous with as little reliance on other systems as possible. MQTT on the Pi running Node Red and direct comms with any sensors from the PAC wherever possible, even if I have to develop some of my own ‘protocols’. Cost is a major factor now!!

Revisiting my Javascript (the book I have seems to be ‘Version 2’) and so I am having to learn about versions 3, 4 and 5 (to whatever they are at now!!). Wow, has it expanded!!

Have some ready made Dashboard UI’s running, and just ‘diagnosing’ how they work.dapting them to my ‘world’ - reading and writing files and values on the R1. Just need to rewrite the Charts I am currently using to control the PAC as I suddenly realise how many more options I have. Flow redesigns in the works!

Thanks for the heads up Beno, as I have always found, a great forum to be associated with.

Have a good weekend,
Colin