wi9p starter kit zb digital IO

Hi,
I am not sure if this is the right forum to post this topic.
Well, I have a wi-9p starter ZB kit. I was wondering if there is a python module or anything that allows me to monitor GPIO pins on wi9p board.

Thanks!
Danish Shrestha

Hello Danish,

If you want to interact or monitor the module GPIOs using Dia, there is a driver device called ‘ccwi9p9215_gpio.py’ inside the Dia structure (src\devices). This driver allows you to interact with several module GPIO (open it to see the supported table).

So, you should add a new device in your yml, configure the driver to use that one and then configure the necessary settings for this driver. Here is the information copied from the driver file:

[u]Configuration settings:[/u]

input_gpios > The list of gpios that will be refreshed. (read)
output_gpios > The list of gpios that can be set to True or False (1 or 0) (written)
update_rate > (Optional) The number of seconds between each GPIOs refresh, 0.1 (100 ms) by default.

Declaration example:

…- name: gpios0
…driver: devices.ccwi9p9215_gpio:ModuleGPIOs
…settings:
…input_gpios: [0,1,2,3,10,11,15]
…output_gpios: [16,17,18,20,22]
…update_rate: 0.1

Please notice that starting dots should be spaces.

So, with that new device added into your yml file, you will have 31 new channels inside the Dia (one for each GPIO) to interact with or monitor. (gpios0.GPIO_0, gpios0.GPIO_1 …)

Hope that helps. Regards.