Miflora and Hassos (HASS.io)

I’ve successfully setup and configure Hassos on a Pi zero w with the sole intention of using MiFlora components to communicate via MQTT to my main HA instance.

According to the MiFlora docs “On Hass.io: Miflora will work out of the box.” but I can’t seem to use either:

sudo hcitool lescan

or

bluetoothctl

To scan for Mac addresses.

I’ve read that there is issues with Bluetooth and Hassos. Have I hit this issue or am I doing something wrong. I know Hassos used bluez as it’s BT, is there another scan function?

Thanks.

I do not know the answer to your question but it seems a bit over complicated to use hassos for this. Just install something like dietpi and this. Works perfectly.

1 Like

Mmm interesting, hadn’t come across DietPi before. Will give it a look.

You have to ssh into the host do run this:
ssh [email protected] -p 22222
To do this you need to follow instructions here:
http://home-assistant/hassos/blob/rel-1/Documentation/configuration.md#automatic

However, for THAT you need to add a USB port to your Pi Zero.

So @sjee 's solution might be more appealing.

1 Like

I have setup as you suggested and all working great. Can see the data in MQTT.fx great however I’m having issue however pulling the data into HA with MQTT. Could you share your config for the MQTT template in HA?

Sure, this is what I have im my sensor yaml;

- platform: mqtt
  name: "MiFlora 1 battery"
  state_topic: "miflora/MiFlora-1"
  unit_of_measurement: "%"
  value_template: "{{ value_json.battery}}"
- platform: mqtt
  name: "MiFlora 1 moisture"
  state_topic: "miflora/MiFlora-1"
  unit_of_measurement: "%"
- platform: mqtt
  name: "MiFlora 1 conductivity"
  state_topic: "miflora/MiFlora-1"
  unit_of_measurement: "µS/cm"
  value_template: "{{ value_json.conductivity}}"
- platform: mqtt
  name: "MiFlora 1 temperature"
  state_topic: "miflora/MiFlora-1"
  unit_of_measurement: "°C"
  value_template: "{{ value_json.temperature}}"
- platform: mqtt
  name: "MiFlora 1 light"
  state_topic: "miflora/MiFlora-1"
  unit_of_measurement: "lux"
  value_template: "{{ value_json.light}}"
1 Like

Many thanks, I was almost there but just needed clarification I was doing it right :slight_smile: