Then simply run macf in your shell to run the tool. I'm using zsh in my shell, please change to your favorite shell rc file.Sudo echo 'alias macf="python3 -m mac_format"' > ~/.zshrc To became easy to run, you can create an alias, the follow command: If you just run the tool withou the MAC ( $ python3 -m mac_format) an input field will be opened: $ py -m mac_format To simply run the tool, you can execute it calling the python module follow by the mac address: $ python3 -m mac_format 77:62:76:5F:B0:85 The code for sending the data is: int returnCodeMagicMirror clientHTTPMagicMirror.POST ( postAttributeFirmware + firmwareCode + postAttributeEfuseMac + efuseMac + postAttributeWiFiMac + wifiMac + postAttributeSensorID + sensorID + postEnd ) String. To check if the tool is availabe, run: $ python3 -m pip freeze | grep mac-format My Arduino (technically an ESP32) sends some json data to my MagicMirror using HTTP POST.
Python convert mac address format install#
To install the tool, run the follow pip command: $ python3 -m pip install mac-format Only the follow delimiters will be added to the final addresses: Nothing. By defaul, the tool will clean the MAC address delimiters and reformat the address in lower and upper case, using two chars by group notation (xx:xx:xx:xx:xx:xx). Only the follow delimiters will be added to the final addresses: CLI tool to format any possible mac address input text to some pretermined mac formats. CLI tool to format any possible mac address input text to some pretermined mac formats.īy defaul, the tool will clean the MAC address delimiters and reformat the address in lower and upper case, using two chars by group notation (xx:xx:xx:xx:xx:xx).