Dev corner

Calling all engineers, tinkerers, hackers and geeks.

MQTT Messages for "gauge"

I am using Flukso in connection with FHEM (Home Automation). FHEM is subscribed to the MQTT-Queque of my local MQTT-Broker and is running fine (I am using most the counter-Data). Now i like to use the "gauge"-Data for a special analysis ("When does the heater uses gas and when not"). As soon the heater uses gas i get a new MQTT-Message. But when the heater is finished using gas, i did not get an "0" MQTT-Message. Instead there are no further messages until the heater uses gas again. Is it somehow possible getting this information? In the Panel-Module from Markus Gebhardt is a "workaround": When there is no new message within 60 Sec. then the panel shows 0. Also when i use the http-API, it returns a "nan"-Value.

Any help is appreciated.

Regards

Andreas

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
  3. - mySQL: INSERT INTO Item1 (TIME, VALUE) VALUES(NOW(),'15621919') ON DUPLICATE KEY UPDATE VALUE='15621919';

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.

Simple graphically styled display summarising everything including net consumption

In the "Flukso would need section" there was a debate on applications (Android, iOS, HTML5) to visualize FLM readings - see https://www.flukso.net/content/home-display-android-app
This request partly is solved by installing the FLMlocal tweak, but still lacks some more simplicity, e.g. the direct visualization on supply and consumption in a decent outline.
As this request could be fulfilled by adding "just another tab" on the FLMlocal visualizations, it is yet to be figured out on how to efficiently define (and store) information on the actual direction of (energy) flow.
At the moment I can imagine to spend a "direction flag" on input data, either on the display itself (would require a cookie to keep settings) or better already in the device configuration - but this is just a thought.
So, let's open up a solution discussion on how to increase user experience on FLM data visualization.
First requirements though:

REQ-FLM-SIMPLEVIZ-1: FLM (power) sensors shall distinguish direction of flow, thus define either supply or consumption.

REQ-FLM-SIMPLEVIZ-2: An FLM simple visualization shall show consumption, supply and a combination/total of both (refer to attached picture by TOMMYVILLE). Note: For production fed back into the grid also a feasible display is required.

By the way: You don't have to tweak your Fluksometer to test this; you may have a look at all this also on your (Linux/OSX) desktop - follow the white rabbit...

Device settings: Better visualize device operations [solved]

As the discussion in https://www.flukso.net/content/new-firmware-and-upgrade-descriptions-dum... indicates, it may not be "obvious" on how to distinguish different device operations in the settings section of this website. For this purpose a simple mitigation is proposed, using the capabilities of the given CSS, to enhance the different operations' links by a <a href="/user/x/device/y/remove" class="btn btn-default" role="button">remove</a> instead of showing the operation just as text. This would provide a "more haptic" distinction resulting in the view as in attached screen capture.

v246: Issue with TMPO [solved]

After upgrade to firmware v2.4.6 I recognized today that no more TMPO data was registered; the persisted information seems to have stopped at the time of the upgrade.
ps shows that the tmpo-daemon is running
684 flukso    5280 S    /usr/sbin/fluksod -u flukso
but there is no activity in the storage folders
/usr/share/tmpo/sensor/0
There is actually a difference to a backup I made prior to the update, but this "newer" content seems to stop at timestamp 1436876800 (14.07.2015 14:26:40) - no more readings persisted after this point in time... (luckily I have my parallel MQTT tracker running, so I know there were readings)
(also a reboot did not change this behavior - everything else seems to run smoothly)