• 0 Posts
  • 26 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2023

help-circle
  • Auto detection for MQTT devices is a bit tricky. I struggled with that myself when I was trying to incorporate data from a web scraper I wrote. This config file here shows what I ended up with to create auto detecting sensors in HA https://github.com/chunkystyles/reservationsScraper/blob/main/mqttConfig.json

    Each one of the devices gets registered at start up of the app.

    If I were doing this all over again, I probably wouldn’t use auto detect sensors. I’d manually configure them. Here’s some examples of that kind of configuration I used for some HVAC remote devices I built:

    mqtt:
      sensor:
        - name: "makerfabs_remote_1"
          state_topic: "makerfabs/hvacremote/1/status_out"
          force_update: true
          expire_after: 125
        - name: "makerfabs_remote_2"
          state_topic: "makerfabs/hvacremote/2/status_out"
          force_update: true
          expire_after: 125
        - name: "makerfabs_remote_3"
          state_topic: "makerfabs/hvacremote/3/status_out"
          force_update: true
          expire_after: 125
        - name: "makerfabs_remote_4"
          state_topic: "makerfabs/hvacremote/4/status_out"
          force_update: true
          expire_after: 125
    

    For these to work, you just put them in your “configuration.yaml” file in HA.














  • I definitely recommend zigbee2mqtt over ZHA. I originally went with ZHA and just recently went through the hassle of converting over. It was worth it. IMO, it’s best to just start with zigbee2mqtt, and to convert before you have a lot of devices and automations.

    Edit: before I posted this comment, I couldn’t see any comments other than the one I was responding to.