Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Home Assistant
  4. Move To HASS MQTT - Nodes not responding

Move To HASS MQTT - Nodes not responding

Scheduled Pinned Locked Moved Home Assistant
5 Posts 2 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SoloamS Offline
    SoloamS Offline
    Soloam
    Hardware Contributor
    wrote on last edited by Soloam
    #1

    Hello, I was planning to move away from OpenHab to Home Assistant and I started configuring my nodes in HASS. I have the MQTT up and running, and I have it configured in HASS, they appear and I can controll them. The problem is a lot of miss messages. In OpenHab I was able to do ON OFF ON OFF fast and the lamps would go on off, "never" (rarely) missing a cycle. In HASS I turn on the lamp, but when I go to put off it fails.

    I remember in OpenHab I had to make a small tweak to the config to make this work, QOS 2 and turn off asynchronously.

    What are your experiences with MQTT GW and the response time and viability?

    Thank you

    1 Reply Last reply
    0
    • SoloamS Offline
      SoloamS Offline
      Soloam
      Hardware Contributor
      wrote on last edited by
      #2

      Ok, I made a test adding manual, and it works... the problem is in the auto added switches

      switch:
        - platform: mqtt
          name: "My Light"
          command_topic: "mygateway1-in/1/2/1/0/2"
          payload_on: "1"
          payload_off: "0"
          optimistic: false
          qos: 2
      

      All works ok! With the auto added switch I click on... the light comes on, and immediately the switch goes to off... Only 30 seconds later (my node sends a updated status message every 30 seconds) the node goes to ON (the real state)

      martinhjelmareM 1 Reply Last reply
      0
      • SoloamS Soloam

        Ok, I made a test adding manual, and it works... the problem is in the auto added switches

        switch:
          - platform: mqtt
            name: "My Light"
            command_topic: "mygateway1-in/1/2/1/0/2"
            payload_on: "1"
            payload_off: "0"
            optimistic: false
            qos: 2
        

        All works ok! With the auto added switch I click on... the light comes on, and immediately the switch goes to off... Only 30 seconds later (my node sends a updated status message every 30 seconds) the node goes to ON (the real state)

        martinhjelmareM Offline
        martinhjelmareM Offline
        martinhjelmare
        Plugin Developer
        wrote on last edited by
        #3

        @soloam

        You need to send/feedback the new state to home assistant from the node in the receive function. Otherwise home assistant thinks the message was not received by the node. This behavior is modified by the optimistic setting in the mysensors config section.

        1 Reply Last reply
        0
        • SoloamS Offline
          SoloamS Offline
          Soloam
          Hardware Contributor
          wrote on last edited by
          #4

          Thank you @martinhjelmare it was that! One last question that I don't know if it's related! The first time that HA discovered my nodes (power cycle) the created items where with a toggle switch and under a card named lighs (I think that it was that). Now I deleted the mysensors.json file and added the items again, and now they are detected as interruptor and the switch is a lightning bolt. No major problem in that, just trying to understand the reason... It's the same nodes, no code changes.

          Thank You

          martinhjelmareM 1 Reply Last reply
          0
          • SoloamS Soloam

            Thank you @martinhjelmare it was that! One last question that I don't know if it's related! The first time that HA discovered my nodes (power cycle) the created items where with a toggle switch and under a card named lighs (I think that it was that). Now I deleted the mysensors.json file and added the items again, and now they are detected as interruptor and the switch is a lightning bolt. No major problem in that, just trying to understand the reason... It's the same nodes, no code changes.

            Thank You

            martinhjelmareM Offline
            martinhjelmareM Offline
            martinhjelmare
            Plugin Developer
            wrote on last edited by
            #5

            @soloam

            If you changed the optimistic setting, actuators will have assumed state and this will show in the ui as two different buttons for on and off.

            I recommend to not use optimistic setting, but instead feedback the new state to home assistant.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            18

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular