I am working on a project that involves using the ESP32 microcontroller and the DHT 22 temperature/humidity sensor to create an IoT device that uses UDP transsmission over Wifi to send data to a Raspberry Pi, which acts as my edge device. The Raspberry Pi then sends this data to Google Cloud by establishing an MQTT connection with the cloud which publishes the data to a pubsub topic. I have so far managed to configure the cloud to accept the data using IoT core and Pub Sub and have successfully sent data to my topic in the cloud. I however, would like to use firebase to create a user interface for easier user experience.
I would greatly appreciate any help to enable the python code to transmit the data in the correct JSON format to resolve this problem.