Reliable way for triggering flows from phone?

Hi everyone, I've been enjoying Node Red for a week or so now, experimenting and adding new functionality to my HA instance on a Pi. My instance is port forwarded and the port is exposed on a static link via DuckDNS.

I want to be able to send requests from my phone when certain actions happen, which would trigger changes on the HA instance. E.g. trigger something when I disconnect from work wifi. Phone-side automation is handled by Macrodroid, but I can't seem to find a reliable way to pass the info to the Pi.

Some people recommended sending a mqtt request via "MQTT Client" app, which works as long as I'm outside of home wifi. Once I'm on the same wifi as the Pi it loses connection, and then starts spazzing out when I leave the wifi again so I have to force-stop the app. I haven't found a reliable mqtt plugin which would work so far, although I didn't try them all.

I also found some suggestions to send GET requests to the URL and get the data that way.

It can't be a new problem, so what is the most common way to trigger Node Red flows that works both outside of home wifi and on it?

It might be worth looking into if the 'Telegram node' would be useful.

I use to send messages from Node-RED to my mobile phone, in fact I send an in-line keyboard to the phone so I can answer questions. A code for each answer is returned to Node-RED where processing can take place.

The other node you might investigate is 'IFTTT' as this might handle the 'disconnected from work WiFi' situation. I've not used this node but other people on the Forum have, so you might get a response/suggestion from them.

1 Like

I can recommend Telegram as well. Just create a bot for your application and use the Telegram nodes.

I wouldn't rely on too many different Cloud services, but keep that to a minimum and do everything in your Node-RED instance; a plus for privacy and reliability. Why use IFTTT if you can have the full power of Node-RED? :grinning:

1 Like

I use automate to send request to node-red, I do not port forward, instead i have a local android device that has automate installed. I then send a cloud message from my phone to the local automate, which then forwards the request to node-red via a post/get request. THis has been very reliable and normlly less than 2 seconds .

I use the app IoTOnOff, an MQTT client, for this.

IoTOnOff is worth a look if you plan to go with MQTT.

From their front page:

We designed smart interactive widgets so your IoT stuf will be presented nice and smooth.

A badly written sentence, a spelling error, no contact information about the company, no support forum/page...all that doesn't inspire me with confidence about them.

2 Likes

Works find for me in some very important apps (which I use in day-to-day operations, not DYI or hobby).

If you do not like spelling errors that is your call but the app works fine.

Maybe try it versus commenting so negatively on something you have never used?

I use it every day in a critical operation application and like it..... so a spelling error on a page I never read does not effect me... really!

LOL

Honestly, I use IoTOnOff for some very key operational apps (financial related) and it is very reliable and works flawlessly.

PS: I have zero connection to IoTOnOff except that I use the app on two IPhone daily. I have found, however, the developer is very hard to contact (I think he is from the Netherlands, as I recall. I tried to contact him during the initial coronavirus outbreak in China (way over a month ago), but he never replied). But I greatly prefer IoTOnOff to Blynk, for many reasons I will not get into here.

I advise anyone who needs an MQTT mobile app to consider IoTOnOff, even if there is a spelling error by a non-English developer from the Netherlands on their web site. It would be a shame to miss out on a very nice app because someone who never used the app comments negatively in a public forum because they found a typo on a website of a Dutch native speaker on an app they never have yet to use in a business operational scenario.

Thank you everyone for the suggestions, I tried out a few this morning.
Telegram node and IoTOnOff both look good for their purposes, but they seem to be designed for standalone use (manually perform action within the app to trigger a flow), and I can't seem to find a way to integrate them with Macrodroid for automated flow handling.

@E1cid could you share the post/get request part of your flow? Haven't used the http_in node yet. I don't have a second android device but might be able to pass a post/get request directly.

Let's keep this civil please.

Actually, I agree with the thrust of what was said. There are far too many dodgy apps out there. In this case, they claim copyright but provide no contact details. They load 25 libraries that my ad-blocker chomped but have no privacy statement or GDPR related information.

This is not about how well the app may work, it is about the risk of using an app that has a number of mistakes and missing information.

Worth pointing out so that everyone can make their own minds up.

2 Likes

Yes, IoTOnOff is an MQTT client app which runs on a mobile phone (iPhone, Android only as I recall) and it can only do manual tasks from the mobile app like send an MQTT message to a NR flow when you slide a slider or push a switch, etc; or receive MQTT messages (from NR for example) and display that information in a gauge, dial, slider, chart, status message, etc.

I use both MQTT and Telegram for command and control (C2) in production apps; but all are "manual processes" triggered by my hand (sliding a slider on IotOnOff, or sending a message on Telegram).

Also, I receive C2 status information displayed on my mobile from both Telegram and MQTT/IoTOnOff and also the LINE messaging app.

Sorry, not to be more helpful, as I have no hands-on operational experience with Macrodroid .

If I had more free time, would look at Macrodroid , but I'm in the middle of some huge migrations this week.

Cheers.

I think the civil thing to do is not to trash developers when you have not used an app. I use IoTOnOff and it is not dodgy in the least.

If you think trashing the reputation of a developer of an app you have never used is being civil then we have very different ideas of what being civil is.

Civil, in my mind, is not trashing developers and apps and their reputations in public especially if you have not used the app in a production environment and are just "commenting" for the sake of "commenting"

It's not really necessary to comment on every post about apps you have no experience using. The civil thing to do it so not trash developers because they have misspelled a word on a web page when they are not native English speakers... in my view.

That is my idea of civil...... if you think trashing the reputation of developers in a public forum is civil then that is your own worldview, not mine.

Cheers.

It is not that difficult the below screenshot will listen for a GET request at localhost:1880/routine/, any url qery details will be passed to the msg.payload as an object.

so
localhost:1880/routine?query1=1&query2=2
will prodcue
{"msg": {"payload": {"query1": 1, "query2": 2}}}

I found this. Don't know if it would work for you.

Please let's not make this personal. I wasn't trashing the developer, merely pointing out the issues. I would happily discuss those with the developer as I have done many other times with individual developers and large corporates including Microsoft, Apple and IBM.

As I say, this is not about the quality of the application which as you point out, I have no idea, it is about the appearance of quality and the appearance of safety.

Hmm. OK, I'll not comment any further other than to say that I have a professional role in cyber security so I am very unlikely to comment on this just for the sake of it. This is about understanding and managing risk.

I'm not making anything personal.... I am just telling you directly that trashing a developer in a public forum about their app is not civil and you were the one who brought up "please be civil". The civil thing to do, in my view, is not trash software developers, especially when you (1) do not use the app in production and (2) have never contacted the developer if you had a concern.

I have been in the cybersecurity business a very long time.. My work on cybersecurity has been featured on the cover of magazines; but I don't go around in public forums trashing developers. So, if you want to compare backgrounds in cybersecurity against mine, then let's do it. Where you you want to start? How about with the concept of cyberspace situational awareness and network security situational awareness, two of the most important concepts in cybersecurity today. Do you know who wrote the first paper(s) on those key concepts and who created those phrases and when?

FYI, I use IoTOnOff in production, and it works fine and has no more "cybersecurity issues" than any other MQTT mobile phone client on the Internet.

If you want to compare backgrounds in tech and cybersecurity, then I am game. I do not need to get personal and only stick to the facts. However, I have a lot of facts, so let's go for it :slight_smile:

I'm very much into being inclusive and not damaging the reputations other software developers in a public forum .... (especially about an iPhone app... if you have a problem, contact Apple and/or the developer. That is who you need to contact if you have a real concern about any iPhone app).

Hey lets just slap our manhoods on the table and be done with it.(joke to break the tension)

In other words let it go. To all, it's not worth the effort.

1 Like

For those of you with your zipper back in place....If you dislike the potential issues with port forwarding through your router or use of a "cloud service", how about a two factor scheme to do control. Since many of the carriers have an SMS email portal for cell phones, send an email through a dedicated account with a cryptic subject and body that is unique to initiate the commands from your smart phone.
Have the action trigger a random number (say, 4 digits) sent to your phone via SMS that you would use on the actual command email as the subject (with the desired action on the home control system called in the message body of that email).
This only requires email nodes (in and out) and relative simple logic in the flow.
Just a thought from a newby hacker....

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.