If machines can communicate over MQTT then frappe can publish as well as subscribe to MQTT broker.
Refer Sample app to publish and subscribe to MQTT5
There’s sample app that you can refer in the above post. Programming will be needed. MQTT broker services also needed.
If machines are already communicating over MQTT there must be already a broker service running.