MQTT Message Topic Speficication
Describes the topic specifications of MQTT messages in CloudPRNT Version MQTT .
CloudPRNT server side
Subscribe
A CloudPRNT server subscribes to messages on the following topics.
Subscribe to messages from all printers that connect to the same MQTT broker as a CloudPRNT server.
star/cloudprnt/to-server/#
Receiving topic example
star/cloudprnt/to-server/00:11:22:aa:bb:cc/client-status
star/cloudprnt/to-server/00:11:22:aa:bb:cc/print-result
Note
In CloudPRNT Version MQTT (Trigger POST), no MQTT messages are published by a printer.
So a CloudPRNT server does not need to subscribe to MQTT messages.
Publish
A CloudPRNT server issues messages to printers on the following topics.
Server can specify individual printers by topic.
star/cloudprnt/to-device/{printermac}/{method}
Publication topic example
star/cloudprnt/to-device/00:11:22:aa:bb:cc/print-job
star/cloudprnt/to-device/00:11:22:aa:bb:cc/request-post
Printer side
Subscribe
Printers running on CloudPRNT Version MQTT subscribe to messages on the following topics.
A printer only receives messages specifying its own MAC address.
star/cloudprnt/to-device/{printermac}/#
Publish
Printers working with CloudPRNT Version MQTT (Full MQTT / Pass URL) publish messages on the following topics.
A CloudPRNT server can identify the source and method of a message just by its topic.
star/cloudprnt/to-server/{printermac}/{method}
Optional: Customize Topic Name
As explained above, the topic name defaults to:
Message to server: star/cloudprnt/to-server/{printermac}/{method}
Message for printer: star/cloudprnt/to-device/{printermac}/{method}
As an optional function, you can change the prefix of the topic name that a printer subscribes to and publishes according to the setting value obtained by the server response of Server setting information request (GET) .
Example: Describe as follows in the response body JSON.
"deviceSubscribeTopicName" : "test/system/to-device/{MAC}",
"devicePublishTopicName" : "test/system/to-server/{MAC}",
With the above setting example, a printer subscribes and publishes as follows.
Topic name that a printer subscribes to: test/system/to-device/00:11:22:aa:bb:cc/#
Topic name published by a printer : test/system/to-server/00:11:22:aa:bb:cc/{method}
Adding /# to the value of the deviceSubscribeTopicName key becomes the topic name to which a printer subscribes.
Adding /{method} to the value of the devicePublishTopicName key will be the topic name published by the printer. Actual values for {method} are client-status, print-result, etc.