nitaybz / homebridge-switcher-platform

Homebridge plugin for Switcher Smart Accessories
MIT License
35 stars 9 forks source link

TypeError: message_buffer.byteLength is not a function #10

Closed ori-levi closed 4 years ago

ori-levi commented 4 years ago

After updating to v2.0.2 I found this error in the log

9/26/2020, 8:43:50 PM TypeError: message_buffer.byteLength is not a function at Function.is_valid (/home/hoobs/.hoobs/node_modules/switcher-js/src/switcher.js:44:33) at Socket. (/home/hoobs/.hoobs/node_modules/switcher-js/src/switcher.js:272:37) at Socket.emit (events.js:310:20) at UDP.onMessage [as onmessage] (dgram.js:924:8)

found the solution (I hope; my js skill is not high :P) it should be message_buffer.byteLength and not message_buffer.byteLength()

I open you a pull request for this change https://github.com/nitaybz/switcher-js/pull/1

nitaybz commented 4 years ago

fixed