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

Error: The MAC address "..." seems to be in the wrong format. #174

Open
Zjaaspoer opened this issue Feb 21, 2024 · 2 comments
Open

Error: The MAC address "..." seems to be in the wrong format. #174

Zjaaspoer opened this issue Feb 21, 2024 · 2 comments

Comments

@Zjaaspoer
Copy link

Hi, I've been using your daemon successfully for years, thank you for that. A few days ago I bought new MiFlora sensors (same type). But now I'm getting validation errors with the new MAC addresses:

Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon

[2024-02-21 19:53:17] Connecting to MQTT broker ...

Adding sensor to device list and testing connection ...
Name:          "ficus"
Device name:   "Flower care"
MAC address:   C4:7C:8D:6A:DC:34
Firmware:      3.3.5
[2024-02-21 19:53:21] Initial connection to Mi Flora sensor "ficus" (C4:7C:8D:6A:DC:34) successful

Adding sensor to device list and testing connection ...
Name:          "hangachter"
Device name:   "Flower care"
MAC address:   C4:7C:8D:6D:51:2C
[2024-02-21 19:53:23] Initial connection to Mi Flora sensor "hangachter" (C4:7C:8D:6D:51:2C) successful

Adding sensor to device list and testing connection ...
Internal name: "hangvoor"
MAC address:   C4:7C:8D:6D:3A:61
Firmware:      3.2.4
[2024-02-21 19:53:26] Initial connection to Mi Flora sensor "hangvoor" (C4:7C:8D:6D:3A:61) successful


Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon

[2024-02-21 19:53:38] Connecting to MQTT broker ...

Adding sensor to device list and testing connection ...
Name:          "ficus"
Device name:   "Flower care"
MAC address:   C4:7C:8D:6A:DC:34
Firmware:      3.3.5
[2024-02-21 19:53:42] Initial connection to Mi Flora sensor "ficus" (C4:7C:8D:6A:DC:34) successful

Adding sensor to device list and testing connection ...
Name:          "hangachter"
Device name:   "Flower care"
Firmware:      3.2.4
[2024-02-21 19:53:44] Initial connection to Mi Flora sensor "hangachter" (C4:7C:8D:6D:51:2C) successful

Adding sensor to device list and testing connection ...
Name:          "hangvoor"
Device name:   "Flower care"
MAC address:   C4:7C:8D:6D:3A:61
Firmware:      3.2.4
[2024-02-21 19:53:46] Initial connection to Mi Flora sensor "hangvoor" (C4:7C:8D:6D:3A:61) successful

[2024-02-21 19:53:46] The MAC address "5C:85:7E:12:AB:60" seems to be in the wrong format. Please check your configuration

This seems to be related to this piece of code. But the RegExp does match the MAC addresses it trips over.

As you can see it connects properly to my old devices (starting with C4:...) but is tripping over any of the new devices. I've made sure the strings are correct and not hiding any copy/paste hidden special characters or something of the sorts.

I've tried this on several machines, they are all giving the same issues.

@ThomDietrich
Copy link
Owner

Hey!
This is odd indeed but when I run your log posting from above through he following it correctly accepts your "5C:..." mac address.

https://pythex.org/?regex=%5B0-9a-f%5D%7B2%7D%3A%5B0-9a-f%5D%7B2%7D%3A%5B0-9a-f%5D%7B2%7D%3A%5B0-9a-f%5D%7B2%7D%3A%5B0-9a-f%5D%7B2%7D%3A%5B0-9a-f%5D%7B2%7D&test_string=&ignorecase=1&multiline=0&dotall=0&verbose=0

I've made sure the strings are correct and not hiding any copy/paste hidden special characters or something of the sorts.

This would have been my guess... Very strange. Temporarily comment out this line and see what happens

@Zjaaspoer
Copy link
Author

Will try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants