I was prototyping on how to display DHT22 sensor data to my JET mobile application and would like to share my findings.

In part 1, we will show WebSocket server sending sensor values to the client. In final part, i.e. part 2 we will develop a JET Mobile App from scratch showcasing sensor data.

DHT22 is a low-cost sensor, made up of humidity and temperature sensor. The data can be read over GPIO pin, so I connected it with ESP8266 NodeMCU.

Then, ran WebSocket server on the NodeMCU chip to send DHT22 sensor data and finally developed Oracle JET Mobile app that used WebSocket client Javascript API’s to monitor temperature data.

Below figure shows a visual representation how Oracle JET Mobile application interacts with NodeMCU via WebSocket.

JET Mobile App communicating to ESP8266 NodeMCU

The mobile app here, acting as websocket client establishes handshake with the NodeMCU, having websocket server installed in it. Once connection is established , the client requests for temperature values and the changed temperature values are displayed in Dial gauge — ojgauge, oracle jet component. User can optionally stop measuring and can disconnect the connection.