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

Home Assistant cleanup when PCF8574 is removed #170

Closed
nielsonm236 opened this issue Apr 12, 2023 · 1 comment
Closed

Home Assistant cleanup when PCF8574 is removed #170

nielsonm236 opened this issue Apr 12, 2023 · 1 comment

Comments

@nielsonm236
Copy link
Owner

This may mostly be a test issue as I have added and removed PCF8574 devices several times in firmware testing. But it might also arise in field use.

The issue: If a PCF8574 IO expander is connected and configured in Home Assistant, then the PCF8574 is removed, the PCF8574 configuration remains in Home Assistant and is difficult to delete.

This happens because the HW-584 firmware doesn't know if the hardware configuration change (removal of the PCF8574) is temporary or permanent. If the firmware were to assume it is permanent and sent delete messages to Home Assistant then information like pin names in Home Assistant would be lost. The user may want to re-attach the PCF8574 (or perhaps replace it with another PCF8574), in which case they want the Home Assistant configuration information to be retained.

So, removal of the PCF8574 from Home Assistant needs to be an action taken on command by the user. However, the HW-584 firmware can make intentional removal of the PCF8574 a little easier for the user by adding a URL cmd that tells the firmware that the PCF8574 removal is intentional, and that the firmware should send PCF8574 configuration delete messages to Home Assistant.

I've added a new URL command (/85) that will signal the firmware to Disable all pins in the PCF8574 configuration and send PCF8574 pin delete messages to Home Assistant. The /85 command will then reboot the module so that the new configuration is established with Home Assistant.

nielsonm236 added a commit that referenced this issue Apr 16, 2023
Addressed Issues #159, #163, #166, #167, #170 and several documentation changes
@nielsonm236
Copy link
Owner Author

Addressed in release 20230416 1116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant