Hi everyone,
three months ago I switched from OpenHAB to Node-RED and was impressed after the first minutes. But directly on this weekend I searched but did not found a possibility to use my smartphone to control my devices. When I am in my WLAN and when not (as I have a big garden).
With this requirement I found two things, for which I still saw potential for improvement in Node-RED:
- Remote Access - Without the need for the user to configure stuff like port forwarding, dynamic DNS or VPN for each self.
- Mobile App - There was no mobile App for iOS (or Android) at this time. (I started before linhtranvu makes his app public)
After some nights playing with tunnelling traffic through websockets I landed by SSH port forwarding. After some prototyping I decided to create a service around the two topics Remote Access and Mobile App. Today I feel far enough in my project to start the beta phase.
What it is
It is a little more than just a node or an app. It consists out of:
- The Node-RED nodes in node-red-contrib-remote: These are at the moment two nodes and one config node. With the node "remote access" it is possible to create a ssh tunnel to one of my servers. With the node "remote notification" it is possible to send push notifications to your mobile devices. The config node does the configuration what the access node should serve (UI Dashboard, uibuilder, maybe other local web ressources) and is responsible for requesting client certificates and connecting the apps.
- The Remote-RED servers: The main job of the servers is to proxy the traffic from the mobile apps to your local resources (e.g. ....:1880\ui). The other jobs they have is serving a REST API for the communication and sending push notifications. At the moment I have two productive servers (one in the US, one in Germany), maybe more if a lot of users likes my service.
- The Remote-RED apps for Android and iOS: The apps will be connected through a QR Code to one or more of the config nodes. They authenticate with a client certificate for each config node to the server. So the server knows to which SSH tunnel the app is authorised to connect. The apps are also the receiver for push notifications.
How to participate in the test
While the beta phase it will not be available through the Node-RED library. So you have to ssh to your Node-RED computer and follow these steps:
- Goto your Node-RED directory, normally 'cd ~/.node-red'
- Install through NPM: 'npm install node-red-contrib-remote'
- Restart Node-RED, like 'service nodered restart' or 'pm2 restart node-red'
To get the necessary apps, just send me a private message containing the mail address you are used as your Apple-ID for iOS or you are logged in on the Android Play Store. So I can send you a beta invitation over Apple TestFlight or Google Play.
I created a help inside the nodes, the apps and on my homepage (the homepage is in work right now). Here are the links:
Help in English
Hilfe in deutsch
Is it free?
Since with Node-RED as well as other open source developments most of it is free (at least for the software), I prefer to talk about it right from the start. When it goes productive there will be purchases within the apps.
Are the more plans for the future?
Of course! At the moment I focus on bringing the the functions stable and smoothly working, so I can go productive. After that I know about two functions I will add. Other ideas are welcome, but I will collect them for the time after the first release.
- Questions: With this you will be able to send push notifications where you can directly answer on the notification. Like "Hey, it's midnight and the music in the garden is powered on. Switch off? YES / NO".
- Geo Fencing: The smartphone will raise an event on Node-RED as soon as it enters or leaves a geo fence.
Known issues
- It is not fully possible to open the Node-RED Editor on iOS. It's also not the intent of the app to configure Node-RED. The intent is to access the dashboard. On iOS the webscocket between the Editor UI and the background can't be established.
- As you can forward also other local web ressorces, I tried to serve my Volumio devices (music player). As Volumio uses absolute paths on some points it will not work.
- I think it will not work on Windows, as it based on a SSH port forwaring. But I have not tested it right now.
So... Now I am excited what will happen the next days...
Greetings, Thorsten