0.134.0 Mqtt Trigger broken

Hi, my simple test script which was quiet all the time now gets fussy. It just sends two pushover messages one on true … one on false. Since the last update true is not respected and without me triggering false I keep on getting pushovers for case false.

I do remember that a downgrade was necessary since the newer versions did not work well … but now something has changed again to the worse. Maybe an MQTT core update?

Same with 0.136.0

Also I don’t understand why the pushover nodes append a “_j” to my messages.

Hey @daniello,

It just sends two pushover messages one on true … one on false.

Are you using an IF node or something similar to check for a condition? Can the condition not returning the expected output be a reason? If you can add a screenshot or give more information, it will be really helpful :slight_smile:

Well it worked perfectly … until lately.

grafik

I remember the last time it was flawed it was the mqtt connection itself … this still works.

{
  "nodes": [
    {
      "parameters": {
        "topics": "n8n-trigger",
        "options": {
          "onlyMessage": false
        }
      },
      "name": "MQTT Trigger",
      "type": "n8n-nodes-base.mqttTrigger",
      "typeVersion": 1,
      "position": [
        590,
        260
      ],
      "credentials": {
        "mqtt": "ioBroker mqtt"
      }
    },
    {
      "parameters": {
        "userKey": "snip",
        "message": "mqtt trigger true",
        "additionalFields": {}
      },
      "name": "Pushover",
      "type": "n8n-nodes-base.pushover",
      "typeVersion": 1,
      "position": [
        1100,
        190
      ],
      "credentials": {
        "pushoverApi": "Pushover"
      }
    },
    {
      "parameters": {
        "userKey": "snip",
        "message": "mqtt trigger false",
        "additionalFields": {}
      },
      "name": "Pushover1",
      "type": "n8n-nodes-base.pushover",
      "typeVersion": 1,
      "position": [
        1160,
        370
      ],
      "credentials": {
        "pushoverApi": "Pushover"
      }
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"message\"]}}",
              "value2": true
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        840,
        260
      ]
    }
  ],
  "connections": {
    "MQTT Trigger": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF": {
      "main": [
        [
          {
            "node": "Pushover",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Pushover1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

For both the true and false condition, does the IF node return the data correctly?

Looking at the changelog: Changelog | Docs, I don’t see any changes that were made to the MQTT node. Can you please confirm that the IF node is returning the expected output for both the true and false condition?

mqtt node seems to work … the if node works unexpectedly … I cannot understand when it outputs true or false as value … regardless of what I trigger on. But in any case the output is only to the false node.
Strange!

Can you share the expression you’re using along with the expected result of the expression?

i shared the code above.

I also think that the numerous messages I get is because the workflow keeps restarting itself … no idea what’s going on … I am not using mqtt at the moment.

There is another topic I’d like to address within this ticket. As soon as the service is started it reads the state of the object and reacts. So if there is still a “true” in that topic it fires “true” etc. Is this something that could be changed … like ignore initial state and wait for an update?

Hey!
I am breaking this issue down into smaller issues.

  1. It seems like the IF node is not returning the output correctly.
  2. The workflow restarts itself resulting in numerous messages
  3. The Pushover nodes append a “_j” to the messages.

Am I missing anything else?
Can you please create separate posts for 1 and 3? This will help keep the conversation sorted and easy to navigate.

Well at least that is my perception/interpretation … yes.

The one thing that could be added is … that the workflow uses the state pesent when it starts and doesn’t wait for an update.