Flukso and OpenHAB

A few weeks ago I read that Flukso is able to send out MQTT messages. OpenHAB is also able to receive those messages.
I did set up the MQTT binding in OpenHAB and do receive the information from the sensor.
Below an overview of the info I do receive from Flukso in OpenHAB.

  1. - about to transform '[1441962686,15621919,"Wh"]' by the function '.*,(.*),.*'
  2. - mySQL: Stored item 'Flukso3' as '15621919'[15621919] in SQL database

As I have 3 phase system I do receive this 3x.

How can I "convert" (transform) the data from Flukso into "usefull" values.
I want to be able to make a similair chart as the Flukso dash.

The code I used in my items file is below:

  1. Number Flukso1 "Fase 1 [%.2f]" (gFlukso) {mqtt="<[mosquitto:/sensor/SensorId/counter:state:REGEX(.*,(.*),.*)]"}
  2. Number Flukso2 "Fase 2 [%.2f]" (gFlukso) {mqtt="<[mosquitto:/sensor/SensorId/counter:state:REGEX(.*,(.*),.*)]"}
  3. Number Flukso3 "Fase 3 [%.2f]" (gFlukso) {mqtt="<[mosquitto:/sensor/SensorId/counter:state:REGEX(.*,(.*),.*)]"}

The graph I now produced is just 3 straight lines.

gebhardm's picture

What do you want to show in the graph? Watts (are sent on /sensor/SensorId/gauge) or Watthours per counter value transmitted? From your description it is rather hard to derive a real requirement without having to dig into OpenHAB...
The OpenHAB Wiki/Community has already some entries with respect to handling MQTT messages.

Thinking pause---

I see, you sent this request also there... - look at the scale: 1E7 (!!!) - so to "see" something, you need to calculate differences and get down to reasonable values that show a "tic" on 1 Wh, not MWh ;-)

Placemaster's picture

I would like to show the consumption in Watts. First I would like to have a graph per phase. Later on I would like to merge them. Something like you made https://energyhacks.files.wordpress.com/2014/02/flm_mqtt_panel.png

I have tried to get some readings for /sensor/SensorId/gauge but I did not get any reading.
With MQTT spy I had a look on all the messages sent by Flukso.
The messages that I see come through are below


and the content

  1. ������m�ˊ�0De��]�i���i�IԀh�Ј�>�� u8ԉ      |" #�D�`�)<�����V{��q� �Q ��o~��:�P߯F�S�%�\� �j^0~&��/
  2. �k-��Pr B�KIK[A����}�}���p�s�c+-.B�yw��~��Y��QZ٦'���)����joɘ�"Tp'HIR����l��Mz�����_��w̐D��

And the one already earlier discovered


All help on how to proceed is welcome.

gebhardm's picture

The gz is a packed (gzip) tmpo file - this is another story; by topic "#" on the FLM MQTT broker you see everything sent; if the counters are transmitted, the gauges are, too.

gebhardm's picture

Or you derive the watts from the counter values by difference calculation

  1. counter@(time t1)[Wh] - counter@(time t0)[Wh]
  2. ---------------------------------------------
  3.        ((time t1) - (time t0))[sec]

With the correct multiplication to actually resolve the units to either seconds or minutes or hours...