Feb 02

FontAwesomeFX 8.9 released

UPDATE: Google Material Icons v2.1

Coming with 96 additional icons.
Now 891 Icons included.

UPDATE: Material Design Icons v1.4.57

With 287 additional icons:
Contains now 1457 Icons!

AH! And I created a dedicated Twitter account: @FontAwesomeFX!

tmp

Get FontAwesomeFX 8.9

Download Binaries: Download
Sources available at Bitbucket

Maven:

<dependency>
  <groupId>de.jensd</groupId>
  <artifactId>fontawesomefx</artifactId>
  <version>8.9</version>
</dependency>

Please report issues here

Jan 08

FontAwesomeFX 8.8 released

*** UPDATE ***

Additional WeatherIcons included

I have added 25 new available icons for Erik Flowers’ (@Erik_UX) WeatherIcons 2.0 (now 222 icons available).

wi

*** FIXED ***

Issue #20: Unable to subclass GlyphIcon
Fixed typos in FontAwesomeIcon enum: FOLDER_OPEN, FOLDER_OPEN_ALT, LIST_OL, STACK_OVERFLOW

Get FontAwesomeFX 8.8

Download Binaries: Download
Sources available at Bitbucket

Maven:

<dependency>
  <groupId>de.jensd</groupId>
  <artifactId>fontawesomefx</artifactId>
  <version>8.8</version>
</dependency>

Please report issues here

Dec 03

MQTT.fx 1.0.0 is here!

Time is passing by and since almost 2 years I am working on MQTT.fx.
During that time I released about 20 versions and I think I can justify the release of version 1.0.0.
There are still ideas for improvements and extensions but MQTT.fx is feature complete now (at least you can pup/sub to topics ;-)).

mqttfx_subscribe

1.0.0 Release Notes

  • [Fixed] Issue #64: mqttfx-config.xml gets saturated with hundreds of topic in recentSubscriptionTopics
  • [New] Issue #59: Copy a topic in the message view
  • [New] Bundled with JRE 1.8.0_66
  • [Fixed] Issues with System MenuBar on OSX
  • [Fixed] Issue #58: Publish not working with 0.0.18
  • [Fixed] Issue #60: 0.0.18 Run hangs on quit
  • [Fixed] Issue #42: Ubuntu 14.04: Crash when trying to check for updates on launch
  • [Fixed] #57: Application crash on startup when found update available.

Blog Post: Walkthrough features [GER]

Download

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

Dec 01

FontAwesomeFX 8.7 released

*** NEW ***

added GitHub Octicons

FontAwesomeFX 8.7 comes with a new Icons Font: GitHub Octicons 3.3.0!
Many thanks to !
Peter Rogge
for his pull-request! Peter has recently been interviewed by Adam Bien about his newly released afterburner.fx NetBeans Plugin.

octicons

*** UPDATE ***

FontAwesome 4.5 included

Additionally I have implemented support for FontAwesome 4.5.0 which comes with 20 new icons (now 694 icons available).

fa45

Get FontAwesomeFX 8.7

Download Binaries: Download
Sources available at Bitbucket

Maven:

<dependency>
  <groupId>de.jensd</groupId>
  <artifactId>fontawesomefx</artifactId>
  <version>8.7</version>
</dependency>

Please report issues here

Nov 06

New version of 2048FX for iOS now available at App Store

The latest version of our JavaFX game 2048FX for iOS is now available at the App Store.
Should have been available since last week for our JavaOne talk “One Codebase to Rule Them All: Going Mobile with 2048FX [CON3255]”, but Apple complained there was a “2048” in the tagline… finally its there now!

Major changes in this release:

  • All new UI (use of Material Design).
  • Three different game modes: Easy (you can save at any time), advanced (save only every new winning tile found) and expert (you can’t save).
  • Share: Sign in with your favorite social network so you can see the best scores of other players and send yours.
  • performance improvements, less disk space usage, fixed some minor bugs.

Load it and enter the Leaderboard! 😉 German / English

iphone5

app_store

gluon_logo-300x300@2x


2048FX is based on the idea of Gabriele Cirulli (http://gabrielecirulli.github.io/2048/) and is a JavaFXports based iOS Port of the JavaFX 8 version of Bruno Borges und José Pereda.
The original code can be found here: https://github.com/brunoborges/fx2048.

Oct 08

MQTT.fx 0.0.18 released

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

0.0.18 Release Notes

[New] Issue #56: Add a “Generate” button for the ClientID.

I have added a Button to generate a unique ClientID in respect to Lady Ada’s nice MQTT.fx tutorial to prevent the need of 3rd party tools ;-):
generate

[Fixed] Issue #51, #50, #46: SSL/TLS certificate issues

You now can also choose a certain CA certificate file:
cert

[Fixed] Issue #55: Abnormal memory usage: Introducing the option or enable/disable

I added an option to the settings dialog to enable/disable subscriptions to $SYS-Topics.
If disabled $SYS related messages are just use to update the “Broker Status” tab, then the messages are released:
sys

[Fixed] Issue #52: subscription didn’t work in some cases

[Fixed] MenuBar issues in OS X

[Fixed] Notification issues

[Changed] Switched to ControlsFX 8.40.10 in respect to JDK 8u60

Sep 25

MQTT.fx 0.0.17 is here!

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

0.0.17 Release Notes

[New] Issue #44: Quick Connect Bar is now available

Now you can switch via the leading icon how the connection should be done:

via a connection profile:

mqttfx-0.0.17-profile

via quick-connect by setting the broker address and broker port:

mqttfx-0.0.17-ad-hoc

[Fixed] App starting issues: Linux version couldn’t locate main class since JDK >=u40

Since I change the underlying JRE from 1.8.0u25 to 1.8.0u40 (an newer) people reported issues when running on Linux. MQTT.fx could not be started as the app main class could not be found:

No main class specified
Failed to launch JVM

To create the bundled application packaged I am using javafx-maven-plugin which was initially created by Daniel Zwolenski and is maintained by Danny Althoff (@fibrefox) since quite a while. It turns out that the since JDK 1.8.0.u40 there is a tricky bug in libpackager.so (aka the loading library): using a “.” in the application name (e.g. MQTT.fx) prevents the launcher to start correctly as the “.cfg” filename is not parsed/extracted correctly.

Kudos to Danny for spending debugging effort ! He quickly provided a new javafx-maven-plugin release and its fixed now with a workaround in 8.1.5.

[Fixed] Issue #49: connection settings dialog now fits on 1366×768 screens

Sep 18

How to instantly replace existing Raspberry Pis by the ESP8266

For my outdoor sensors I used an RaspberryPi with BMP180 + TSL2561 via I2C transferring the sensor data via MQTT messages.

During an IoT Meetup Session at codecentric office in Frankfurt we discussed the usage of an esp8266 and I was thrilled to get one and play with it.

Adafruit HUZAAH ESP8266 breakout highlights

  • 80-MHz-Mikrocontroller
  • Wi-Fi Direct (P2P), soft-AP
  • Integrated TCP/IP protocol stack with DNS Support
  • Wake up and transmit packets in < 2ms
  • 4 MB Flash-Chip
  • Onboard-Antenna
  • Status LEDs
  • Reset button
  • User button that can also put the chip into bootloading mode,
  • I/O:
    • 1 x Analog input (1.8V max)
    • 9 x GPIO (3.3V logic), which can also be used for I2C or SPI
    • 2 x UART pins
    • 2 x 3-12V power inputs, reset, enable, LDO-disable, 3.3V output

It turns out very quickly that the esp8266 is a really great piece of hardware and I planned to replace my Raspberry Pis acting as sensor hosts in my network. With its wifi capabilities the esp8266 lets me still run the I2C sensors with my MQTT approach.

E. g. the current Raspberry Pi installed outdoors sends values to these topics

  • sweethome/sensors/outdoor/temperature
  • sweethome/sensors/outdoor/pressure
  • sweethome/sensors/outdoor/lux

and if get the esp8266 to publish to these topics too the rest of my network won’t event recognize there was a change…

The Plan: Keep the I2C sensors but replace the “brain”.

replace_this by_that
Raspberry Pi HUZAAH ESP8266 breakout
40€ 10€
SD-Card: 4€
WLAN-Stick 8€
Total: 52€ 10€
Power Consumption: 3W 1W

Hardware

IDE

Arduino IDE

Libraries

The Libraries almost all there, can be easily installed via the Arduino IDE Library Manager.
Except for the esp8266 support the an additional Board Manager URL has to be set:
http://arduino.esp8266.com/stable/package_esp8266com_index.json

prefs_additional_board_managers_url

  • ESP8266WiFi
  • Adafruit BMP085 Unified
  • Adafruit TSL2561 Unified
  • Adafruit MQTT Library

library_manager_esp8266

Software

The esp8266 breakout has a build-in support for LUA, but I decided to flash it to be ready for usage with Arduino IDE and C++ (mostly because the drivers are all well supported by Adafruit).

#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
#include <Adafruit_TSL2561_U.h>

/************************* WiFi Access Point *********************************/

#define WLAN_SSID       "Lummerland"
#define WLAN_PASS       "****************"

/************************* MQTT Broker Setup *********************************/

const int MQTT_PORT = 1883;
const char MQTT_SERVER[] PROGMEM    = "192.168.0.61";
const char MQTT_CLIENTID[] PROGMEM  = "ESP-PUBLISHER-SERVICE";
const char MQTT_USERNAME[] PROGMEM  = "********";
const char MQTT_PASSWORD[] PROGMEM  = "********";

// Create an ESP8266 WiFiClient class to connect to the MQTT server.
WiFiClient client;

Adafruit_MQTT_Client mqtt(&client, MQTT_SERVER, MQTT_PORT, MQTT_CLIENTID, MQTT_USERNAME, MQTT_PASSWORD);

/****************************** Feeds ***************************************/
const char TEMPERATURE_FEED[] PROGMEM = "sweethome/sensors/outdoor/temperature";
Adafruit_MQTT_Publish temperature_topic = Adafruit_MQTT_Publish(&mqtt, TEMPERATURE_FEED);

const char PRESSURE_FEED[] PROGMEM = "sweethome/sensors/outdoor/pressure";
Adafruit_MQTT_Publish pressure_topic = Adafruit_MQTT_Publish(&mqtt, PRESSURE_FEED);

const char LUMINOSITY_FEED[] PROGMEM = "sweethome/sensors/outdoor/lux";
Adafruit_MQTT_Publish luminosity_topic = Adafruit_MQTT_Publish(&mqtt, LUMINOSITY_FEED);

Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);
Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345);

/*************************** Sketch Code ************************************/

void setup() {
  Serial.begin(115200);
  delay(10);

  Serial.println("Sensor Test");
  if (!bmp.begin())
  {
    Serial.print("Ooops, no BMP180 detected ... Check your wiring or I2C ADDR!");
    while (1);
  }
  else {
    Serial.println("BMP180 ready.");
  }
  if (!tsl.begin())
  {
    Serial.print("Ooops, no TSL2561 detected ... Check your wiring or I2C ADDR!");
    while (1);
  }
  else {
    Serial.println("TSL2561 ready.");
  }

  configureTSL2561();

  // Connect to WiFi access point.
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(WLAN_SSID);

  WiFi.begin(WLAN_SSID, WLAN_PASS);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println();

  Serial.println("WiFi connected");
  Serial.println("IP address: "); Serial.println(WiFi.localIP());
}

void loop() {
  MQTT_connect();

  /* Get a new sensor event */
  sensors_event_t bmpEvent;
  bmp.getEvent(&bmpEvent);

  if (bmpEvent.pressure)
  {
    float temperature;
    bmp.getTemperature(&temperature);
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.println(" C");
    Serial.print("Publish Temperature: ");
    if (! temperature_topic.publish(temperature)) {
      Serial.println("Failed");
    } else {
      Serial.println("OK!");
    }

    float pressure = bmpEvent.pressure;
    Serial.print("Pressure:    ");
    Serial.print(pressure);
    Serial.println(" hPa");
    Serial.print("Publish Pressure: ");
    if (! pressure_topic.publish(pressure)) {
      Serial.println("Failed");
    } else {
      Serial.println("OK!");
    }
  }
  else
  {
    Serial.println("Sensor error");
  }

  sensors_event_t tslEvent;
  tsl.getEvent(&tslEvent);
  unsigned int luminosity = 0;
  if (tslEvent.light)
  {
    luminosity = tslEvent.light;
  }

  Serial.print("Luminosity:   ");
  Serial.print(luminosity);
  Serial.println(" lux");
  Serial.print("Publish Luminosity: ");
  if (! luminosity_topic.publish(luminosity)) {
    Serial.println("Failed");
  } else {
    Serial.println("OK!");
  }

  delay(5000);
}

void configureTSL2561()
{
  /* You can also manually set the gain or enable auto-gain support */
  // tsl.setGain(TSL2561_GAIN_1X);      /* No gain ... use in bright light to avoid sensor saturation */
  // tsl.setGain(TSL2561_GAIN_16X);     /* 16x gain ... use in low light to boost sensitivity */
  tsl.enableAutoRange(true);            /* Auto-gain ... switches automatically between 1x and 16x */

  /* Changing the integration time gives you better sensor resolution (402ms = 16-bit data) */
  tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_13MS);      /* fast but low resolution */
  // tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_101MS);  /* medium resolution and speed   */
  // tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_402MS);  /* 16-bit data but slowest conversions */
}

void MQTT_connect() {
  int8_t ret;

  // Stop if already connected.
  if (mqtt.connected()) {
    return;
  }

  Serial.print("Connecting to MQTT... ");

  while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
    switch (ret) {
      case 1: Serial.println("Wrong protocol"); break;
      case 2: Serial.println("ID rejected"); break;
      case 3: Serial.println("Server unavailable"); break;
      case 4: Serial.println("Bad user/password"); break;
      case 5: Serial.println("Not authenticated"); break;
      case 6: Serial.println("Failed to subscribe"); break;
      default: Serial.print("Couldn't connect to server, code: ");
        Serial.println(ret);
        break;
    }
    Serial.println("Retrying MQTT connection in 5 seconds...");
    mqtt.disconnect();
    delay(5000);  // wait 5 seconds
  }
  Serial.println("MQTT Connected!");
}

To get the program running on the esp board you have to

Get the esp8266 into flash mode

press + hold “Reset” button
then
press + hold “GPIO0” button
then
release “Reset” button
then
release “GPIO0” button
-> the red LED turns on (with lower brightness)

flash

Ready for uploading

Open the Serial Monitor to see what’s going on:

arduino_ide_open_serial_monitor

Note the “Board”, “CPU Frequency”, “Upload Speed” and the “Port” settings! 

Before uploading you can build the program by click on “Verify”:

click_upload output_verify

Then start uploading:

click_upload output_uploadThe program starts immediately and the Serial Monitor shows whats going on:

serial_monitor

To debug/monitor the MQTT messages I am using MQTT.fx (of course ;-)):

mqttfx

No changes had to made to other components of my networks. The replacement was transparent to the (Mobile) Clients also:

iphone