My first application and node is running and I can receive the payload data over MQTT in my openhab (or with moquitto). I would like to also read the “counter” and “rssi” fields. I can see the field names and contents:
ueli@ubuntu:~$ sudo mosquitto_sub -h eu.thethings.network -t ‘+/devices/whispernodelora1/up’ -u ‘###############’ -P ‘ttn-account-v2.###############################’ -v
###############/devices/whispernodelora1/up {“app_id”:"###############",“dev_id”:“whispernodelora1”,“hardware_serial”:“002A882A541A31B0”,“port”:1,“counter”:0,“payload_raw”:“VQ==”,“payload_fields”:{“airtemperature”:1.25,“raw”:85},“metadata”:{“time”:“2018-03-27T19:51:35.489434709Z”}}
It’s a simulated message so the RSSI is missing, but the counter is there. Extracting the payload_fields works. But if I try to extract the counter, nothing happens:
ueli@ubuntu:~$ sudo mosquitto_sub -h eu.thethings.network -t ‘+/devices/whispernodelora1/up/counter’ -u ‘###############’ -P ‘ttn-account-v2.###############################’ -v
How can I extract those two values with a simple mosquitto command?
Thanks and best regards,