Remote operating and Node Red

  • 1
  • Idea
  • Updated 3 months ago
I have always wanted to build a better remote station interface, but I struggle with coding anything beyond "Hello World" and usually even that has a bug or two.  

Several times, I have played with NodeRed on the PI, and I keep coming back to it.  

NodeRed is a GUI based coding platform, much like wiring, and it has great promise.  I do know 1 or 2 hams that are using it, so I am hoping they might jump in and help mentor the rest of us and share some ideas.

https://nodered.org/docs/hardware/raspberrypi

This is what it looks like controlling my simple 4 relay RPI board:



And, this is an export of the code that you can paste into a NodeRed console.  

[{"id":"6fc89136.65404","type":"rpi-gpio out","z":"2c0e83c7.f7ad2c","name":"Relay 3","pin":"31","set":true,"level":"0","freq":"","out":"out","x":380,"y":540,"wires":[]}]

Next, add MQTT to the above to send out messages to other bits, including IOT devices.

At this point, this is about as far as I have gotten, but my goal is a control panel I can read/use on a web page or an iPhone to turn things on or off.

I have seen Dashboards added, reading wattmeters and maybe even handling rotator control too.

Mike 
Photo of Michael Walker

Michael Walker, Technologist

  • 725 Posts
  • 204 Reply Likes

Posted 3 months ago

  • 1
Photo of Lee

Lee, Elmer

  • 680 Posts
  • 286 Reply Likes
I've been looking at this using ESP 8266 wifi modules and the arduino environment.  Here is a node red example  

https://randomnerdtutorials.com/esp8266-and-node-red-with-mqtt/

The 8266 has multiple digital I/O and an analogue input as well plus an I2C bus and can drive an OLED display.  You can do the "relay control" from a phone or browser without MQTT but MQTT can be configured to receive as well as feed back in a publish/subscribe format with several levels of robustness to understand if the job really got done.  I would love to see I2C enabled in the radio to allow status query and thing like freq query and then set up wif AP wireless intranets around the station off the main router and maybe a rasp pi as a MQTT broker for running relays, like antenna switching or 4 square controllers or turning rotors with positive feed back of the status of the remote device.  The best dev board is the NodeMCU 12E   Here is a web based web server relay control

https://www.instructables.com/id/Control-ESP8266-Over-the-Internet-from-Anywhere/

MQTT servo controller

https://www.instructables.com/id/Simple-IoT-Remote-Switch-With-MQTT-and-ESP8266/ 

There are a million pages and youtube vids on this kind of setup 

Alternatively you could do the radio query over ethernet but more complicated 

I built a band switch capable of being run from Yaesu BCD as an experiment.  The Flex USB puts out Yaesu BCD

73  W9OY
 

Photo of Michael Walker

Michael Walker, Technologist

  • 725 Posts
  • 204 Reply Likes
Thanks Lee

You are way ahead of me.

But, I did get my basic switch working and a web page built for it.  The learning curve is key, but in about an hour, I now have my basic web interface that even looks good on an iPhone.  If anyone is interested in the very very basics, I'm happy to explain further as I find getting from getting it installed to sort of working is a big jump and all the tutorials have a different focus.    Let me know and I can a video in baby step mode and how it works for us ham operators.

I even added a few hosts to ping to see if they are running.  

This is with 2 relays and I really didn't have to write a single line of code.  Relays 3 and 4 haven't been moved to display on a web page yet.

This is how I created the actual dashboard http://www.steves-internet-guide.com/node-red-dashboard/

Mike va3mw




(Edited)