nymea/data/mac-database
Simon Stürz b3fb5b44d7 Make use of system data location for searching the mac address database 2021-06-28 13:51:25 +02:00
..
README.md Make use of system data location for searching the mac address database 2021-06-28 13:51:25 +02:00
build-database.py Update mac database build script and README.md 2021-06-28 13:51:25 +02:00
mac-addresses.db Autodownload the mac address database information and make build script standalone 2021-06-28 13:51:25 +02:00

README.md

Building the MAC address database

The MAC address database can be created using the build-database.py script. The script will download the latest registered MAC address block information from https://macaddress.io and creates a size and access optimized SQLITE database file.

The generated database is read performance optimized and tried to keep as small as possible for searching MAC address OUIs (Organizationally Unique Identifiers) blocks and returning the registered company name.

$ python3 build-database.py

The final database will be named mac-addresses.db.

In nymea the MacAddressDatabase class will provide access to this generated database and provides an asynch threaded mechanism to get the company name for a given MAC address.

The database will be searched in the system default data location ${XDG_DATA_DIRS}/nymead/.

On debian package based system the database file will be installed in /usr/share/nymea/nymead/mac-addresses.db.