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

Quick Fix: KNX loose config on restart #21378

Merged
merged 2 commits into from
May 10, 2024

Conversation

barbudor
Copy link
Contributor

@barbudor barbudor commented May 6, 2024

Description:

Related issue (if applicable): fixes #21379 (initially reported here #20834 (comment))

This restore the way @ascillato was testing the KNX configuration against some sensors enabled.

Solve the above issue but prevent to use any temperature or humidity sensor than those listed, excluding also all I2C sensors.

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.6
  • The code change is tested and works with Tasmota core ESP32 V.3.0.0
  • I accept the CLA.

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

@barbudor
Copy link
Contributor Author

barbudor commented May 6, 2024

Hello @ascillato
I know that you may not have time but just in case, what do you think of my proposal to remove that configuration check ?
I think it would be better as it allows to use any T& H sensor, including I2C ones
Thanks

@ascillato
Copy link
Contributor

ascillato commented May 7, 2024

Hello,

what do you think of my proposal to remove that configuration check ?
I think it would be better as it allows to use any T& H sensor, including I2C ones

I wouldn't remove the whole check. I think, we should add the new sensor types you added to the driver instead. The check is mainly to not mix the config when changing the module type. Without this check, in the case an user adds a KNX config and then decides to change the module type to a template or whatever, the config will be scrambled and the only solution is a full reset.

So, I think we should just add to that check the new types. What do you think?

I would not be able to do that these days since I'm not at home but I can look into any change you propose.

@barbudor
Copy link
Contributor Author

barbudor commented May 7, 2024

It is not possible to add a check for sensors that will be detected later in the process such as i2c sensors
There's no way at that time to know if a i2c T/H sensor is present

I would compare that to Tasmota fully erasing it's configuration is the user configure a DS18X20 and then the DS driver doesn't find the sensor

I will revert to your previous code but it's a pity if KNX couldn't work with i2c sensors

@barbudor
Copy link
Contributor Author

barbudor commented May 7, 2024

@ascillato could you please provide a scénario where not having such test would be a problem ?

@barbudor
Copy link
Contributor Author

barbudor commented May 7, 2024

Except for the format of Energy payload, I reverted to the orginal code from @ascillato including the configuration check and the limitation to only some temperature and humidity sensors

That should be good to merge now

@arendst arendst merged commit 466dcae into arendst:development May 10, 2024
59 checks passed
@barbudor
Copy link
Contributor Author

Thanks Theo

pbrinette pushed a commit to pbrinette/Tasmota that referenced this pull request May 12, 2024
* quick fix

* revert to ascillato test
@pbrinette
Copy link

Hi @barbudor. I've tested the latest commits on my ESP32 + DHT11 enabled. it seems to work as expected. The KNX configuration is persistant after the restart. Thanks.

@barbudor barbudor deleted the fix_knx_loose_conf_on_restart branch May 18, 2024 19:37
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

Successfully merging this pull request may close these issues.

KNX Support : Latest commit in development branch introduced a regression when using DHT11 sensor
4 participants