Skip to content

myDevicesIoT/cayenne-plugin-mcp23xxx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cayenne MCP23XXX Plugin

A plugin allowing the Cayenne Pi Agent to read data from MCP23XXX devices (PiFace Digital, MCP23008, MCP23009, MCP23017, MCP23018, MCP23S08, MCP23S09, MCP23S17, MCP23S18) and display it in the Cayenne Dashboard.

Requirements

Hardware

Software

Getting Started

1. Installation

From the command line run the following commands to install this plugin.

cd /etc/myDevices/plugins
sudo git clone https://github.com/myDevicesIoT/cayenne-plugin-mcp23xxx.git

2. Modifying the plugin

Specify the device you are using by setting the class value under the MCP section in the cayenne_mcp23xxx.plugin file. By default this is set to MCP23017 but it can be set to use any of the classes in the cayenne_mcp23xxx module.

If your device has fewer channels than the MCP23017 or you do not want the raw channel values to be displayed in the Cayenne dashboard you can disable any of the individual input sections in cayenne_mcp23xxx.plugin.

By default the plugin alternates between input and output channels. To specify different functions for specific channels you can modify the class for that section to specify DigitalInput or DigitalOutput.

3. Restarting the agent

Restart the agent so it can load the plugin.

sudo service myDevices restart

Temporary widgets for the plugin should now show up in the Cayenne Dashboard. You can make them permanent by clicking the plus sign.

NOTE: If the temporary widgets do not show up try refreshing the Cayenne Dashboard or restarting the agent again using sudo service myDevices restart.