Closed sebeksd closed 4 years ago
As designed. No need for using config_override.h or changing tasmota_template.h. You can define all GPIOs you need via the Template function. See https://tasmota.github.io/docs/Templates/
Yes I know, I'm want to include everything in single bin file. For now I'm mostly experimenting so there is a chance I will change mind and use different route. Right now my goal is to create gti branch/stash/patch/commit with full configuration of every Tasmota device I have, so in the end if I need to build/reconfigure something I will have it in one place. For example Using WEBUI or/and commands I need to remember to use few SetOptionsX, Templates, Pins and so on. Of course I can just backup my current configuration which is fine (in 90% cases) but like I said I'm experimenting and I like to have everything in one place, human readable (source files instead of config backup), and have a diff (git) of my changes done in the past.
I'm aware that using "tasmota_template.h" is not "advertised" method but I created this ticket because this issue could potentially be something "larger" and reappear in future in more "correct" situation.
After issuing I2CScan I get "{"Command":"Error"}".
That means that I2C was not enabled in your build.
Please, address this to the Tasmota Support Chat. The chat is a better and more dynamic channel for helping you. Github issues are meant for Tasmota Software Bug Reporting.
Please check the Contributing Guideline and Policy and the Support Guide.
Thanks.
See Wiki for more information. See FAQ for common questions/answers and links if none of your question is in the list See Chat for more user experience. See Community for forum. See Code of Conduct
"#define USE_I2C" is in my_user_config.h and in user_config_override.h. Code "Wire.begi.." in "void GpioInit(void)" is called. Also disabling USE_I2C mean that configuring I2C GPIO through WEB would not work but it do.
I will try to use Chat like you mentioned but tomorrow. Thanks.
For some reason It start working as I was hoping, I2C pins are loaded from template I've changed. Why it wasn't working in the first place I can only guess that it was related to not erasing flash before upload, I'm new to PlatformIO and I wasn't paying attention to If erase flash on upload is done by default or not.
To summaries: Changing "tasmota_template.h" can be used to configure GPIO in firmware.
Another new method is as https://github.com/arendst/Tasmota/pull/8766
Just uncomment line 56 of file my_user_config.h and set there the module template you want
user_config_override.txt tasmota_template.txt
PROBLEM DESCRIPTION
I was configuring my own base configuration through "user_config_override.h" and all is working fine. Because not all settings can be overridden with that file I was forced to edit "tasmota_template.h" (at least for now) to edit pins/gpio settings. After editing "WEMOS"/"Generic" my Buttons/LED/PWM are working fine and they disappear from "Module configuration" (WEB) and they are visible in "Template parameters" with correct values. Problem begin to show when I changed two additional GPIO to I2C. I2C pins are not working, they are not appearing in both WEB menus. After issuing I2CScan I get "{"Command":"Error"}". After manually selecting correct pins I2C start working. I've tried to search for the issue but I'm not familiar with Tasmota enough to find where problem is. It looks like GPIO_I2C_SDA, GPIO_I2C_SCL are completely ignored in base configuration. I've attached all necessary files (config override and template).
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:STATUS 0 output here: 19:51:30 RSL: qiot/things/admin/stat/LampaPokoj/STATUS = {"Status":{"Module":18,"FriendlyName":["Lampa pokoj"],"Topic":"LampaPokoj","ButtonTopic":"0","Power":0,"PowerOnState":0,"LedState":0,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
Console output here: