This project uses a Digi Xbee3 wireless Zigbee module and a Sparkfun ESP32 ThingPlus board to implement a Zigbee to WiFi bridge. The bridge passes Zigbee sensor data over WiFi to the Machinechat JEDI One IoT platform. For the bridge, the Xbee3 module is configured as a Zigbee coordinator that echoes received sensor data over UART to the ESP32 ThingPlus. The ESP32 reads received UART data, parses the sensor data into a json string and sends over WiFi to the JEDI One. The Xbee3 application code is implemented in MicroPython and the ESP32 application code implemented in Arduino..
The connection schematic and bill of material for the zigbee to WiFi bridge is contained in the scheme-it project zigbee_wifi_bridge
For testing purposes, an Amphenol T9602 temperature/humidity sensor is connected to a second Xbee3 wireless module configured as a Zigbee router to provide sensor data for the project.
The connection schematic and bill of material for the T9602 zigbee sensor is contained in the scheme-it project XB3_T9602.
The Machinechat JEDI IoT platform is configured to display and monitor the T9602 sensor data.
Digi Xbee 3 Zigbee module and antenna (qty = 2)
Amphenol T9602 Sensor
Sparkfun ESP32 ThingPlus Arduino WiFi bridge project details
In this Arduino project the ESP32 board is set up to receive sensor data over the UART from the Xbee 3 Zigbee coordinator. The ESP32 reads the sensor data, parses it into a json string and sends it over WiFi to the JEDI One for processing.
For setting up the board refer to:
For setting up the Arduino software refer to:
Add these libraries thru Arduino’s Library Manager:
Example T9602 sensor data json string sent to JEDI one:
Arduino sketch “esp32_WiFi_zigbee.ino” and source code located in below Github link.
Digi Xbee3 MicroPython WiFi bridge project details
In this MicroPython project the first Xbee3 module is configured as a Zigbee coordinator with MicroPython REPL mode enabled. The Xbee3 coordinator establishes the Zigbee network and echoes any received sensor data over the UART to the ESP32.
Example T9602 Zigbee sensor data message sent over UART to the ESP32:
MicroPython source code “ZigbeeCoordEchoServer.py” located in below Github link.
Digi Xbee3 MicroPython T9602 sensor project details
In this MicroPython project the second Xbee3 module is configured as a Zigbee router with the same network ID as the Xbee3 coordinator used in the bridge and MicroPython REPL mode is enabled. For more detailed information on the sensor and implementation refer to on eewiki project Xbee3 Micropython and Amphenol T9602 Humidity Temperature Sensor .
MicroPython source code “T9602home_r1.py” located in below Github link.