-1

I have a Wi-Fi Scanner discovery tool (a bit like nmap) built in Java Android Studio, and that app is able to find IPs and MAC addresses connected to my home Wi-Fi.

I would like to use MQTT to send a push messages to all the devices on the network asking if they want to subscribe to a topic and receive updates on that topic. I know its possible to use MQTT for push notifications (as described here
Basic Steps for Using MQTT in android ) but I can only find instructions on how to create an app that is sending push notifications to the phone once installed on that phone...

So I don't know how to make the devices in my home connect to my Mosquitto broker and subscribe to the messages sent via MQTT. I'd like to push messages to devices other than Android phones (say to my FireStick) but is this possible?

Or is it not possible unless the devices have the MQTT app installed in them as well?? Or because not all devices will have open ports accepting incoming notifications?

The final goal is to build something like https://home-assistant.io/ but in Java.

Thanks in advance

Mehmet
  • 95
  • 9

1 Answers1

1

Or is it not possible unless the devices have the MQTT app installed in them as well?

If by "the MQTT app", I assume you mean some code of yours that not only connects to your broker but subscribes to your desired topics and then does something in response to those topics. In that case, yes, the devices would need your MQTT app installed on them, assuming that such a thing is possible for that particular device.

Or because not all devices will have open ports accepting incoming notifications?

AFAIK, MQTT clients do not need open ports, which is good from a security standpoint.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491