PubSub and IOT devices

I have built several IOT devices using the ESP8266. These devices publish measurements (temperature, pressure etc) as a JSON record to Mosquitto.

Here is an example:
{“Last Record”:“2/13/20 07:31:39”,“Sketch Version”:2.05,“Temperature”:72.39,“Humidity”:35.78,“Pressure”:29.7,“Last Reboot”:“2/7/20 10:47:27”,“Motion”:0,“Distance”:1223.64,“Light”:0}

Is it possible to have a JID user subscribe to any/all of these messages? Say, a notification that motion was detected at a given location…

Is this something that can be done from the admin console?

Thanks

Renato

1 Like

AIUI, Mosquitto / MQTT is not natively XMPP.

It would be possible to write an Openfire plugin that acts as a bridge from MQTT to XMPP; you could route all MQTT messages to a pubsub node, and subscribe a user to that node. However I wonder if you may be better off sticking with MQTT natively?

Greg

Chat with Arduino/esp8266 through XMPP seems feasible but writing a plugin using Publishing data using the Personal Eventing Protocol (PEP) would indeed be the better approach.