Feb 23

MQTT.fx 0.0.14.3 – bug fix release

You can download latest binaries at mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.

Version 0.0.14.3 contains some bug fixes (since 0.0.14 release):

  • [Fixed] Issue #27 Disconnection when publishing to a second broker
  • [Fixed] bug when to show only latest messages
  • [Fixed] bug when receiving broker status messages ($SYS-topics)
Feb 07

MQTT.fx 0.0.14 released

As always you can download latest binaries at mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.
Also the Update Feature of 0.0.13 should inform you, that there are updates available (See NNOTE 1 at bottom of this page)!

Reviewed Clipboard Messages

  • Order can now be changed by Drag-and-Drop
  • Can be published instantly by click on Button
  • Changes are now stored immediately

messages-clipboard

All new approach with topics and messages

  • Rendering revisited
  • Colors of topics can now be customized (messages are colored accordingly)
  • Colors of topics are persisted in configuration
  • Topics can now be unsubscribed by click on “-” (messaged will be removed accordingly)
  • Number of received messages per topic is shown
  • Messages also do show the wildcard topics to which they have matched
  • Only longer payloads are expandable now, one-liner are shown as subject
  • “Copy Payload” is now accessible without expanding the payload
  • Improved performance

message-rendering

topic-color

Support for HTTPS proxy connection options
In respect to Dino Tsoumakis ;-)
https proxy

Anything else?

  • Fixed an issue with unrecognized (but allowed) characters in topics

I was asked how to add new Scripts
I mentioned this before in a post (but this was 6 month ago ;-)).

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 scripts.
Naming convention:
[INDEX]__[NAME].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 ‘_’)

E.g.: With these files in the “scripts” folder
01__Switch_Fountain_Test.js
02__Subscribe_Publish_Unsubscribe_Test.js

the menu looks like this:
scripts menu

NOTE 1: In 0.0.13 the Update Feature has a bug!
The new install packages are loaded but yet not always renamed on Windows and Linux (this is fixed in 0.0.14). You will find the packages ending with postfix “.download”. You have to rename it manually.

NOTE 2: The format of the configuration has changed!
You may have to delete you current configuration and restart MQTT.fx. MQTT.fx will create a new default configuration for you!

Feb 06

SweetHomeHub: Home Control with Raspberry Pi and MQTT – Part 1

Since quite a long time I am working on my universal Raspberry Pi based Intertechno-Remote (see former posts 1 2 3 4):

intertechno remote

I tried different approaches to trigger/control my remote control service via a custom HTTPServer/-Handler and a simple Vert.x verticle.
Since MQTT v3.1.1 turns out as on of the de-facto standard protocols for the IoT I also implemented an MQTT client.

This MQTT client basically follows two design patterns:

1. One topic for each device
For each device a topic is defined. Its state can be controlled by publishing a message with payload “ON” or “OFF”.
Pro:

  • the user must not know about the address code of the Intertechno device
  • changes of the address must not be published
  • the message is simply “ON” or “OFF to control the device

Contra:

  • the user must know the topic for each device
  • the user can only control configured devices

2. One topic for a JSON message
Pro:

  • very flexible to control the devices

Contra:

  • the user must know about the syntax of the JSON and the coding of devices

Solution:
Provide both options ;-)

One topic for each device

topics_table

My configuration is very simple
On start-up the Client is searching for sweethomehub-config.xml in the users home directory which is then unmarshalled from JAXB.
This configuration contains the codes and the topic for each device and the MQTT settings for the broker connection:

<configuration>
    <devices>
        <device>
            <houseCode>a</houseCode>
            <groupId>1</groupId>
            <deviceId>1</deviceId>
            <name>Light Front-Door</name>
            <mqttTopic>front/lights/door</mqttTopic>
        </device>
        <device>
            <houseCode>a</houseCode>
            <groupId>1</groupId>
            <deviceId>2</deviceId>
            <name>Light Terrace</name>
            <mqttTopic>garden/lights/terrace</mqttTopic>
        </device>
        <device>
            <houseCode>a</houseCode>
            <groupId>1</groupId>
            <deviceId>3</deviceId>
            <name>Fountain</name>
            <mqttTopic>garden/devices/fountain</mqttTopic>
        </device>
        <device>
            <houseCode>a</houseCode>
            <groupId>1</groupId>
            <deviceId>4</deviceId>
            <name>Light Garden</name>
            <mqttTopic>garden/lights/ambiente</mqttTopic>
        </device>
        <device>
            <houseCode>a</houseCode>
            <groupId>1</groupId>
            <deviceId>3</deviceId>
            <name>Light Living Room</name>
            <mqttTopic>livingroom/lights/ambiente</mqttTopic>
        </device>
    </devices>
    <mqttClientConfiguration>
        <mqttClientId>SweethoemMQTTClientId</mqttClientId>
        <mqttBrokerAddress>sweethome</mqttBrokerAddress>
        <mqttBrokerPort>1883</mqttBrokerPort>
        <mqttMessagesBaseTopic>sweethome</mqttMessagesBaseTopic>
    </mqttClientConfiguration>
</configuration>

And there is one additional topic awaiting the JSON commands:
sweethome/devices/jsoncommand

{
  "devices":[
    {
      "device":{
        "name": "Light Front-Door",
        "houseCode": "a",
        "groupId": "1",
        "deviceId": "1"
      },
      "command":"ON"
    },
    {
      "device":{
        "name": "Light Terrace",
        "houseCode": "a",
        "groupId": "1",
        "deviceId": "2"
      },
      "command":"ON"
    },
    {
      "device":{
        "name": "Light Living Room",
        "houseCode": "a",
        "groupId": "1",
        "deviceId": "3"
      },
      "command":"ON"
    }
  ]
}

The central method to handle arrived messages:

MqttMessageReceiver.messageArrived

The JsonDeviceCommandProcessor:

JsonCommandProcessor

And the doSwitch methods:

DeviceControl

MQTT Client running on the Raspberry Pi waiting for messages:
mqtt-receiver

… and receiving command messages:

mqtt-receiver-commands

Testing the receiver with MQTT.fx

mqtt-fx

Complete code can be found at BitBucket.

Jan 16

MQTT.fx 0.0.13 released

Download latest binaries at mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.

New in this version:

Extended Scripting Features

  • fixed issues with starting external editor to edit scripts
  • support for subscribe/unsubscribe to Mqtt-Scripting interface

Redesinged and extended Settings Dialog

  • option to choose whether the default system editor should be use or a custom edit command
  • option to choose whether to check for updates on app start

new-settings

settings-script

settings-update

Build in Update Feature

  • Added support Refuel API for application updates

check-updates

updates-available

updates-load

KUDOs to my friend Dino Tsoumakis for his great work on his application update tool for Java 8 “Refuel” (view on github)!

Dec 19

MQTT.fx 0.0.12 released

Download latest binaries at mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.

New in this version:

MQTT version support for 3.1 and 3.1.1
The MQTT version can be set via ConnectonProfile (default: 3.1.1, if not supported by broker: 3.1)
mqttfx-mqtt-version

New: “Log”-tab
MQTT.fx 0.0.12 introduces a new tab to capture/show the logging stream:
mqttfx-log-tab

Changed rendering of messages
mqttfx-message-tile

Wildcard Topics
Improved handling of topics containing wildcards.

MQTT.fx is now using paho 1.0.1

Fixed bugs and issues
Fixed some issues when connect/disconnect/connection lost

Nov 11

MQTT.fx 0.0.11 released

Download latest binaries in all flavours at mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.

UPDATE: Now available: MQTT.fx 0.0.11-1 containing a fix for wildcard handling!

New in this version:

Extended option menu
You can now subscribe to all recent topics with one click and also unsubscrive from all topics is supported:
messages_subscribe_all

Improved messages rendering
– the payload of received messages is now collapsible (Issue #15):
collabsible
– topics can be unsubscribed by one click on the trash-icon:
unsubscribe
– the selection of a subscribed topic sets the value of the topics choice boxfor e.g. un-subscrition (Issue #11)
– fixed issues with topics / messages colors

New Filter-Option
– you can now set a filter to show only the latest recevied messages (Issue #8)
onlylatest
– “show notification” property and “show only latest” property are stored per connection profile

Always on Top
Added a new option to set whether detached tabs should be opened always on top:
alwaysontop

Bundled with Java 8u25

Oct 16

MQTT.fx 0.0.10 released

MQTT.fx 0.0.10 was released.

Download latest binaries in all flavours at mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.

New in this version:
MQTT-Message Clipboard

Option to copy the message payload to clipboard
copypayload
Service menus at publish and subscription panel: now you can clear received messages buffer and the recent topics lists
publish_service
subscribe_service

Extended logging to mqttfx.log
Added Application Window Icon (for Windows)
Now running/bundled with Java 8u20
Updated 3rd-party libs (e.g. ControlsFX 8.20.7)

Sep 13

MQTT.fx 0.0.9 released

A new version of MQTT.fx is available (probably the last release before JavaOne)

Download latest binaries in all flavours: mqttfx.org.
Bugs and feature requests can be reported via the issue tracker.

This release comes with some new features:

Message Font Size

(in respect to Gerrit Grunwald @hansolo_)
To improve ledibility of large message bodies now the font size of messages can be set to a fixed value (0.6em – 1.5em) or a dynamic size depending on message size (1.0em – 0.6em).
You can open the new Settings Dialog via Menu Extras / Settings:

settings

Dynamic message font size:

fonts

Clear History

(also in respect to Gerrit Grunwald)
The Connection Profile Dialog (Section “General”) and the Publish/Subscribe panels now the history of last topics can be cleared.

clear_publish

clear_sub

clear_profile

“Never again drive me crazy with silly questions”

(in respect to David Janes @dpjanes)
The Exit Dialog now offers an option “Do not ask me again!” to get not asked again when closing the app.

exit

Bugfixes

Also I again have fixed some bugs (typos, usability, layout + style issues).