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.
- - about to transform '[1441962686,15621919,"Wh"]' by the function '.*,(.*),.*'
- - mySQL: Stored item 'Flukso3' as '15621919'[15621919] in SQL database
- - 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:
- Number Flukso1 "Fase 1 [%.2f]" (gFlukso) {mqtt="<[mosquitto:/sensor/SensorId/counter:state:REGEX(.*,(.*),.*)]"}
- Number Flukso2 "Fase 2 [%.2f]" (gFlukso) {mqtt="<[mosquitto:/sensor/SensorId/counter:state:REGEX(.*,(.*),.*)]"}
- Number Flukso3 "Fase 3 [%.2f]" (gFlukso) {mqtt="<[mosquitto:/sensor/SensorId/counter:state:REGEX(.*,(.*),.*)]"}
The graph I now produced is just 3 straight lines.
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 ;-)
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
Topic
/sensor/00dbecba1ad441751353a0e74734f762/tmpo/0/8/1441982720/gz
and the content
And the one already earlier discovered
Topic
/sensor/00dbecba1ad441751353a0e74734f762/counter
content
[1441983099,15623262,"Wh"]
All help on how to proceed is welcome.
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.
Or you derive the watts from the counter values by difference calculation
With the correct multiplication to actually resolve the units to either seconds or minutes or hours...
With respect to MQTT here everything is explained extensively: https://www.flukso.net/content/mqtt-mq-telemetry-transport