Send Message from Android to Node-Red

I currently have Node-Red running as an add-on in HAOS.

I also have a separate Node-Red instance on a separate windows pc, which is connected to HA. Using this, I can easily send messages to my android device using HA notifications.

However, I want to go backwards. I want to be able to send a custom message (like a text message) to the windows node-red instance. What is the easiest way to do that?

I use mqtt to send from HA to nodered.

Well to be more specific, I want to send an actual message (from my android phone), which will be interpreted by the node-red instance and typed into a window, for which I will use a keyboard emulator node (nbr-keyb-mouse).

If I understand you correctly, it sounds like I can send an MQTT message from my android device? I assume I have to “publish” it, then the node-red instance can subscribe to the message topic.

Is there a built-in way I can type a custom mqtt message through HA or some other app?

From the phone, unprompted? You can create a text helper in ha. That will give you an entity that can be placed on a desktop. When clicked gives you a text box, limited to 255 char. There is also a text input card that you wouldn’t need to click, it would display on the dash as a text box.

Edit If you want to send a message then be able to respond with text you can use actionable notifications. Set the action to reply, a text box will open when clicking the action.

Example

1 Like

Are you willing to pay for the Tasker app for Android and use Join? The 2nd video on this page is about Join working with Node Red.

EDIT:

Or this video:

1 Like

Unprompted is fine yea! I didn’t know about that text helper. That sounds like the absolute easiest, thank you!

Ohhh the join thing looks pretty cool too.