Page 1 of 1

Shim Trigger Question

PostPosted: Tue Mar 05, 2024 8:39 am
by whmoorejr
I want to trigger off the activity of a shim device. (every update of the device). I first set up the trigger using the shim specific triggers, but the trigger never 'triggers'. Setting up the trigger as a 'device state change' does work. Is this normal behavior, a plugin issue or user error: (Note: There are no conditions with any of these. The action just executes a script.)

Trigger 1 (never 'triggers'):
Trigger1.png
Trigger1.png (46.7 KiB) Viewed 413 times


Trigger 2 (never 'triggers'):
Trigger2.png
Trigger2.png (52.16 KiB) Viewed 413 times


Trigger 3 (Triggers as expected/action runs):
Trigger3.png
Trigger3.png (17.46 KiB) Viewed 413 times


My appologies if I was unclear with my description in another topic thread.

Side question: Can I skip the "Shim" trigger alltogher and add an action to the Connector Match trigger? I only ask this because this is the first time I've seen the use of a trigger without an action.

Re: Shim Trigger Question

PostPosted: Tue Mar 05, 2024 12:58 pm
by FlyingDiver
That's strange. I need debug logs for both the connector and shim plugins when one of these messages arrives. Probably better to create a GitHub issue for this.

You should be able to trigger off the message received at the connector. The only reason that the connector plugin has the shortcut "action" is because I was afraid that a flood of MQTT messages arriving very rapidly could cause a race condition where a subsequent MQTT message received could overwrite the connector state values before an action could process them.

Re: Shim Trigger Question

PostPosted: Tue Mar 05, 2024 1:07 pm
by whmoorejr
FlyingDiver wrote:
That's strange. I need debug logs for both the connector and shim plugins when one of these messages arrives. Probably better to create a GitHub issue for this.
No problem. I'll stop posting on this thread and move this over to GitHub.

FlyingDiver wrote:
You should be able to trigger off the message received at the connector. The only reason that the connector plugin has the shortcut "action" is because I was afraid that a flood of MQTT messages arriving very rapidly could cause a race condition where a subsequent MQTT message received could overwrite the connector state values before an action could process them.

Yeah, that's why I was hesitant on using that action.

Re: Shim Trigger Question

PostPosted: Tue Mar 05, 2024 1:11 pm
by FlyingDiver
FlyingDiver wrote:
You should be able to trigger off the message received at the connector. The only reason that the connector plugin has the shortcut "action" is because I was afraid that a flood of MQTT messages arriving very rapidly could cause a race condition where a subsequent MQTT message received could overwrite the connector state values before an action could process them.

Yeah, that's why I was hesitant on using that action.


It's really only an issue if you actually need data from the topic or payload to be passed to the action (via device state). If the actions can run just based on the initial trigger, it should be fine.

Re: Shim Trigger Question

PostPosted: Tue Mar 05, 2024 2:31 pm
by whmoorejr
I really don't need the data, so I can put the action in there. I just need to know that a message was received under that topic.