(No library is wrapped...)
Go back to example list / Go to the repository of this example on GitHub
| a | b | c | |
| 1 | 月日 | 時分 | ご用件 |
|---|---|---|---|
| 2 | 5/19 | 11:10 | 西新橋には先に行ってるね。by RM |
| 3 | |||
| 4 | |||
| 5 | |||
| 3日過ぎたものは消します。 | |||
This HTML program (re)writes the message into the message board after the above subscriber has received the following command.
write xy msg
a" means the date column because the column is at the leftmost and has the code "a." You have to specify with a row number in practice, like that "a1."1" means the head line of the table because the head line is numbered one. You have to specify with a column code in practice, like that "a1."This is a control panel to try to use the MQTTwrapper class. This library makes your web browser an MQTT-over-WebSocket speaker. And then the protocol is very helpful to send/receive text data (also byte stream) from/to the UNIX stdin/stdout.
Only one simple application is required to connect to the stdin/stdout. That is "Mosquitto."
Try to use me by the following steps.
The installation instructions are on this page.
Copy and save the following text as the file "mosquitto.local.conf" in your favor directory.
Type the following command on your UNIX terminal.
In the "HOST" section, fill in the URL form (Specify "ws://localhost:8000/" to use the above MQTT broker, of course, it's OK to use another broker.) and push the "Connect" button. Then, wait for the button name to be "CONNECTED."
Decide on the topic name in the "RECV" secion and type it into the "topicname" field. Then, push the "Start" button in the same section.
Publish a message rewriting command on your UNIX terminal with the same topic name and to the same MQTT broker as what you specified in this HTML, like this:
Then you can see the message you published on the message board.
Or you can also publish the same rewriting command from the publisher in the "SEND" section on this HTML.