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

Rename Sensors / give them friendly names #6970

Closed
ryaske opened this issue Nov 19, 2019 · 33 comments · Fixed by #16649 or #19026
Closed

Rename Sensors / give them friendly names #6970

ryaske opened this issue Nov 19, 2019 · 33 comments · Fixed by #16649 or #19026
Labels
duplicated Result - Duplicated Issue feature request (devs?) Action - awaiting response from developers stale Action - Issue left behind - Used by the BOT to call for attention

Comments

@ryaske
Copy link

ryaske commented Nov 19, 2019

Hello, I have three DS18B20 connected and working perfectly.

However, the names are DS18B20 -1, DS18B20-2, DS18B20-3

How can these be renamed to friendly names? I am assuming they cant be because I was not able to find any info about this what-so-ever.

Might the only way this is possible is compiling my own build with the names embedded?

I think the feature request in that case is obvious.
Thank you
Ryan

Have you looked for this feature in other issues and in the docs?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

(Please, remember to close the issue when the problem has been addressed)

@ascillato2
Copy link
Collaborator

How can these be renamed to friendly names?

They can't sorry. Not Supported.

Might the only way this is possible is compiling my own build with the names embedded?

yes, exactly.

I think the feature request in that case is obvious.

Added the label to see if there is someone interested on working on this.

@ascillato2 ascillato2 added the feature request (devs?) Action - awaiting response from developers label Nov 19, 2019
@ascillato
Copy link
Contributor

ascillato commented Nov 19, 2019

If you don't need this RENAMED SENSOR in Home Assistant Discovery, as a workaround you can use rules feature of Tasmota and save the value in a VAR and then Send it by MQTT with the name you want.

If you want this sensor renamed in Home Assistant, you can edit its name by Home Assistant UI.

@ryaske
Copy link
Author

ryaske commented Nov 20, 2019

If you don't need this RENAMED SENSOR in Home Assistant Discovery, as a workaround you can use rules feature of Tasmota and save the value in a VAR and then Send it by MQTT with the name you want.

If you want this sensor renamed in Home Assistant, you can edit its name by Home Assistant UI.

Thanks so much, ascillato.

I do want this to reflect properly directly on the Tasmota UI, which that solution doesn't cover, correct?
(It would certainly be nice to have it sent as the default MQTT name as well to make things more cohesive as I often use MQTT Explorer for troubleshooting)

I found two references in the rule cookbook for modifying MQTT, and studied the Rules wiki page--- but they seem to only ever modify the variable, not the MQTT sensor name. I cant figure out how to create a rule that does that. Do you have any suggestions?

as I try and figure this out,, is it possible to change the names any other way? Can you confirm it would be possibly be editing the firmware? (Any tips there or in getting this rule to work would be appreciated.

Finally, will the device alaways send 6 messages, 3 with the old names and 3 with my new names? Can I have it only do the latter? Less MQTT traffic the better. But ultimately I'd like to just change the names everywhere at once in the easiest way possible..

I intend to use several devices with more than one sensor so it can get very confusing otherwise

@ascillato
Copy link
Contributor

Example of a rule that sends the temperature with a friendly name:

On the Tasmota console type:

Rule1 1 
Rule1 on tele-DS18B20-1#Temperature do publish stat/kidsroom/temperature %value% endon on tele-DS18B20-2#Temperature do publish stat/kidsroom/temperaturebed1 %value% endon

@ascillato
Copy link
Contributor

I do want this to reflect properly directly on the Tasmota UI

Tasmota UI is for configuration. For daily use, Tasmota is intended to be used by mqtt, so you should use the UI of your home automation software.

@ascillato2
Copy link
Collaborator

Closing this issue as there is a workaround and no one is working on this.

Thanks for sharing your ideas.

@ascillato2 ascillato2 added the requested feature (hold over) Result - Feature that will not be added soon (out of scope) label Nov 21, 2019
@ryaske
Copy link
Author

ryaske commented Nov 21, 2019

Thank you very much Adrian, for providing guidance towaqrds that rule! I wlil make that happen today.

I agree that I will use HA primarily, but for troubleshooting-- and when my HA is down for whatever reason, I do utilize the Tasmota UI and so I want it to reflect the same. Otherwise it is very unclear.

I will spend some time trying to bake my change into a custom firmware edit --- and if I find it reasonably possible I will post a short how-to here to help anyone else that may want to do this. Because, I agree that the feature request is not worth baking into a main release.

Thanks again!!

@mlavelle42

This comment has been minimized.

@ascillato

This comment has been minimized.

Repository owner deleted a comment from kctrey Jun 17, 2020
@mlavelle42
Copy link

I, too, was surprised that DS18B20 sensors could not be named within Tasmota. This, in my opinion, is a significant omission. I understand your logic, that naming can and should be managed within Home Assistant (or whatever platform). But don't you detect, within your own comments, that you are "right" on this matter, while others "don't understand what Tasmota is all about"?

My take is different. Tasmota is the single best software app to come along (for this type of work) ever. Period. The number of configuration arguments are over-the-top. Incredible. However, the ability to name a sensor within a Tasmota screen is, from my experience, a fundamental property that should have been included from the beginning. The Rule workaround is clumsy if only because it requires text editing rather than form editing.

Please reconsider a sensor naming feature within Tasmota's UI. It would definitely simplify setup and support.

@dieckfr
Copy link

dieckfr commented Jul 10, 2020

Thank you very much Adrian, for providing guidance towaqrds that rule! I wlil make that happen today.

I agree that I will use HA primarily, but for troubleshooting-- and when my HA is down for whatever reason, I do utilize the Tasmota UI and so I want it to reflect the same. Otherwise it is very unclear.

I will spend some time trying to bake my change into a custom firmware edit --- and if I find it reasonably possible I will post a short how-to here to help anyone else that may want to do this. Because, I agree that the feature request is not worth baking into a main release.

Thanks again!!

Did you find a solution? I think that is was a very nice feature to do that, yust for a stand alone solution... Nice greetings!

@ilgrank
Copy link

ilgrank commented Jul 14, 2020

+1 for this, but I really doubt @ascillato will be looking here again, since this issue is closed.

@ascillato
Copy link
Contributor

You are free to provide a pull request with the change you need.
If the code addition uses few bytes (flash and RAM) you have a good chance that Theo will merge it.

@ilgrank
Copy link

ilgrank commented Jul 14, 2020

@ascillato :aren't pull request meant to contribute code? Alas, I've no code to contribute, just asking for an enhancement.

@ascillato
Copy link
Contributor

Hi,

Yes, a Pull Request is code changes. Tasmota is open for pull requests, but someone needs to work on that.

In this issue it has been requested an option to rename sensors but nobody have spent their free time addressing this. So the label requested feature (hold over) has been added.
Also, a workaround has been proposed with the use of rules for sending by mqtt, the sensor name you want.

If you want, you are free to fork Tasmota and modify it to suit your needs and then provide a PR for adding those changes to the main repository.

There are many opened feature requests, but we need more people to work on them in order to transform wishes into code.

As you can see from old issues, people just spend their time only on the new feature they are interested. I can reopen this issue if that is what you want me to do.

@ilgrank
Copy link

ilgrank commented Jul 15, 2020

I'd gladly contribute, but I'm not a programmer. So I can't provide any useful code, that's why I'd call it a feature request, rather than a pull request.
There is a workaround indeed, but a proper solution would help. Maybe re-opening the issue is the right thing to do, thanks

@ilgrank
Copy link

ilgrank commented Jul 15, 2020

if @dieckfr comes out with any code, that would be great for a pull request. btw 👍

@ascillato2
Copy link
Collaborator

Reopening as requested.

@ascillato2 ascillato2 reopened this Jul 15, 2020
@close-issue-app close-issue-app bot added the template missing/incomplete Action - Template Missing or incomplete (issue will be closed) label Jul 15, 2020
@ascillato2 ascillato2 added duplicated Result - Duplicated Issue and removed requested feature (hold over) Result - Feature that will not be added soon (out of scope) template missing/incomplete Action - Template Missing or incomplete (issue will be closed) labels Jul 15, 2020
@ilgrank
Copy link

ilgrank commented Jul 15, 2020

..duplicated of what other issue?

@ascillato2 ascillato2 reopened this Jul 15, 2020
Repository owner deleted a comment from close-issue-app bot Jul 15, 2020
@dieckfr
Copy link

dieckfr commented Jul 15, 2020

Hello again! Sorry for the late response... So normaly I'am Developer for Codesys Software, I Engineering machines, and as you can read, my German is better then my Englisch :)

I had a look inside the Code, and I must say, wow, what a great Job in Style and Design and flexibility, that is very impressive... And thats the Problem, not very Easy for a DAU Programmer like ME... I searched much time to understand how is the HTML Code produced, picked up, by feeling thousend pointers, and found at least, the correct ( I hope, not testet yet) line for building the Names of the DS18XXXX. That is what I need. I hope i can test it tonight (hardcoded) and can Show you the result, so that everbody can make a user Build. I dont think that I can implement a Command for User Sensor Names in the next Weeks, or the next Years :) ist not my Code, and flexibility of the Code makes it not easyer...

But what is about a Request? Iam newbie in Github, and Iam not understand the Complete Prozesses here at the Moment... How can I make a Request for this Feature, to Mr. Arends or a good programmer :). Can sombody explain me the procedure? I want to make it, and learn the schematics of Github :)

OffTopic:
By the way i started whit Tasmota while buying a House and want to make it a little Smart... at the moment i start to read out my old ferraris Power Meter. It Counts good in Tasmota, but is it possible to Show a Countervalue no thats not right ... somthing like this Countervalue -> Variable (its Countervalue/75) -> WebUi as kWh. that is what i want... ther are only Smart Meter options in Tasmota, but i found nothing to use one whith only a counter Value.

HAve a great Time! And nice greetings from Mettingen Germany

@kugelkopf123
Copy link
Contributor

OffTopic:
By the way i started whit Tasmota while buying a House and want to make it a little Smart... at the moment i start to read out my old ferraris Power Meter. It Counts good in Tasmota, but is it possible to Show a Countervalue no thats not right ... somthing like this Countervalue -> Variable (its Countervalue/75) -> WebUi as kWh. that is what i want... ther are only Smart Meter options in Tasmota, but i found nothing to use one whith only a counter Value.

HAve a great Time! And nice greetings from Mettingen Germany

You could use the smart meter interface as explained in the docs.
Just look for counters. There are some options to manipulate the counter value.
Most of the things are for smart Meters. You will find some examples that show the use of counters. Mostly they are used for gas and water. But it is no problem to use this option for electricity as well.

@ilgrank
Copy link

ilgrank commented Jul 16, 2020

@dieckfr : as for code contribution, you have to go to repository for Tasmota and fill a Pull request (mush as you did to open this issue) and subit the proposed code

@dieckfr
Copy link

dieckfr commented Jul 19, 2020 via email

@mlavelle42
Copy link

Great start. Thank you.

@ilgrank
Copy link

ilgrank commented Jul 20, 2020

@dieckfr: thanks for the contribution. The correct place to publish your code tho is in a Pull request, not in an issue

@dieckfr
Copy link

dieckfr commented Jul 20, 2020

I have to study Github principals :) By the way, i have done a little bit work in formatting, and the DHT Sensor works also.

@ilgrank
Copy link

ilgrank commented Jul 20, 2020

That's great news @dieckfr !
All you have to do is go here:
https://github.com/arendst/Tasmota/pulls
and propose your code (if it is well documented / commented, the better)
If it causes no problems, and it is not too heavy it will probably be merged in the main Tasmota code :)

@stale
Copy link

stale bot commented Aug 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Action - Issue left behind - Used by the BOT to call for attention label Aug 15, 2020
@stale
Copy link

stale bot commented Aug 22, 2020

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.

@MaxVonEvil
Copy link

Hey all, might be kicking a metabolically challenged horse here, yet just curious if mentioned ds18b20 alias ever made it into the main repo? I too have multiple tempsensors bolted on to some devices, i.e. do my best to follow a logical naming convention for all entities, thus super helpful if this ever got implemented. Thank you //MvE

@sfromis
Copy link
Contributor

sfromis commented May 13, 2023

What you have now is the command DS18Alias allowing you to select a number, or you can do a build replacing the default non-fixed number by an id derived from the address. Due to the limited capacity of the ESP8266, Tasmota does not provide for defining string names for all sorts of sensors.

@MaxVonEvil
Copy link

Is the DS18Alias perhaps in another build?
I'm running Tas 12.5.0 and it does not recognize said command?

@barbudor
Copy link
Contributor

The code is there but not compiled in any standard build
You need to self compile with

#define DS18x20_USE_ID_ALIAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicated Result - Duplicated Issue feature request (devs?) Action - awaiting response from developers stale Action - Issue left behind - Used by the BOT to call for attention
Projects
None yet
10 participants