Node-Red Mobile Injector

1,538 views
Skip to first unread message

Fabian Buentello

unread,
Feb 1, 2015, 12:40:57 PM2/1/15
to node...@googlegroups.com

Hey guys thought I’d share something we've been working on. We are releasing a Node-red injector app for both iOS and Android. Both are open source and can serve as a starting point for a custom app. We managed to get widgets working on iOS 8 which is pretty cool. 


Quick Notes:

1. These are standalone apps, meaning they will only work on the LAN. You’re more than welcome to modify as you see fit.

2. There is an accompanying 'injector' node that is required.

3. Auth is implemented but it is temporary. Seeing as there is an update coming to authentication, we didn't see a purpose of investing any time.


iOS App: Link

Repo: Link


Android App: Link

Repo: Link


NR-Injector Repo: Link

npm Package: Link


npm install node-red-contrib-nr-injector


Any feedback is appreciated.

Emil Oberg

unread,
Feb 1, 2015, 4:00:36 PM2/1/15
to node...@googlegroups.com
Nice job!

I just took a brief look at the repos. It looks like you're using two completely different codebases for the iOS and the Android version. Have you been discussing using Titanium to have the same codebase for both iOS and Android (and HTML5 and Windows)? As Titanium is JavaScript based it'd probably appeal to people developing in Node-RED. (Not trying to be disrespectful all all, just curious!)

Emil

Fabian Buentello

unread,
Feb 1, 2015, 5:26:48 PM2/1/15
to node...@googlegroups.com
Thanks ! I didn't necessarily look directly into titanium, but developing the mobile apps "not natively" was an option at the beginning. We decided not to take that path so we could provide a better, more polished solution. Now I will say that my android skills aren't up to par with my iOS skills, so I am using this project to help better my android development :). But if the non-JavaScript languages becomes a growing concern. Then we will have no problem pivoting, and using an environment like Titanium. Thanks again for the compliment! 

Sent from my iPhone
--
http://nodered.org
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/fZVFSP2lzjo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ryan...@gmail.com

unread,
Feb 2, 2015, 6:14:49 AM2/2/15
to node...@googlegroups.com
Nice, will be very handy for quick testing and demonstration of projects - thank you.

Ryan.

Sriram Sivakumar

unread,
Mar 30, 2015, 8:21:36 PM3/30/15
to node...@googlegroups.com
Hi,
I've node-red installed on google cloud compute. I can access node-red via a static IP address. When I tried the NR injector with my existing distro, the handshake is not successful. It works well with localhost. What should I do to get it work?

Julian Knight

unread,
Apr 9, 2015, 6:49:32 AM4/9/15
to node...@googlegroups.com
I've just tried to get this working on my newly set up Pi2 and it isn't working. When configuring, I edit the Injector Manager but I can't enter an IP address but it stays outlined in red and the node configuration remains unfinished.

Any ideas?

Julian Knight

unread,
Apr 9, 2015, 7:05:07 AM4/9/15
to node...@googlegroups.com
The configuration error went away after I restarted NR.

I can now see the injectors I've added to my flow but they don't seem to do anything. I have 2  connected directly to a debug node. They appear on my iPhone but clicking on them does not produce any output.

S.Sriram

unread,
Apr 9, 2015, 7:08:18 AM4/9/15
to node...@googlegroups.com
You have to be on the same network. Also make sure you type in your port number on the app. Usually it will be port 1880. The present version works only for localhost and same network. The developer is working on an update to let connections to remote servers.

S.Sriram

unread,
Apr 9, 2015, 7:14:03 AM4/9/15
to node...@googlegroups.com
On the node red instance nr inject, make sure output message property is set to timestamp and sent to debug tab and remember to deploy it.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

Julian Knight

unread,
Apr 9, 2015, 7:32:56 AM4/9/15
to node...@googlegroups.com
Hi, I am on the same network. As I said, the iPhone recognises the 2 nodes and display's them. But clicking on them does nothing. I have one node set to timestamp and the other to string, both connected to the same debug node set to display the whole msg. There is no output.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

S.Sriram

unread,
Apr 9, 2015, 7:45:34 AM4/9/15
to node...@googlegroups.com
Mine work perfectly. I have only one debug connected to each injector node. Do you see any error logs on the terminal?

S.Sriram

unread,
Apr 9, 2015, 7:51:55 AM4/9/15
to node...@googlegroups.com
Try running node red.js -v to see if any error shows up on terminal.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

Julian Knight

unread,
Apr 9, 2015, 10:13:30 AM4/9/15
to node...@googlegroups.com
Hi, I always run NR with -v and there are no errors or warnings.

I added a node.warn statement at around line 69 of the .js file just inside the "this.inject" function and it is never triggered.

S.Sriram

unread,
Apr 9, 2015, 8:21:10 PM4/9/15
to node...@googlegroups.com
I'm not sure why it's not working for you. I installed using "npm i node-red-contrib-nr-injector" and here is the video of how it works for me. I'm on iOS. Not sure if there are any issues with Android app. 
NR Injector.mov

Fabian Buentello

unread,
Apr 9, 2015, 8:39:03 PM4/9/15
to node...@googlegroups.com
Hey Julian, about your issue, are you on the Android or iOS version? Because I see you talked about clicking which is on the android version and iOS will trigger via sliding across the tablecell. If you can export your flow your flow here, along with the version number of your NodeRED, I can look into it tonight.

Julian Knight

unread,
Apr 10, 2015, 12:54:51 PM4/10/15
to node...@googlegroups.com
?!?!?! Really? Not exactly an obvious UI choice and not mentioned anywhere! You also have to swipe left to right and I think most iOS swipes happen right to left.

To be honest, that would never have occurred to me. Well that works anyway.

Julian Knight

unread,
Apr 10, 2015, 12:58:39 PM4/10/15
to node...@googlegroups.com
By the way, the .js file generates quite a large number of JSHint warnings including a lot of missing semi-colons and strict warnings. Possibly not an issue but maybe something to tidy up?

M Enkelaar

unread,
Apr 30, 2015, 7:39:46 AM4/30/15
to node...@googlegroups.com
Can anyone help me understand where and how I can set a password? this is what I can retrieve:

pi@raspberrypi ~/node_modules/node-red-contrib-nr-injector $ ls
nr-injector  package.json  README.md

pi@raspberrypi ~/node_modules/node-red-contrib-nr-injector/nr-injector $ ls
nr-injector.html  nr-injector.js

nr-injector.js:

module.exports = function(RED) {
    "use strict";
    var os = require('os');

    RED.httpAdmin.get('/injector/ip', function (req, res) {
        var ifaces = os.networkInterfaces();
        Object.keys(ifaces).forEach(function (ifname) {
            var alias = 0;
            ifaces[ifname].forEach(function (iface) {
              if ('IPv4' !== iface.family || iface.internal !== false) {
                // skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses
                return;
            }

            if (alias >= 1) {
                // this single interface has multiple ipv4 addresses
                console.log(ifname + ':' + alias, iface.address);
                res.send('Multiple addresses detected');
            } else {
                // this interface has only one ipv4 adress
"nr-injector.js" 122 lines, 3937 characters

Am I looking in the right spot?

Kind regards

Op vrijdag 10 april 2015 18:58:39 UTC+2 schreef Julian Knight:

Andy Mathews

unread,
Jun 20, 2016, 5:28:54 AM6/20/16
to Node-RED
Hey, the app has been withdrawn for the apple store - any plans to relaunch?


On Sunday, February 1, 2015 at 5:40:57 PM UTC, Fabian Buentello wrote:
Reply all
Reply to author
Forward
0 new messages