MiFlora Sensor Plant Database

Thank you!

My two cents, let people get the picture on their own and put it on the www folder.

They can get exactly the picture they like or even the real picture of their plant and you save yourself the hassle of dealing with the pictures, getting the right ones and having 450MB of useless data for people to only use a like 3-5 pictures out of 4500

3 Likes

Do you think is possible to enhance actual sensor by using mmol accumulation against lux ?

2 Likes

I use a custom component called “Average Temperature” With this, you are able to add multiple sensors to create a single sensor which averages out the values of all of the defined sensors… I use this for thermostats where it is better to get the reading from multiple temp points to get a better ave room temperature… There is however no reason why you cannot do this for other sensors, as long as the units that are being measured are the same… Ave Temp Custom Component

What’s the difference between your custom sensor and min_max sensor?

1 Like

Have a look here at some of the reasoning… Average Sensor so whilst the min/max can probably do this, I decided to go with this one…

Does anyone have good DB for this card?
I found something but not work with convert.py

You’ll find it over here: https://github.com/khronimo/MiFloraDB

1 Like

Hello,
I tried to install the card, but there is a mistake that “Custom element doesn’t exist: flower-card.”
Hass log shows:

https://example.com/local/lovelace-flower-card/data/data.js:1:1 Uncaught SyntaxError: Invalid or unexpected token

but I used only the script in repo. Please help!
I attached the data file.

Me too, do you have any update?

Your file is in the wrong format.
$ file data.js.2
data.js.2: Little-endian UTF-16 Unicode text, with very long lines

A working database:
$ file data.js
data.js: ASCII text, with very long lines

Hi,
on my installation I’ve the right file
$** file data.js
data.js: ASCII text, with very long lines

Can be the problem on the converter?

I’m not a programmer, though I do fiddle. It could be a problem with the converter, however at the moment there isn’t enough information to make that determination.

What MiFlora database did you use? the MiFloraDB linked above? Is your error exactly the same at Artem’s minus the example.com?

What does your data.js look like? I’ve fiddled with mine a bit making it what I believe is more complaint, but I took a copy I labeled as original and it seems to work as well.

My file is 5 lines long (based on one really really really long line). and looks like this:

‘use strict’;
const FlowerData =
{" -insert really long line - ]}
;
export {FlowerData};

Is yours the same format?

Mine is the same:

'use strict';
const FlowerData =
{" -insert really long line - ]}
;
export {FlowerData};

I’ve no idea why is not working :sleepy:

What about the error message? Is it identical to Artem’s? or just similar?

It’s identical =(

I’ve resolved the issue, my mistake.
I’ve declared as JS instead of module the type of file that I was including.
Here the correct declaration inside Lovelace config:

resources:
  - type: js
    url: /local/customcards/github/thomasloven/card-tools.js?track=true
  - type: module
    url: /local/lovelace-flower-card/flower-card.js
1 Like

I’m working on a new solution to managing MiFlora sensors, i have so many that i need more then one receiver.

I’m currently hacking away at the backend, sadly i suck at frontend any one here who wants to lend a hand?

It will support using multiple receiver devices (currently based on ESP32 but more can be implemented) it will automatically calculate what receiver to use when getting data from a sensor and adding both receiver and MiFlora devices should be a push of a button.

Later i plan to add searching for plants and generating Home Assistant yaml so that you don’t have to edit them manually every time you change what plant you are using the sensor for.

Edit: It is open source and any one can sneak a peak at https://github.com/AnderssonPeter/MiFloraSwarm currently only the ESP32 code is there, when i have something usable i will commit the backend.

6 Likes

Great.
At the moment I created many min max sensor (using last ) combining data coming from 3 different esp32 lying around the house.

Pretty reliable

Hi Peter.
I currently use an ESP32 with ESPHome as the gateway for my mifloras.
Would you mind to explain what is the pros/cons of your approach vs ESPhome?