I am one step further. With the code below I managed to get some readings in the debug log.
20:09:09.586 [DEBUG] [i.s.RegExTransformationService:42 ] - about to transform '[1441476549,19099872,"Wh"]' by the function '.*,(.*),.*'
20:09:11.570 [DEBUG] [i.s.RegExTransformationService:42 ] - about to transform '[1441476551,19099873,"Wh"]' by the function '.*,(.*),.*'
20:09:12.571 [DEBUG] [i.s.RegExTransformationService:42 ] - about to transform '[1441476552,19099874,"Wh"]' by the function '.*,(.*),.*'
20:09:14.568 [DEBUG] [i.s.RegExTransformationService:42 ] - about to transform '[1441476554,19099875,"Wh"]' by the function '.*,(.*),.*'
20:09:15.571 [DEBUG] [i.s.RegExTransformationService:42 ] - about to transform '[1441476555,19099876,"Wh"]' by the function '.*,(.*),.*'
In the items file I have put this
Number Flukso (gFlukso) {mqtt="<[mosquitto:/sensor/myfluksoid/counter:state:REGEX(.*,(.*),.*)]"}
The first step I would like to understand is how to transform the data into a value.
I can not find the right settings.
And second how can I display the values? Third would be to put those values into a graph.
I finally managed to get the values displayed in OpenHAB. But this does not bring to the point I want to go.
The values are pulses and do not give me the consumption per phase.
items
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(.*,(.*),.*)]"}
I am trying to the same same thing…only about 2 years later and wondering whether you finally had any success? I am running openhab 2.1 on a raspi but so far I can´t get any read from my flukso. Here are my settings:
In mqtt.cfg I have:
flukso.url=tcp://192.168.178.117:1883
in mqtt.items I simply have:
Number solar “solar [%.3f]” {mqtt="<[flukso:sensor/56ce0f185d219206e29e481224b719c1/gauge:state:default]"}
With that I see that in the log files things are updated but nothing happens further:
2017-07-17 19:36:08.124 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'mqtt.items’
2017-07-17 19:36:08.148 [DEBUG] [t.mqtt.internal.MqttBrokerConnection] - Unsubscribing message consumer for topic ‘sensor/56ce0f185d219206e29e481224b719c1/gauge’ from broker 'flukso’
2017-07-17 19:36:08.203 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'mqtt.items’
2017-07-17 19:36:08.230 [DEBUG] [t.mqtt.internal.MqttBrokerConnection] - Starting message consumer for broker ‘flukso’ on topic ‘sensor/56ce0f185d219206e29e481224b719c1/gauge’