Jump to content

Trigger device substitution on Network Rules


MWareman

Recommended Posts

No joy :(

I get this received:
image.png.bd4c3890b228d456878bf4a7b04f66c0.png
with this RAW payload:
{"device_type": "device_status", "device": "${sys.node.#.name}", "id": "#", "property": "ST", "value": ${sys.node.#.ST.raw}, "status": "${sys.node.#.ST}"}

This is the program triggering the NR:
image.png.2eb949a51bdacf78b59b8bcb67b7bc92.png

Link to comment
5 hours ago, MWareman said:

No joy :(

I get this received:
image.png.bd4c3890b228d456878bf4a7b04f66c0.png
with this RAW payload:
{"device_type": "device_status", "device": "${sys.node.#.name}", "id": "#", "property": "ST", "value": ${sys.node.#.ST.raw}, "status": "${sys.node.#.ST}"}

This is the program triggering the NR:
image.png.2eb949a51bdacf78b59b8bcb67b7bc92.png

Some show d.quotations around them and one doesn't.

Link to comment
12 hours ago, larryllix said:

Some show d.quotations around them and one doesn't.

Correct.

In JSON - for strings you put the value in quotes. For numbers, you omit the quotes. If the substitutions operated then the quotes (or lack of) would make far more sense!

Link to comment
8 minutes ago, Michel Kohanim said:

@MWareman,

Can you please temporarily add ${alert.event} to your resource string just to see if the event that caused the program to run is what you expected?

With kind regards,
Michel

I get this when I test with that:
image.png.04624fc4bef38ca15d6afa463942bee5.png

I know it's invalid JSON (for testing only) - but this is the resource string:
{"device_type": "device_status", "device": "${sys.node.#.name}", "id": "#", "property": "ST", "value": ${sys.node.#.ST.raw}, "status": "${sys.node.#.ST}"} ${alert.event}

In case it matters - here is the resource config:

image.thumb.png.0d99fd1a7b21820cbe44d8355624caea.png

Link to comment

Could be one of a few possibilities .. it looks like there is no event occuring that is causing the program to run (i.e. manually doing a 'Run Then'), or, for some reason we are not properly storing the event with the program, or, the event gets cleared from the program prior to the NR being used.

We'll take a look at it, and hopefully reproduce the problem here.

Link to comment
On 11/10/2021 at 10:00 AM, Chris Jahn said:

Could be one of a few possibilities .. it looks like there is no event occuring that is causing the program to run (i.e. manually doing a 'Run Then'), or, for some reason we are not properly storing the event with the program, or, the event gets cleared from the program prior to the NR being used.

We'll take a look at it, and hopefully reproduce the problem here.

I could understand that (manually being triggered - though I would hope it would put a 'default' value in based on the use of 'runThen', 'runElse' etc).

In my case - it's a program triggering from the change in status of an Insteon device. The NR is called from the 'Then' clause of the program. The Insteon device involved is exposed to Google Assistant - and I am using Google Assistant to turn the Insteon device on and off - triggering the program and then the NR.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...