binsentsu / am43-ctrl

Node Util for controlling an AM43 Blinds Drive Cover, either over MQTT or via a HTTP API
44 stars 25 forks source link

Change the MAC address lookup to case insensitive #19

Closed Evolter closed 4 years ago

Evolter commented 4 years ago

Didn't work out of the box for me as discovered addresses are using lower case letters:

$ sudo node_modules/.bin/am43ctrl "02:0C:B3:xx:xx:xx" --express-port 3000 -d
  am43* scanning for 1 device(s) [ '020CB3xxxxxx' ] +0ms
  am43 listening on port 3000 +0ms
  am43 Found 020cb3xxxxxx but will not connect as it was not specified in the list of devices [ '020CB3xxxxxx' ] +61ms

With the fix:

node_modules/.bin/am43ctrl 02:0C:B3:xx:xx:xx --express-port 3000 -d
  am43* scanning for 1 device(s) [ '020cb3xxxxxx' ] +0ms
  am43 listening on port 3000 +0ms
  am43* discovered 020cb3xxxxxx +953ms
  am43* all expected devices connected, stopping scan +1ms
binsentsu commented 4 years ago

Thanks for enhancement. Will indeed improve user friendliness.