flukso on home assistant

home assistant and fluko!?
how can we do it?

gebhardm's picture

MQTT and Node-Red?

neomarcio's picture

i ,not a good at this things,can you explain how to do it!

gebhardm's picture

Well, firstly describe your requirement more in detail; there are so many home assistant and home automation systems out there, you will not be able to count. As such you just asked "how can I see the moon" and I answered "open your eyes"...
Well, secondly, the Flukso is a MQTT broker and publishes its readings by a bunch of MQTT messages; these may be used by "a" home assistant for whatever, if it is able to "understand" it. For understanding most likely the sent messages need to be reformatted; and such can easily be done using Node-RED.
Well, thirdly, "being not good at something" is no excuse, but should raise the wish to get better; and as such not only G**gle is your friend...

neomarcio's picture

well spoken,i not an expert on this kind of things,i´m taking the 1º steps on this kind of things,i have purchase a fluko device to measure my eletric bill and "G**gle" a video of HOMEASSISTANT!!! so i followed the instructions and install (hass.io) on a raspeberry pi 3,and i thought if i can see my flukso devise on my home assistant....well ...i...G**gle..it again and i find this(https://github.com/flukso/hass_flukso_component)...but i do every thing that i think i understand,but it doesn`t work!!!???
so my turn my thoughts to my account of flukso,trying to get help from the persons that realy understand...this things.
sorry for my english...i am portuguese,can you hel me?

gebhardm's picture

As it seem the flukso/hass-component does not comply to the latest Home Assistant installation. So, what remains is either addressing the repo owner by issue or find out yourself what needs to be changed...

20-05-26 06:40:58 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/flukso/hass_flukso_component repository
20-05-26 06:41:00 ERROR (MainThread) [supervisor.utils.json] Can't read json from /data/addons/git/cffceb59/repository.json: [Errno 2] No such file or directory: '/data/addons/git/cffceb59/repository.json'
20-05-26 06:41:00 WARNING (MainThread) [supervisor.store.data] Can't read repository information from /data/addons/git/cffceb59/repository.json

gebhardm's picture

Note: Just did some crawling through the repo; the flukso add-on works with FLM03 only; it does not recognize FLM02 configurations, thus does not work with it without adaptations.

neomarcio's picture

well mine is that FLM02

tld's picture

neomarcio: What I did was point the HA mqtt to my model FLM02B flukso box

in the HA configuration.yaml file

broker: [ip address of your flukso box]
port: [mqtt port on flukso box, default 1883?]

-platform: mqtt
name: "[whatever you want to call your sensor]"
state_topic: "/sensor/[flukso sensor id]/gauge"
unit_of_measurement: "W"
value_template: '{{ value_json[1] }}'


the rest you will have to figure out yourself, I did this ages ago so I don't remember where I found it, you can create extra sensor entries for additional flukso sensors, and it might get broken with further HA upgrades

Doing this has limitations, and probably is not the most elegant way to do it, you will need to bridge mqtt servers if needed

tld's picture

I forgot the important bit in the configuration.yaml file

- platform: template
value_template: '{{ "%0.1f"|format(states.sensor.pvoutput.attributes.energy_consumption|float/1000) }}'
friendly_name: 'Consumption'
unit_of_measurement: 'kWh'
value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ %0.2f"|format(states.sensor.pvoutput.attributes.energy_generation|float/1000) }}{% endif %}'
friendly_name: 'Generated Today'
unit_of_measurement: 'kWh'

gebhardm's picture

@bertouttier - then it would be great to also make it FLM02 compliant :-) I saw that the /device/+/config/sensor topic could rather easily be made compliant providing sensor-id and name=function; the gauges and counters are the same in FLM02 and FLM03. Thanks.

bertouttier's picture

@gebhardm you are probably right. I don't own a FLM02, so I did not get to actually implement it. I am discussing with Bart on this. If you can't wait, feel free to open a PR! :)

KennyBuntinx's picture

Same here - FLM03 and can't get it to work - It complains about the yaml file .
Any help / example with a good configuration.yaml file ?

neomarcio's picture


bertouttier's picture

@kennybuntinx what is your configuration? It should be as simple as:

  1. flukso:

If there are sensors that you want to ignore:

- # water counter
- # gas counter

If you are using the code from my PR (located here, Bart did not get around to merge it yet...), please make sure that you read the README file to know how to set up the MQTT bridge between your HA broker and the Flukso broker.

FLM02 support is not added yet, but for your FLM03 it should work. Let me know.

neomarcio's picture

i try and i try but...i can`t @££#@fuck....
can´t detect on home assistant!!!! is there no video to explain!!!!

netweaver's picture

I also tried it on my FLM02 but it doesn't seem to work (yet) even after the Oct 2020 update.
@bertouttier maybe you can have a look into making it FLM02 compliant too?
I'm happy to be your tester for this. Normally it's not my favorite role in a project but for this I make an exception...
Feed me your Python files, I'll apply and report back. If you need any other pieces of example info, let me know.


ps. I also made an issue for it, https://github.com/flukso/hass_flukso_component/issues/3

vk2him's picture

I have a Flukso v2 and have Home Assistant setup to read the mqqt messages that the Flukso publishes.

Mqqt is integrated into HA, so it simply needs to be enabled and configured to point to the flukso's IP address - this page give you the details:

You then setup your sensor in configuration.yaml - note I included a value template that ensures the production value is always zero when the sun goes down. Substitute your sesor IDs from the flukso configuration page.

- platform: mqtt
state_topic: "/sensor/1ab4d6cd9f2981bfc3a4bxxxxxxxx/gauge"
name: "fluksoconsumption"
qos: 0
unit_of_measurement: "W"
value_template: '{{ value_json[1] }}'

- platform: mqtt
state_topic: "/sensor/c7c90d029e018769b5fxxxxxxxxx/gauge"
name: "fluksoHWSconsumption"
qos: 0
unit_of_measurement: "W"
value_template: '{{ value_json[1] }}'

- platform: mqtt
state_topic: "/sensor/7ab7a73bd38767b25514ebxxxxxxx/gauge"
name: "fluksoproduction"
qos: 0
unit_of_measurement: "W"
value_template: '{% if is_state("sun.sun", "below_horizon")%}0{%else%}{{ value_json[1] }}{%endif%}'

This will create entities in Home Assistant that can be used to visualise power consumption/production - I use these two home assistant cards to visualise: