Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PCA9557 8-bit IO expander #18632

Merged
merged 5 commits into from
May 14, 2023

Conversation

cctweaker
Copy link
Contributor

@cctweaker cctweaker commented May 10, 2023

Description:

This change will add a driver for the PCA9557 8-bit I2C IO expander to be used as virtual relay.
Since the PCA9557 has no interrupt pin, button and switches are not implemented.
Based on the new released MCP23017 DRV as virtual switch/button/relay.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.9
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@Jason2866
Copy link
Collaborator

There are already enough supported IO expanders. Why add another?
Because the IC exists is not reason enough to add to Tasmota.
Every new driver adds additional maintain work.

@arendst
Copy link
Owner

arendst commented May 10, 2023

Add buttons and switches too. Works fine without interrupts.

Report succesful functionality with your hardware before I consider merging.

@arendst arendst added the on hold by dev team Result - Feature request put on hold by member of development team label May 10, 2023
@cctweaker
Copy link
Contributor Author

cctweaker commented May 10, 2023

There are already enough supported IO expanders. Why add another? Because the IC exists is not reason enough to add to Tasmota. Every new driver adds additional maintain work.

You are absolutely right, there are enough but sadly I have about a dozen installed light controllers that use MCP23017 and this PCA9557 (cheaper and was available compared to MCP23008).
I think it would be easier for me to maintain this driver than to maintain a complete firmware for them.

Remove these ifdefs. Already done at start of file.

Done, will commit soon.

Add buttons and switches too. Works fine without interrupts. Report succesful functionality with your hardware before I consider merging.

Just finished adding and testing buttons and switches, will commit soon.

I have tested:

  • relays
  • relays inverted
  • button to gnd without internal pullup - pullup not available for PCA9557
  • switch to gnd without internal pullup

@arendst arendst merged commit 885737a into arendst:development May 14, 2023
60 checks passed
arendst added a commit that referenced this pull request May 14, 2023
Add support for PCA9557 8-bit I/O expander (#18632)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold by dev team Result - Feature request put on hold by member of development team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants