reloxx13 / Sonoff-Tasmota-Modified

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE
GNU General Public License v3.0
26 stars 6 forks source link

Sonoff-SC missing friendly name on Information page #2

Open mike2nl opened 6 years ago

mike2nl commented 6 years ago

Used tools:

Used Hardware:

Have you look for this feature in other issues and in the wiki? -> Yes.

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. -> When you have the SOnOff-SV in use, a envoirement sensor, you will miss the friendly name on the information web page which can be a little irritating because when you have set the hostname different you miss it.

Describe the solution you'd like A clear and concise description of what you want to happen. -> I have changed a very little part in the xdrv_02_webserver.ino file to add this information and it works perfect.

Original Code: if (SONOFF_IFAN02 == Settings.module) { maxfn = 1; }

Changed Code: if ((SONOFF_IFAN02 == Settings.module) || (SONOFF_SC == Settings.module)) { maxfn = 1; }

Additional context Add any other context or screenshots about the feature request here. ... i'm willing to help with much more ...

reloxx13 commented 6 years ago

this is also wanted, cuz the friendyname is ONLY for alexa devices.

if their is no relais to switch, their will be no friendlyname to setup.

and in the line before the maxfn is defined by teh count of devices/relaises. in you change you overwrite and hardcoded the maxfriendlyname to 1, which means you will never be able to set more friendlynames if you (dont forget other users) add another relais to the modul.

mike2nl commented 6 years ago

I see but that is the original tasmota code not mine! I have added that here only: || (SONOFF_SC == Settings.module))

Because the original code: if (SONOFF_IFAN02 == Settings.module) { maxfn = 1; } It is a max of one. So where is the issues here? Possible it's to early today to see the issue.

And possible you can help me out to understand what you mean.

So in my eyes i see no issues with that because that changing does no harm. I have now 223 sonoff devices and i see no issues at all