@José Sérgio Medeiros Jr
I’m using an esp8226 that sends data to node red, but I can’t send data from node red to tagoio! Does anyone have a tutorial on how to do this?
@José Sérgio Medeiros Jr
I’m using an esp8226 that sends data to node red, but I can’t send data from node red to tagoio! Does anyone have a tutorial on how to do this?
@Vitor Lima
Hi Sergio,
I believe the best way to integrate with NodeRed is by using the MQTT integration with TagoIO. I’m not an expert on NodeRed integration, but this is how I usually see customers doing this integration.
You can get the broker settings from the documentation MQTT - TagoIO
I believe that after you setup your NodeRed, at some point you will need to use the node Function to create the format to send to TagoIO, such as:
Then use the MQTT Node to send data to TagoIO:
Then check your device Live Inspector to see if you’re receiving messages from the MQTT. After you confirm that, you need to create an Action to store data to bucket and set it up to the topics you’re using.
Hi,
That’s the result of your code. Looks like the field to the variable name always take Payload as name. This is the result of your code…
[
{
“variable”: “payload”,
“value”: “variable:bouton2action,value:single”,
“metadata”: {
“mqtt_topic”: “zigbee2mqtt/bouton2”
}
}
]
Any hints ?
Thanks
Marc
Hi Marc,
Can you show us your NodeRed function properties?
Hi,
I make it work in another way. I use a change node and add this in it:
{“variable”:“windspeed”,“value”:msg.payload}
Hi Marc,
Try to use a NodeRed function like Vitor showed above.
Or just send msg.payload and use the Payload Parser to parse it to TagoIO format. Something like that should work:
payload = [{
variable: 'wind_speed',
value: payload,
}]