Connecting a Pimoroni Environmental Monitor to IoT Central

The Pimoroni Environmental monitor is an amazing piece of hardware. I recently purchased a few to monitor air quality around the house. https://shop.pimoroni.com/products/enviro?variant=31155658457171

Packed into the HAT for a Raspberry Pi Zero you will find:

  • BME280 temperature, pressure, humidity sensor
  • LTR-559 light and proximity sensor
  • MICS6814 analog gas sensor 
  • ADS1015 analog to digital converter (ADC)
  • MEMS microphone
  • 0.96″ colour LCD (160×80)
  • Connector for particulate matter (PM) sensor (available separately)
  • Pimoroni breakout-compatible pin header
Device Template

Device Definition json file is in the github repository along with the source code. This can be imported into Azure IoT Central and the views generated.

environ.py
IoT Central Dashboard

Source code: https://github.com/apead/Pimoroni-Env-Monitor-IoT-Central

Product Information: https://shop.pimoroni.com/products/enviro?variant=31155658457171

Where to buy?

https://www.pishop.co.za/store/enviro–for-raspberry-pi

Connecting Azure IoT Central to Power Apps and Power Automate

Azure IoT Central makes it easy to connect, monitor, and manage your IoT devices at scale. With the IoT Central V3 connector, you can trigger workflows when a rule has fired, and take actions by executing commands, updating properties, getting telemetry from devices, and more. Use this connector with your Azure IoT Central V3 application.

Url: https://docs.microsoft.com/en-us/connectors/azureiotcentral/

The connector is available to be used in

  • Power Apps
  • Power Automate
  • Logic Apps

Power Apps

Due to the dynamic nature of Azure IoT Central, using the connector is not quite straight-forward. To use the Azure IoT Central connector in Canvas apps you need to enable two features in the settings of the application.

These are:

  • Enhanced formula bar
  • Dynamic Schema

Enabling these two features allows Power Apps to understand the resulting schema from a call to IoT central. “Capture Schema” will be enabled on the formula bar.

Power Apps Canvas Settings: Enhanced Formula Bar
Power Apps Canvas Settings: Dynamic Schema
Formula bar: Schema Capture

Power Automate

Power Automate is a lot simpler to get to work. It automatically understand the dynamic schemas of IoT Central.