Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


freitasm

BDFL - Memuneh
80657 posts

Uber Geek
+1 received by user: 41062

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#301895 13-Oct-2022 08:04
Send private message

I am trying to get temperature and humidity information into Home Assistant so that I can integrate with Alexa.

 

Components:

 

  • Three Xiaomi temperature sensors flashed with custom firmware
  • ESP32 running Tasmota
  • Mosquitto MQTT as a Docker on Synology NAS
  • Home Assistant as a Docker on Synology NAS

Home Assistant can see Tasmota and load its data but it does not recognise the temperature sensors:

 

 

Tasmota seeing the Xiaomi sensors:

 

 

I feel something else is missing here. Any tips please?





Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


View this topic in a long page with up to 500 replies per page Create new topic

This is a filtered page: currently showing replies marked as answers. Click here to see full discussion.

freitasm

BDFL - Memuneh
80657 posts

Uber Geek
+1 received by user: 41062

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #3205855 12-Mar-2024 21:47
Send private message

Ok, I'm updating this to have it documented. After a few months I've decided to give it another try.

 

I have Home Assistant running as a docker instance on my Synology NAS.

 

I have Mosquitto running as a docker instance on my Synology NAS.

 

I have Tasmota Bluetooth running on a MH-ET ESP32 kit.

 

I have three Xiaomi sensors flashed with atc1441/ATC_MiThermometer: Custom firmware for the Xiaomi Thermometer LYWSD03MMC and Telink Flasher via USB to Serial converter (github.com).

 

I have housed the MH-ET ESP32 on a 3D printed case MH-ET LIVE D1 ESP32 mini kit Slim Case by ShadowEcho - Thingiverse

 

Tasmota configuration:

 

 

I've used the Tasmota terminal to issue the command SetOptions19 1 to enable auto-discovery.

 

 

I've added Tasmota to Home Assistant but it did not find the thermometers, so after confirming that the messages were actually going from Tasmota to MQTT, @davidcole suggested a snippet to manually add the sensors. It worked so I replicated for the other ones.

 

In the configuration, ATCd69715 means the ATC sensor with the MAC Address ending in d69715. Note it's case sensitive, so what Tasmota shows on the page is not exactly what it sends in the MQTT topic - make sure it matches.

 

This is the configuration added:

 

 

mqtt:    
  sensor:
    - name: "Tasmota Lounge Temperature"
      state_topic: "tele/tasmota_12B560/SENSOR"
      value_template: "{{ value_json['ATCd69715'].Temperature }}"
      unit_of_measurement: "°C"  # "F" if using Fahrenheit
      device_class: temperature

 

    - name: "Tasmota Lounge Humidity"
      state_topic: "tele/tasmota_12B560/SENSOR"
      value_template: "{{ value_json['ATCd69715'].Humidity }}"
      unit_of_measurement: "%"  # "F" if using Fahrenheit
      device_class: humidity

 

    - name: "Tasmota Bella Room Temperature"
      state_topic: "tele/tasmota_12B560/SENSOR"
      value_template: "{{ value_json['ATC66cdb5'].Temperature }}"
      unit_of_measurement: "°C"  # "F" if using Fahrenheit
      device_class: temperature

 

    - name: "Tasmota Bella Room Humidity"
      state_topic: "tele/tasmota_12B560/SENSOR"
      value_template: "{{ value_json['ATC66cdb5'].Humidity }}"
      unit_of_measurement: "%"  # "F" if using Fahrenheit
      device_class: humidity

 

    - name: "Tasmota Bedroom Temperature"
      state_topic: "tele/tasmota_12B560/SENSOR"
      value_template: "{{ value_json['ATCfac2fa'].Temperature }}"
      unit_of_measurement: "°C"  # "F" if using Fahrenheit
      device_class: temperature

 


    - name: "Tasmota Bedroom Humidity"
      state_topic: "tele/tasmota_12B560/SENSOR"
      value_template: "{{ value_json['ATCfac2fa'].Humidity }}"
      unit_of_measurement: "%"  # "F" if using Fahrenheit
      device_class: humidity

 

 

 

 The result:

 

 

I have Alexa connected to Home Assistant, and each sensor is assigned to a room, so now I can say, "Alexa, what is the temperature in the Bedroom" and she'll say "The bedroom temperature is ... degrees"

 

Unfortunately, it is not possible to use these in Alexa routines as I wanted. You need a sensor that can fire events that are then used to trigger the routines, and these sensors only report temperature and humidity but can't be set to fire events.

 

To that end I might have to get an Amazon Echo Dot 5th Gen with built-in temperature sensor, which does work for routines.

 

 

 

 

 

Other people who helped me here: @bartender and @michaelmurfy - thank you folks.

 

To others in this thread, thanks for your suggestions.





Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


View this topic in a long page with up to 500 replies per page Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.