# Published event not updating data \[Rules Engine\]

**URL:** <https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040>\
**Category:** Troubleshooting\
**Created:** [February 26, 2019, 1:03am UTC](https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040 "2019-02-26T01:03:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JipSqueak](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@JipSqueak](https://community.particle.io/u/JipSqueak)\
**Post date:** [February 26, 2019, 1:03am UTC](https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040/1 "2019-02-26T01:03:40Z")

</div>

Hey. I’m using the rules engine with firebase right now to publish an event to particle but after initial publishing of say the number 1, even if I change the number that I’m “publishing” it will still only print the value of 1.

Does any one know why? Can you not constantly update the value of an event your publishing? This is using a Argon.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [February 26, 2019, 10:47am UTC](https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040/2 "2019-02-26T10:47:38Z")

</div>

Could we see some code or setup of that?

---

<div class="post-metadata">

**Author:** ![JipSqueak](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@JipSqueak](https://community.particle.io/u/JipSqueak)\
**Post date:** [February 26, 2019, 4:07pm UTC](https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040/3 "2019-02-26T16:07:09Z")

</div>

![39%20AM](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/5/c/5c7839132df18b4d2d46bb32ba2a1d560642810c.png)

I think the issue probably lies in the “input labels” part of the code. I’m definitely updating the value of the data from the function I made (i’m msg.payloading to confirm that), but for some reason that’s not updating the data of the publishevent.

```json
[
    {
        "id": "29601228.f140ce",
        "type": "firebase.on",
        "z": "10e7f83c.659828",
        "name": "",
        "firebaseconfig": "",
        "childpath": "items/",
        "atStart": true,
        "eventType": "child_changed",
        "queries": [
            {
                "name": "orderByChild",
                "value": "light"
            },
            {
                "name": "startAt",
                "value": "1"
            }
        ],
        "x": 550,
        "y": 460,
        "wires": [
            [
                "83727a28.c3ebd8"
            ]
        ]
    },
    {
        "id": "83727a28.c3ebd8",
        "type": "function",
        "z": "10e7f83c.659828",
        "name": "Get Light",
        "func": "msg.payload = msg.payload.light\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 940,
        "y": 540,
        "wires": [
            [
                "d7b87cc6.22dd",
                "e3203582.7c8a68"
            ]
        ]
    },
    {
        "id": "d7b87cc6.22dd",
        "type": "debug",
        "z": "10e7f83c.659828",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "x": 996,
        "y": 428,
        "wires": []
    },
    {
        "id": "e3203582.7c8a68",
        "type": "particle-publish",
        "z": "10e7f83c.659828",
        "name": "Publish Light",
        "auth": "583f50db.4d9c2",
        "scope": "user",
        "product": "",
        "event": "PublishLight",
        "x": 990,
        "y": 680,
        "wires": [],
        "inputLabels": [
            "msg.payload"
        ]
    },
    {
        "id": "583f50db.4d9c2",
        "type": "particle-config",
        "z": "",
        "clientId": "luminus-7715",
        "clientSecret": "2f7b31106f514ce5fbebb6e041226a92a1d8abcd"
    }
]

```

---

<div class="post-metadata">

**Author:** ![JipSqueak](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@JipSqueak](https://community.particle.io/u/JipSqueak)\
**Post date:** [February 27, 2019, 10:56pm UTC](https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040/4 "2019-02-27T22:56:10Z")

</div>

did you see the updated code? now when i publish the data to two individual publish statements, it works, but that’s not gonna be helpful for what i need to do. why can’t I just change the event and overwrite what i’m publishing?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 28, 2019, 6:41am UTC](https://community.particle.io/t/published-event-not-updating-data-rules-engine/48040/5 "2019-02-28T06:41:56Z")

</div>

I know this post is a bit dated and refers to a function call, but maybe they are related and the node hasn't been updated yet

> [@Particle Rules Engine - bug in calling functions twice](https://community.particle.io/t/particle-rules-engine-bug-in-calling-functions-twice/45163):
>
> Hello all, Started testing with the Particle Rule Engine and I think I ran into a bug when I want to call a function on my particle. When setting the argument function via the payload message, I am able to set the argument to the right value the first time. As of the next message, I send the right argument message, but it seems the original argument is still send to the cloud. My code on the particle for the lightsValue is very simple, I convert the command to an int and return this: int li…
