I am very familiar with using ‘Bring your own thing’ to create a dashboard, publishing data to the dashboard using MQTT. I can also subscribe to each object on the dashboard to be informed, and keep my own record of, each value published.
My latest project is running nicely using a Raspberry Pi ‘device’ running Cayenne code to update the dashboard. Is there any way to retrieve the updates in real time, in a similar way to subscribing to MQTT traffic? This would work better for this project than the researchers I’m working with having to remember to manually download and archive data from the dashboard.
The current project has very modest requirements! One Raspberry Pi (RPi) sitting on the ground in the middle of a breeding population of endangered New Zealand native skinks. The Pi has four DS18B20 sensors attached to it. So far so good - go to the Cayenne dashboard and set up a RPi as a device. Temperatures magically appear on the dashboard!
Problem is that my clients for this project want all of the stats from their sensors, indefinitely. Quite understandably, over time the Cayenne platform accumulates data, dropping detail, for our free account. The code you linked to, and my extensive infrastructure linked above, avoids this being a problem by subscribing to the project and keeping a copy offline.
What I’m asking is whether there is any way to keep the excellent sensor solution provided by Cayenne, while also being able to subscribe to that data stream to enable my computers to keep an offline copy.
There wasn’t a way to do this when I started using your great platform about four years ago. That was before you changed to native MQTT for your libraries.
When I go to add a new Device & Widget, then select ‘Raspberry Pi’, I am offered a link such as: https://cayenne.mydevices.com/dl/rpi_qg6suq9zwt.sh from where I can download code to install and run on my Pi to create and populate a Project Dashboard. I refer to that as ‘Cayenne-supplied code’.
When I choose to a a new ‘Bring Your Own Thing’ project, I then run my own code on the Pi. That I refer to as ‘my code’, which uses the same principles as the code you shared above.