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

Enabling TLS support requires changing my_user_config.h but that file gets overwritten #12

Closed
richardpowellus opened this issue Aug 31, 2019 · 3 comments

Comments

@richardpowellus
Copy link

Per this Github issue for Tasmota: arendst/Tasmota#6084 in order to enable TLS support you need to set #define USE_MQTT_TLS in my_user_config.h directly (you cannot put it in the overrides file).

I'm using Tamocompiler in docker and even if open a shell and directly edit my_user_config.h, when I click "compile" all my changes to my_user_config.h get overridden.

So right now I can't use Tasmocompiler to build firmware with TLS support.

Can you either:

  1. Give us a way to edit my_user_config.h that persists; or
  2. Add "TLS" as a feature that can be added from the web UI?; or
  3. Let me know if there is some other workaround for this issue?

Thanks!

@benzino77
Copy link
Owner

benzino77 commented Sep 1, 2019

Technically TasmoCompiler do not overwrite my_user_config.h - git does.
When you hit Compile button, TasmoCompiler callsgit reset --hard to throw away all uncommitted changes, to have clean, unmodified Tasmota source code for selected branch/version (all changes made before hitting Compile button will be discarded). Then TasmoCompiler create platformio.ini, user_config_override.h and starts compiling the source.
Since MQTT over TLS can be enabled only by editing/changing my_user_config.h this has to be implemented in TasmoCompiler to make it work as expected.

For now, you can prepare my_user_config.h file outside Tasmota source directory, and after hitting compile button you have to overwrite this file:

cp /home/dprus/my_user_config.h /tmp/Sonoff-Tasmota/sonoff

This is just idea for quick-fix, I haven't tested it.

Anyway, I will think about how to implement it in the future.

@benzino77
Copy link
Owner

It looks like it is already solved: arendst/Tasmota#6330 - so, from the current development branch you can do this by user_config_override.h file.
You can use then "Custom parameters" field to put your MQTT TLS related stuff.

I will add an option inside "Select features" step to allow to check "MQTT over TLS"

@benzino77
Copy link
Owner

It is already implemented. You can try it.

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

2 participants