1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.63k stars 799 forks source link

Config example miflora home assistant #240

Closed thundergreen closed 6 years ago

thundergreen commented 6 years ago

This is a great project but it is not really clear how to use ubeacon and miflora... I dunno how to set it up properly.. maybe an example would be great.

1technophile commented 6 years ago

I have examples with OpenHAB but not with home assistant maybe others can help?

mredone commented 6 years ago

@thundergreen
Show me yours mqtt topics from beacon and miflora.

A will try make home assistant configuration for you.

oakbrad commented 6 years ago

Here's an example

sensors.yaml

- platform: mqtt
  name: kitchen_pothos_temperature
  unit_of_measurement: "°F"
  force_update: true
  expire_after: 21600 # 6 hours
  state_topic: "home/BTtoMQTT/C47C8D6273BD/tem"
  value_template: "{{ (((value | float) * 9 / 5) + 32) | round(1) }}"
- platform: mqtt
  name: kitchen_pothos_moisture
  force_update: true
  expire_after: 21600 # 6 hours
  state_topic: "home/BTtoMQTT/C47C8D6273BD/hum"
- platform: mqtt
  name: kitchen_pothos_light_intensity
  unit_of_measurement: lux
  force_update: true
  expire_after: 21600 # 6 hours
  state_topic: "home/BTtoMQTT/C47C8D6273BD/lux"
- platform: mqtt
  name: kitchen_pothos_conductivity
  force_update: true
  expire_after: 21600 # 6 hours
  state_topic: "home/BTtoMQTT/C47C8D6273BD/fer"

configuration.yaml

plant:
  kitchen_pothos:
    sensors:
      moisture: sensor.kitchen_pothos_moisture
      temperature: sensor.kitchen_pothos_temperature
      conductivity: sensor.kitchen_pothos_conductivity
      brightness: sensor.kitchen_pothos_light_intensity
    min_moisture: 10
    max_moisture: 100
    min_conductivity: 200
    min_temperature: 45

You will need to change to whatever you MQTT topic is, but it should be similar.. The value template on the temperature is to convert to Fahrenheit scale.

1technophile commented 6 years ago

Great, maybe a candidate to enrich the wiki?

Destix commented 6 years ago

As it's for wiki add this line

configuration.yaml

sensor: !include sensors.yaml

oakbrad commented 6 years ago

Wiki has been updated

1technophile commented 6 years ago

@thundergreen if ok for you, could you close the issue please