Event types not showing for node-red-contrib-ttn event node

Hi

I’ve been using node-red-contrib-ttn for a while now, receiving messages from several applications. While looking at ADR I wanted to show downlink messages, so started to use the ttn-event node. The output of this node (complete message object debug) doesn’t show the event type.

Is there a way to have the event type come through? It seems I will need to subscribe to each event type using the for each application using the event filter #down/scheduled etc (from this list: Getting uplink metadata using Node-RED "ttn device" or "ttn message" nodes)

Would MQTT solve this for me?

Thanks
Ben

MQTT is the answer!
The event type is part of the topic, for example:

app_name/devices/device_name/events/down/sent

The value at the end shows the event type, in this case it was a sent downlink. It can also show scheduled as well as acks. I’ve used these quite a lot but dont use the Node-RED ttn nodes as MQTT is already available so didn’t see any point using these nodes.

I subscribe to a topic like:

app_name/devices/+/#

and use a function node to split it up on the /. You can then access the event types and take action depending on each one.

Cheers

Andrew

1 Like

Marvellous, thanks Andrew. I’ll have a go.