{"id":1423,"date":"2014-08-27T00:38:46","date_gmt":"2014-08-26T22:38:46","guid":{"rendered":"http:\/\/www.jensd.de\/wordpress\/?p=1423"},"modified":"2014-09-03T21:55:48","modified_gmt":"2014-09-03T19:55:48","slug":"mqtt-fx-0-0-7-released","status":"publish","type":"post","link":"https:\/\/www.jensd.de\/wordpress\/?p=1423","title":{"rendered":"MQTT.fx 0.0.7 released"},"content":{"rendered":"<p><strong>A new version of MQTT.fx is available featuring:<\/strong><\/p>\n<ul>\n<li>Scripting support<\/li>\n<li>Setup\/Re-configuration tool<\/li>\n<li>Reviewed Connection Profile Editor<\/li>\n<li>Reviewed UI and style<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1451\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1451\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start.png\" data-orig-size=\"953,451\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"007_start\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start-300x141.png\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start.png\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start.png\" alt=\"007_start\" width=\"953\" height=\"451\" class=\"aligncenter size-full wp-image-1451\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start.png 953w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_start-300x141.png 300w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><\/a><\/p>\n<p><strong>Download latest binaries <a href=\"http:\/\/www.jensd.de\/apps\/mqttfx\/\"target=\"_new\">HERE<\/a>.<\/strong><\/p>\n<p><strong>Scripting support<\/strong><\/p>\n<p>I have added support for scripts executed by the Nashorn Engine.<br \/>\nThought 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. <\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1437\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1437\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript.jpg\" data-orig-size=\"658,204\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"007_executescript\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript-300x93.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript.jpg\" alt=\"007_executescript\" width=\"658\" height=\"204\" class=\"aligncenter size-full wp-image-1437\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript.jpg 658w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_executescript-300x93.jpg 300w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><\/a><\/p>\n<p><strong>Adding new scripts<\/strong><\/p>\n<p>New scripts can be easily made available for execution via the UI. The app is scanning a folder named &#8220;scripts&#8221; located at the MQTT.fx working directory:<br \/>\n<strong>OS X:<code> [USER_HOME]\/Library\/Application Support\/MQTT-FX\/scripts<\/code><\/strong><br \/>\n<strong>Windows: <code>[USER_HOME]\\AppData\\Local\\MQTT-FX\\scripts<\/code><\/strong><br \/>\n<strong>Linux:<code> [USER_HOME]\/MQTT-FX\/scripts<\/code><\/strong><br \/>\nIf this folder does not exists it is created by MQTT.fx containing a demo script.<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1432\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1432\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir.jpg\" data-orig-size=\"352,242\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"007_workingdir\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir-300x206.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir.jpg\" alt=\"007_workingdir\" width=\"352\" height=\"242\" class=\"aligncenter size-full wp-image-1432\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir.jpg 352w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_workingdir-300x206.jpg 300w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/a><\/p>\n<p>Naming convention:<\/p>\n<p>[INDEX]__[NAME].js<br \/>\n<code><strong>01__Switch_Fountain_Test.js<\/strong><\/code><br \/>\n<code><br \/>\n[INDEX] - controls the order of the entry in the drop down menu<br \/>\n__      - delimiter between index and name<br \/>\n[NAME]  - the name of the menu entry (words are delimit by '_')<br \/>\n<\/code><\/p>\n<p><strong>Hint:<\/strong><br \/>\nIf you name a script &#8220;separator&#8221;, e.g. <code><strong>02__separator.js<\/strong><\/code> a separator is added to the menu at the &#8220;index&#8221; position.<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1433\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1433\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting.jpg\" data-orig-size=\"948,455\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"007_scripting\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting-300x143.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting.jpg\" alt=\"007_scripting\" width=\"948\" height=\"455\" class=\"aligncenter size-full wp-image-1433\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting.jpg 948w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_scripting-300x143.jpg 300w\" sizes=\"(max-width: 948px) 100vw, 948px\" \/><\/a><\/p>\n<p>Example script:<\/p>\n<p>[javascript]<br \/>\nvar Thread = Java.type(&#8220;java.lang.Thread&#8221;);<br \/>\nvar System = Java.type(&#8216;java.lang.System&#8217;);<\/p>\n<p>function execute(action) {<br \/>\n    out(&#8220;Test Script: &#8221; + action.getName());<br \/>\n    for (var i = 0; i < 10; i++) {\n        switchON();\n        Thread.sleep(500);\n        switchOFF();\n        Thread.sleep(500);\n    }\n    action.setExitCode(0);\n    action.setResultText(\"done.\");\n    out(\"Test Script: Done\");\n    return action;\n}\n\nfunction switchON() {\n    out(\"fountain ON\");\n    mqttManager.publish(\"home\/garden\/fountain\", \"ON\");\n}\n\nfunction switchOFF() {\n    out(\"fountain OFF\");\n    mqttManager.publish(\"home\/garden\/fountain\", \"OFF\");\n}\n\nfunction out(message){\n    System.out.println(message);\n}\n[\/javascript]\n\nThe entry point of execution is the <code><strong>function execute(action)<\/strong><\/code>.<br \/>\nDuring script execution <code><strong>System.out<\/strong><\/code> is hooked by MQTT.fx to print output to the console. Thus with <code><strong>System.out.println()<\/strong><\/code> messaged can be printed to the UI-console.<\/p>\n<p>The interface to the broker-connection is the bound <code><strong>mqttManager<\/strong><\/code>. Messages can be published via the established broker connection.<\/p>\n<p><strong>Setup\/Re-configuration Tool<\/strong><\/p>\n<p>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. <\/p>\n<p>Also if a configuration has been found but it seems to be corrupt or the format doesn&#8217;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 <code>*.xml<\/code>-files.<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1428\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1428\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup.jpg\" data-orig-size=\"596,625\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"007_setup\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup-286x300.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup.jpg\" alt=\"007_setup\" width=\"596\" height=\"625\" class=\"aligncenter size-full wp-image-1428\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup.jpg 596w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_setup-286x300.jpg 286w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/a><\/p>\n<p><strong>Reviewed Connection Profile Editor<\/strong><br \/>\nNow 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.<\/p>\n<p><a href=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1434\" data-permalink=\"https:\/\/www.jensd.de\/wordpress\/?attachment_id=1434\" data-orig-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile.jpg\" data-orig-size=\"925,653\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"007_newprofile\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile-300x211.jpg\" data-large-file=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile.jpg\" tabindex=\"0\" role=\"button\" src=\"http:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile.jpg\" alt=\"007_newprofile\" width=\"925\" height=\"653\" class=\"aligncenter size-full wp-image-1434\" srcset=\"https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile.jpg 925w, https:\/\/www.jensd.de\/wordpress\/wp-content\/uploads\/2014\/08\/007_newprofile-300x211.jpg 300w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/a><\/p>\n<p><strong>Reviewed UI and Style<\/strong> <\/p>\n<p>Greetings from Yosemity! \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/www.jensd.de\/wordpress\/?p=1423\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">MQTT.fx 0.0.7 released<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"MQTT.fx 0.0.7 released http:\/\/wp.me\/p38FCL-mX","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[22,42,30,4,58,46,50,57,54,47,49],"tags":[88,101,91,76,111,102,106,109],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p38FCL-mX","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1423"}],"collection":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1423"}],"version-history":[{"count":27,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1423\/revisions"}],"predecessor-version":[{"id":1862,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1423\/revisions\/1862"}],"wp:attachment":[{"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jensd.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}