Groovy rules trigger strange behaviour with .rules files

I have a MQTT trigger which is being picked up by a Groovy script for processing. I have created a MQTT trigger channel and this works fine.

tele/NSPanel/RESULT

I also want to create some regular text rules which run off the the same MQTT message.
Firstly I tried using the same channel. This did not work using the rule below:

rule "Test Button press"
when    
     Channel "mqtt:topic:7e07b147f2:dd3a2fe5ec:nxpanel_page_trigger" triggered
     then
     logInfo("nspanelrule","nxpanel_page_triggered")
end

I then created a new channel using the same MQTT topic with an item attached. The Item value updates in the openhab gui but does not make it through to the rule.

rule "Test Item update"
when
    Item NSPanel_ResultfromNXPAnel changed
    then
    logInfo("nspanelrule","Button 1 has been pressed" + NSPanel_ResultfromNXPAnel.state.toString )
end

Finally I created another rule that works from the channel

rule "Test Channel trigger"
when    
     Channel "mqtt:topic:7e07b147f2:dd3a2fe5ec:NXPanel_result" triggered
     then
     logInfo("nspanelrule","nxpanel_page_triggered")
end

This rule does not give any results but all of a sudden the previous rule starts working? If I comment out the last rule the Item stops being updated. This seems like a strange workaround - am I doing something wrong.

Would you show these channels? The associated events.log ?

Here you are - the two that are causing problems are nxpanel_page_trigger which fires the groovy rules and - id: NXPanel_result which runs the text rules

UID: mqtt:topic:7e07b147f2:dd3a2fe5ec
label: NSPanel
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:7e07b147f2
channels:
  - id: Button1
    channelTypeUID: mqtt:switch
    label: Button 1
    description: ""
    configuration:
      commandTopic: cmnd/NSPanel/POWER1
      stateTopic: stat/NSPanel/POWER1
      off: off
      on: on
  - id: Button2
    channelTypeUID: mqtt:switch
    label: Button 2
    description: ""
    configuration:
      commandTopic: cmnd/NSPanel/POWER2
      stateTopic: stat/NSPanel/POWER2
      off: off
      on: on
  - id: nxpanel_command
    channelTypeUID: mqtt:string
    label: NXPanel Command
    description: ""
    configuration:
      commandTopic: cmnd/NSPanel/nxpanel
  - id: nxpanel_page_trigger
    channelTypeUID: mqtt:trigger
    label: NxPanel Page Trigger
    description: ""
    configuration:
      stateTopic: tele/NSPanel/RESULT
  - id: nx_panel_notify
    channelTypeUID: mqtt:string
    label: NxPanel Notification
    description: ""
    configuration:
      formatBeforePublish: "'{ \"notifications\": {  \"text\": \"%s\" } }'"
      commandTopic: cmnd/NSPanel/screen
  - id: ns_screen_command
    channelTypeUID: mqtt:string
    label: NS Screen Command
    description: ""
    configuration:
      commandTopic: cmnd/NSPanel/screen
  - id: NXPanel_result
    channelTypeUID: mqtt:string
    label: Result from NXPAnel
    description: ""
    configuration:
      stateTopic: tele/NSPanel/RESULT

here is the event log with both rules turned on

2022-02-09 18:18:32.593 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'NSPanel_ResultfromNXPAnel' changed from {"media":{"action":pause"}} to {"media":{"action":previous"}}
2022-02-09 18:18:32.894 [INFO ] [openhab.event.ChannelTriggeredEvent ] - mqtt:topic:7e07b147f2:dd3a2fe5ec:nxpanel_page_trigger triggered {"media":{"action":pause"}}
2022-02-09 18:18:32.898 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'NSPanel_ResultfromNXPAnel' changed from {"media":{"action":previous"}} to {"media":{"action":pause"}}
2022-02-09 18:18:33.154 [INFO ] [openhab.event.ChannelTriggeredEvent ] - mqtt:topic:7e07b147f2:dd3a2fe5ec:nxpanel_page_trigger triggered {"media":{"action":pause"}}

I thought this rang a bell, found it now.

Mqtt:trigger channels are imperfectly formed

I don’t think anyone logged a github issue for that against the binding.

Well spotted - it’s strange, it is now working fine even if I comment out the second rule…

It’s some silly minor property somehow.

If you can confirm the channel is different to e.g. an Astro trigger, log an issue?