-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Plain ARROW symbols on buttons that command shutters #7166
Conversation
3697669
to
31cc34c
Compare
Thx. I see a flaw when there are six relays. First pair and last pair being used for shutter would result in wrong label on relay 3 and 4. Based on you idea I'll make a satisfying update. Stay tuned. |
I have read in the doc that shutters relays have to be tight together...
-- edit -- |
Maybe a more general approach to name the individual buttons would be better. My neighbor uses the Tasmota WebUI to control the garden sprinklers, and for him it would be very helpful if the names on the buttons could be changed individually. With that functionality, _ARROWUP/_ARROWDOWN or similar could then be translated to the mentioned icons from the original post. |
Individual naming would mean for every button there needs to be space allocated in the Settings area for a text of unknown size. Currently a no-go as the Settings area ia almost full. |
Are there any plans for the near future to increase the size of the settings area? I I thought about setting the names via MQTT or just hard coding them, but having them stored in the settings would just be the much cleaner solution. |
Oops, sorry Theo for the //// lh61 tag and other cosmetic typos in my commit (I use this to locate my changes locally to have a control over git mergers). I made a corrective commit later in the night and thought it had been executed but it seems like I messed up here. |
Settings area is 4k already. This means 4k of RAM is used for settings. I'm currently polling on Discord the use ratio of char arrays within the Settings area to decide if it makes sense to change the current static char array sizes to one static char array to be used for all current text strings. New code would then extract and update part of the single char array. Initial results to show that over 60% of total char arrays is not used which openes up new possibilities like longer MQTT usernames and passwords ;-) or even naming single buttons.... |
Change GUI Shutter button text to Up and Down Arrows based on PR by Xavier Muller (#7166)
Merged in some way ;-) |
Change GUI Shutter button text to Up and Down Arrows based on PR by Xavier Muller (arendst#7166)
How about reusing the "Friendly Name" Strings from the "Configure Other" section? I never understood what they were used for, but only realized that there is one for each relay and changing the name did not yield any (expected) results. For backwards compatibility there could be a bit in the settings for "use old friendly name behaviour" (default) or "use friendly names for relays/outputs/etc" (needs to be set manually). |
The friendlynames are very important for Alexa users. I'm gathering statistics about char array usage and the results are very promissing. It seems we have a usage ratio of around 40%. By concatening all strings into one char array and adding code to handle inserts, deletes and replace ther is plenty of space to add new text functionality. Watch for changes to coma about one of these weeks. It's weeks because I have to make sure conversion to one char array is seamless for users. |
The UTF-8 arrows I used take 3 chars each. But I guess it's the same for Chinese or Arabic chars. |
Add commands ``WebButton1`` until ``WebButton16`` to support user defined GUI button text (#7166)
Description:
It's a change I wanted for myself for a long time and the recent arise of the shutter driver gives me that opportunity to do it.
This code change makes a difference between Up and Down buttons in the case of a shutter. Labels of buttons of other relays are not affected.
Here is the result:
First screenshot shows a Dual R2 defined as shutter, second picture shows what happens on a Sonoff CH4 when only 2 first relays form a shutter and last one the same device with 2 shutters.
-DUSE_SHUTTER
(585,328 bytes).I join the tasmota binary here for the one who want to test because one need to uncomment
#define USE_SHUTTER
inmy_user_config.h
to allow shutter support.-> PR_v7124.zip
Checklist: