# Log of rules

**URL:** <https://discourse.mozilla.org/t/log-of-rules/73854>\
**Category:** WebThings\
**Created:** [January 14, 2021, 7:52pm UTC](https://discourse.mozilla.org/t/log-of-rules/73854 "2021-01-14T19:52:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgerhard](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cgerhard](https://discourse.mozilla.org/u/cgerhard)\
**Post date:** [January 14, 2021, 7:52pm UTC](https://discourse.mozilla.org/t/log-of-rules/73854/1 "2021-01-14T19:52:33Z")

</div>

Is there anyway to get a log, with timestamps of what rules ran and why they made the decisions they made?

---

<div class="post-metadata">

**Author:** ![mrstegeman](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mrstegeman](https://discourse.mozilla.org/u/mrstegeman)\
**Post date:** [January 14, 2021, 7:56pm UTC](https://discourse.mozilla.org/t/log-of-rules/73854/2 "2021-01-14T19:56:56Z")

</div>

Nope, but we have an open issue for it: [https://github.com/WebThingsIO/gateway/issues/2664](https://github.com/WebThingsIO/gateway/issues/2664)

---

<div class="post-metadata">

**Author:** ![EricEdberg](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/ericedberg/32/29005_2.png) [@EricEdberg](https://discourse.mozilla.org/u/EricEdberg)\
**Post date:** [January 15, 2021, 12:48am UTC](https://discourse.mozilla.org/t/log-of-rules/73854/3 "2021-01-15T00:48:47Z")

</div>

Another nit… Today, I just made a bunch of changes to a rule and wanted to manually execute it as a test and realized there is no obvious way to manually initiate execution.

Someone told me that patientce is a virtue, which I guess applies in this instance!

---

<div class="post-metadata">

**Author:** ![mrstegeman](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mrstegeman](https://discourse.mozilla.org/u/mrstegeman)\
**Post date:** [January 15, 2021, 12:55am UTC](https://discourse.mozilla.org/t/log-of-rules/73854/4 "2021-01-15T00:55:33Z")

</div>

Check out [https://github.com/WebThingsIO/gateway/issues/1912](https://github.com/WebThingsIO/gateway/issues/1912)

---

<div class="post-metadata">

**Author:** ![EricEdberg](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/ericedberg/32/29005_2.png) [@EricEdberg](https://discourse.mozilla.org/u/EricEdberg)\
**Post date:** [January 18, 2021, 3:59pm UTC](https://discourse.mozilla.org/t/log-of-rules/73854/5 "2021-01-18T15:59:48Z")

</div>

**What: Execute Rules Using Virtual Thing Custom PushButton**

Found a cheap way to manually execute a rule using a Virtual Think Custom Push Button thing. You can manually press the button to execute the rule or even execute it using cURL remotely which is what I do.

1. Create a Virtual Thing Custom “PushButton” thing with default state false (not pushed)
2. Edit rule and create new trigger when virtual button = true (pressed)
3. In same rule, create new action and set virtual button = false (reset to not-pressed)

So, anytime the button is “pressed” the rule will fire. You can manually do this on the GUI.

I wrote a Mochad script to send WebThings cURL commands when X10 buttons are pressed. Here is what I would execute to set the boolean property I defined in the virtual button remotely (inspiration from curl\_examples SetProperty.sh…)

```
TIMEOUT=" --connect-timeout 10 --max-time 30 "

curl ${TIMEOUT} -H "Authorization:Bearer ${WTGW_AKEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-X PUT -d '{"'${xPROPERTY}'":'${xVALUE}'}' \
--insecure --silent --show-error \
${WTGW_URL}/things/${xTHING}/properties/${xPROPERTY} > ${LOGDIR}/x10-mochad-curl-output.txt 2>&1
```
