Closed ERgoliner closed 4 years ago
Could you not just edit these code lines from miflora-mqtt-daemon.py? Line 215 onwards. I've ordered a few more also, I'm curious which ones I get. I also have some light green ones, but they do have "C4:7C:8D" MAC addresses.
# Initialize Mi Flora sensors
flores = OrderedDict()
for [name, mac] in config['Sensors'].items():
if not re.match("C4:7C:8D:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}", mac):
print_line('The MAC address "{}" seems to be in the wrong format. Please check your configuration'.format(mac), error=True, sd_notify=True)
sys.exit(1)
I remove this validation and seems to work.
My MAC address is 80:EA:CA:88:AF:99
.
Hey guys! Looking at this with a fresh eye I can't remember why we decided to implement it like this.
Hi Tom
I recently received a new miflora sensor which is not white but light green colored. Those have a new mac beginning with 80:EA:CA therefore your script will not work any longer
Initialize Mi Flora sensors
flores = OrderedDict() for [name, mac] in config['Sensors'].items(): if not re.match("C4:7C:8D:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}", mac): print_line('The MAC address "{}" seems to be in the wrong format. Please check your configuration'.format(mac), error=True, sd_notify=True) sys.exit(1)
It would be great if you could fix that.
Thx Chris