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

Fallback Topic not unique #8300

Closed
7 of 11 tasks
pgScorpio opened this issue Apr 28, 2020 · 10 comments
Closed
7 of 11 tasks

Fallback Topic not unique #8300

pgScorpio opened this issue Apr 28, 2020 · 10 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@pgScorpio
Copy link

pgScorpio commented Apr 28, 2020

Please DO NOT OPEN AN ISSUE:

  • If your Tasmota version is not the latest from the development branch, please update your device before submitting your issue. Your problem might already be solved. The latest precompiled binaries of Tasmota can be downloaded from http://thehackbox.org/tasmota/
  • If you have an issue when flashing was done via Tuya Convert, please address it to Tuya Convert Team
  • If your issue is a flashing issue, please address it to the Tasmota Support Chat
  • If your issue is compilation problem, please address it to the Tasmota Support Chat
  • If your issue has been addressed before (i.e., duplicated issue), please ask in the original issue
  • If your issue is a Wi-Fi problem or MQTT problem, please try the steps provided in the FAQ and Troubleshooting

Please take a few minutes to complete the requested information below. Our ability to provide assistance is greatly hampered without it. The details requested potentially affect which options to pursue. The small amount of time you spend completing the template will also help the volunteers providing the assistance to you to reduce the time required to help you.

DO NOT DELETE ANY TEXT from this template! Otherwise the issue will be auto-closed.
-->

PROBLEM DESCRIPTION

From the manual:

By default the Fallback Topic is DVES_XXXXXX_fb where xxxxxx is derived from the last 6 charactes of the device's MAC address (excluding :)

This means that we only use the second half of the MAC address. However the first 3 bytes of the MAC address are (or at least should be) vendor specific, and you would expect that all 'Espressif' devices have the same first 3 bytes in their MAC, but I discovered this is not the case (see picture, ). Espressive has multiple MAC ranges (at least 2, see links.), so you can have two devices with the same Fallback Topic !

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in the docs
  • Searched the problem in the forum
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): 2x L-10A01-RF
  • Tasmota binary firmware version number used: _____
    • [x ] Pre-compiled
    • Self-compiled
      • IDE / Compiler used: _____
  • [x ] Flashing tools used: Tasmotiser
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:
n.a.

  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:

  • [ x] Provide the output of this command: Status 0:
  STATUS 0 output here:
n.a.

  • [x ] Provide the output of the Console log output when you experience your issue; if applicable:
    (Please use weblog 4 for more debug information)
  Console output here:
n.a.

TO REPRODUCE

Steps to reproduce the behavior:
n.a.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.
Why don't we simply use the full MAC address like MAC_XXXXXXXXXXXX as a fallback topic ?
since this should always be unique.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

Screenshot_20200428-154522

ADDITIONAL CONTEXT

Add any other context about the problem here.
https://hwaddress.com/oui-iab/C4-4F-33/
https://hwaddress.com/oui-iab/D8-F1-5B/

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

@close-issue-app close-issue-app bot added the template missing/incomplete Action - Template Missing or incomplete (issue will be closed) label Apr 28, 2020
@meingraham
Copy link
Collaborator

What is the probability that you will have the two devices with the same least significant three bytes of these two Espressif MAC ranges? It's smaller than 1/(2*256^3) (~3e-8) because you have to also account for the population of people buying Espressif based devices and you being the one that gets the "duplicates". OK, it's not zero, but is it high enough for concern?

@pgScorpio
Copy link
Author

pgScorpio commented Apr 28, 2020

Hi meingraham, thanks for the quick reaction.

First of all a slight correction:

The chance is (number of tasmota devices on the network - 1) * (number of 'Espressif' MAC ranges') / (2^24), (in my case about 4e-6 or 1 on 250000.)

Secondly: I did run into this problem (I wish I was that lucky in the lottery!) while trying to add a new sonoff on my network. And it took me hours to find out out what was going on (a esp12 on the network with the same lower 3 bytes in the mac !).

Thirthly: With the exponentially growing number of Espressif based devices (I expect that there are already more than 2 Espressif MAC ranges.) the chances will only grow too

Finally: Even if the chances are very low, it's so easy to prevent it, so why don't change it !

@meingraham
Copy link
Collaborator

I never was much good with statistics 😉

I still think you need to take into account the population. But, yes, if only you were as lucky as you appear to be unlucky 😉

If you want this issue to be looked more critically, you need to open a "feature request" and fully complete the template so that the issue isn't automatically closed by the bot.

@pgScorpio
Copy link
Author

Yes I know you're right, but still I think it should be an easy fix that one day could save someone else some big problems too.

And I did think I fully completed the template, but no idea why it still got closed right away )-:)
just because I didn't fill in the non-applicable 'Tasmota binary firmware version number' ??

@meingraham
Copy link
Collaborator

Adding the three bytes (six characters) may have other implications in how the fb topic is treated elsewhere and impact that code... but yes, could be minimal.

Even though it's superfluous, providing some of the information (e.g., Status 0 which has lots of pertinent information) could be useful... and the bot is expecting that.

I'll try to re-open. But if I can't then please create a new issue with all the info you can... even if it might be N/A.

@meingraham meingraham reopened this Apr 28, 2020
@pgScorpio
Copy link
Author

Thanks for reopening.
If purely the lenght of the fb topic would be an issue it could be shortened to just M_XXXXXXXXXXXX (same length)
but I guess that would not be the case.

@ascillato2 ascillato2 added feature request (devs?) Action - awaiting response from developers and removed template missing/incomplete Action - Template Missing or incomplete (issue will be closed) labels Apr 28, 2020
Repository owner deleted a comment from close-issue-app bot Apr 28, 2020
@pgScorpio
Copy link
Author

FYI:

I just found out that Espressif already has 34 MAC ranges !
See https://hwaddress.com/company/espressif-inc/

@stefanbode
Copy link
Contributor

What other projects are doing is to use the ID from the splash and the ID from the mac as we do. In this case, it should be unique. I still had no problems and I have quite a lot ESP here. Class-D does not work anymore...

@pgScorpio
Copy link
Author

In this case, it should be unique.

No it isn't ! It should be if the manufacturer has only one mac range, espressif has already 34 mac ranges in use (and still growing)..

I still had no problems and I have quite a lot ESP here

So do I, and I ran into this problem ! That's why I reported this issue.

Class-D does not work anymore...

No idea what you mean with that...

arendst added a commit that referenced this issue May 26, 2020
Add support for unique MQTTClient (and inherited fallback topic) by full Mac address using ``mqttclient DVES_%12X`` (#8300)
@arendst arendst added the fixed Result - The work on the issue has ended label May 26, 2020
@ascillato2 ascillato2 added enhancement Type - Enhancement that will be worked on and removed feature request (devs?) Action - awaiting response from developers labels May 26, 2020
@ascillato2
Copy link
Collaborator

Closing this issue as it has been added by Theo.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

5 participants