Hi All,
My son got me a Ras. Pi for X-mas which I'd like to stash it inside my driveway gate control box for (really) remote operation. After stumbling around with Python, the peeps on the Pi forum said to check out Node-Red. My plan is to (make?) a phone app to run it. So far, I got the "IoT MQTT" app and have made a dashboard with it, but it's pretty clunky looking. I signed up for NOIP and have a page there (can't seem to see it even though it pings OK). Not really sure what I should be seeing while using it either. My thought was NOIP was simply a pass-thru from outside to my Pi. I have my home router configured with port-forwarding to the Pi's IP4 addy, still seems there's something missing though...
Anyhow, the app will have one momentary button to start/stop a cycle, two LEDs for open and close verification, and a slider to show where the gate is in it's travel stroke.
Before I do anything with the gate, I'd like to get the app to "see" the Pi and be able to interact with it. Could someone please generalize an outline to get that far?
Thanks!
Russ
Is there a reason why you don't want to use the node red dashboard nodes and access the dashboard via the browser in your phone?
iPhone? or Android smartphone?
I have done something similar
I have built an Android app with AppyBuilder (https://appybuilder.com/) using an MQTT extension from Inventor Life (https://inventor.life/). This works very well.
Node Red runs on an internet connected pi and all communications are with a cloud instance of MQTT
Works great
No, I have no idea what's out there and that was easily found via Google.
Russ
Hopefully both. My family has droids but my sister and in-laws have IOS.
Russ
For iOS devices see homebridge-mqtt
Edit: The Home app is a built in app and supports voice control (Siri).
In that case install the node set node-red-dashboard and see what they can do for you when viewed in a browser. No need for a special app and you can view your controls on any device or PC. See
Colin,
I'DL'ed that dash and installed it. The instructs say "The default url for the dashboard is based off your existing Node-RED httpRoot path with /ui added. This can be changed in your Node-RED settings.js file - ui: { path: "ui" },
" My Rasbian OS has no (visible) means of searching for that file, would you know where to look? Or perhaps a search engine for local files?
Also, I still cannot access the NOIP address I got a couple days ago. Hoping someone here will try it and report back with something/anything? I'm not sure what's next, do I need a "greetings" homepage for this to work? Or will accessing this addy show my desktop? File manager?
http://pigate.hopto.org
Thanks!
Russ
See https://nodered.org/docs/getting-started/running the pink box at the top shows the startup log of Node-RED. Within it you will see the settings file listed.
As you have NOIP configured as given what you intend to do. I do hope you have followed the security guidelines for securing Node-RED. Although if you had done, you would know where your settings.js file is.
You don't need to change the path for the moment just leave it as it is. You view it from a browser by entering http://ip_address_of_node_red_machine:1880/ui
which is the same address as the editor, but with /ui on the end.
Once installed then you will have a number of dashboard widgets available in the nodes panel under the heading Dashboard. There are numerous tutorials for getting going with the dashboard (google will find many). This one looks reasonable. https://randomnerdtutorials.com/getting-started-with-node-red-dashboard/
Thanks for the N-R dashboard info, I got a start on it last night. I added a tab and put the things I want to have shown on the GUI (button, slider, two LEDs), but nothing shows up on the :1880/ui page when viewed. I get a blank page, but can see changes to the theme. I also get an error msg on deploy about these things not being configured correctly. Do they need something other than just being on the page in order to be seen? I'd really like to get the graphic part done before stumbling thru coding it...
Russ
So what is the error message?
Is this machine potentially accessible from the internet?
If it is, have you secured it?
The error was something about being nodes configured incorrectly (I'm not able to be at the Pi right now). I would have though simply putting the objects on the tab would shows them?
So far, I've not been able to see the Pi from the 'net even though I have port 1880 forwarded in my router. I believe my NOIP may be misconfigured. I'll contact them to see what's up, although I can't even see it from a laptop on my LAN by using http://192.168.1.14:1880/ui. Not a big fan of the Raspbian OS coming from Windows.
I'll worry about security someday, first I've got have an actual connection.
Russ
Sorry, you need to worry about security now. You have a machine that may be accessible from the internet, you need to make sure it is secure. (Or get Node-RED working on your LAN before you configure port forwarding)
No dragging dashboard nodes onto the canvas doesn't magically configure them. Which tab do you want them to go on? What size do you want them to be? etc.
If you leave it open to the internet for any length of time (mabe minutes is enough) then a robot will find it and insert some malicious code into your flow and then you will have to erase the card and start again. Worse than that if you have other devices on the network that are accessible from the pi then they may get attacked too. Stop the port forwarding immediately.
[Edit] You can tell the nodes that need to be configured as they will each have a red triangle on them. Ones marked with a blue dot have not been deployed since they were changed.
1 Like
I'm 65, but you're gonna have to treat me as if I'm a 5 year old.
I used to think I knew a little about computers, but have found myself sorely lacking in even the basics as complexity increases over time.
Ports are now shut.
Now, how would I get to the N-R dashboard from anywhere - LAN or WAN?
Colin, thanks for the explanation on the node "doodad" colors, didn't see anything on this anywhere!
The message I get on deploy is:
The workspace contains some nodes that are not properly configured:
* [Flow 1] button (ui_button)
* [Flow 1] slider (ui_slider)
Are you sure you want to deploy?
As stated, they are not configured at all, I just dropped these four objects onto a new tab expecting to see them on the /ui. Instead I get:
Welcome to the Node-RED Dasboard
Please add some UI nodes to your flow and redeploy
All of this is from within my Pi, as I have no way to view it elsewhere nor the knowledge of how to do so.
Thanks!
Russ
Hey, something went right! I can see a GUI with a button and slider, and I can get to it from my phone. I could still use some advice on seeing it from outside my LAN. Got a couple more UI Q's and will post in a new thread...
Russ
1 Like
For advice on connecting to node-red from across the internet see the section "What needs to be done to make NR secure when exposed to the Internet?" from the link below. Note, however, this is not a task to be undertaken lightly. Personally I do it by running a VPN in my local network to allow secure connection into it, but again without a certain amount of experience of computers this is not trivial.
Thanks, Colin! I'll read up and tinker with it later today. I got my first computer in 1992, complete with Win 3.0 , DOS, and a blazing 2400 baud modem. Even did some VB programming throughout the years, but I have very limited experience with any of the Linux flavors. Seems as if everything computer-wise has gotten as (or more) complex than automobiles these days, I used to be able to work on them too...
Russ