MQTT.fx 0.0.7 released
A new version of MQTT.fx is available featuring:
- Scripting support
- Setup/Re-configuration tool
- Reviewed Connection Profile Editor
- Reviewed UI and style
Download latest binaries HERE.
Scripting support
I have added support for scripts executed by the Nashorn Engine.
Thought it might be helpful for testing a MQTT message flow of a certain setup, e.g. simulate sensors sending temperature value messages. All controlled via the UI.
Adding new scripts
New scripts can be easily made available for execution via the UI. The app is scanning a folder named “scripts” located at the MQTT.fx working directory:
OS X: [USER_HOME]/Library/Application Support/MQTT-FX/scripts
Windows: [USER_HOME]\AppData\Local\MQTT-FX\scripts
Linux: [USER_HOME]/MQTT-FX/scripts
If this folder does not exists it is created by MQTT.fx containing a demo script.
Naming convention:
[INDEX]__[NAME].js01__Switch_Fountain_Test.js
[INDEX] - controls the order of the entry in the drop down menu
__ - delimiter between index and name
[NAME] - the name of the menu entry (words are delimit by '_')
Hint:
If you name a script “separator”, e.g. 02__separator.js
a separator is added to the menu at the “index” position.
Example script:
var Thread = Java.type(“java.lang.Thread”);
var System = Java.type(‘java.lang.System’);
function execute(action) {
out(“Test Script: ” + action.getName());
for (var i = 0; i function execute(action).
During script execution System.out
is hooked by MQTT.fx to print output to the console. Thus with System.out.println()
messaged can be printed to the UI-console.
The interface to the broker-connection is the bound mqttManager
. Messages can be published via the established broker connection.
Setup/Re-configuration Tool
If no configuration can be found, the app assumes its first start. The user is promoted with a setup dialog to create e new configuration.
Also if a configuration has been found but it seems to be corrupt or the format doesn’t fit a newer version also a new configuration can be created or the exiting config can be opened in an external editor (assumed an editor has been assigned to open *.xml
-files.
Reviewed Connection Profile Editor
Now the Connection Profile Editor is recognising wether the chosen profile has been changed (buttons are enabled/disabled accordingly). Changes can be reverted as not already applied.
Reviewed UI and Style
Greetings from Yosemity! 😉
Great work, again! Loving these updates.
Any plans to make the source available? Just curious 🙂
Also, is there any way to get JavaFX apps to autoupdate / check for updates? would be handy.
Thanks Andy, you’re welcome!
Still not sure about opening the source code. Once I am (more or less) happy with the code I think it will get open source.
By now there is no standard API for app updates. Anyway I am working on a small Appcast based framework for my apps.
Hi,
I am trying to create to instance of MQTT.fx annd connect it to a broker but i am not able to do so. When i try to connect second instance to broker, connection to my instance with broker gets disconnected. But with other other tools i am able to connect two instances to the broker.
Is there any thing which i am doing wrong.
Thanks,
Hi!
Thanks for using MQTT.fx!
I see two things here:
1. Make sure to use the latest MQTT.fx release (0.0.14): http://mqttfx.jfx4ee.org/index.php/download
2. Verify that you set different “Client ID”s for the two connections.
Jens