emmcc / node-switchmate

A Node.js API for automating the Switchmate light switch cover.
MIT License
7 stars 4 forks source link

Failing to pair due to: Error: service uuid 000015231212efde1523785feabcd123 not found! #15

Open epheterson opened 6 years ago

epheterson commented 6 years ago

I'm able to discover my SwitchMate, but when I attempt to pair, I get this error. I had to turn on debug logging to see it, otherwise it fails pretty silently.

The UUID is referenced in ./node-switchmate/lib/SwitchmateDevice.js at the top verbatim, though I'm not yet sure how this is a clue.

Model: TSM001W FW: 2.99.18 OS: macOS 10.13.4

elp@Erics-iMac ~/.n/v/n/v/l/n/n/bin> ./pair.switchmate c098
Locating c098
Connecting to c098
Connected to Switchmate c098.
Press your Switchmate NOW to pair!
Error: service uuid 000015231212efde1523785feabcd123 not found!
    at SwitchmateDevice.NobleDevice.writeDataCharacteristic (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/node_modules/noble-device/lib/noble-device.js:108:21)
    at SwitchmateDevice.pair (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/lib/SwitchmateDevice.js:229:10)
    at SwitchmatePairingSession.self.onConnect (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/lib/SwitchmatePairingSession.js:23:25)
    at SwitchmateDevice.<anonymous> (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/node_modules/noble-device/lib/noble-device.js:83:7)
    at SwitchmateDevice.<anonymous> (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/node_modules/noble-device/lib/noble-device.js:71:5)
    at Peripheral.<anonymous> (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/node_modules/noble/lib/peripheral.js:101:13)
    at Service.<anonymous> (/Users/elp/.nvm/versions/node/v7.6.0/lib/node_modules/node-switchmate/node_modules/noble/lib/service.js:53:7)
    at Object.onceWrapper (events.js:316:30)
    at emitOne (events.js:115:13)
    at Service.emit (events.js:210:7)
Switchmate pairing failed.
Goodbye!
epheterson commented 6 years ago

I think this may be due to the new fw, I was now able to use my TSM001W with the node-switchmate3 plugin, though I can only get on/off to work and not polling. The node-switchmate3 plugin doesn't require an auth code (no pairing step needed), so explains why this step is failing.