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.
[
{
"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"
}
]