not sure this module is still maintained, but I need help on this error.
I defined custome status
"status_on": {"data": "on"}, "status_off": {"data": "off"},
My API returns json like :
{"data": "off","result": "ok"}
But when it tries to compare, it got the error:
[2018-3-17 15:28:10] [TV] Getting power state
[2018-3-17 15:28:11] [TV] Status Config On { data: 'on' }
/usr/local/lib/node_modules/homebridge-http/index.js:240
statusOn = compareStates(customStatusOn, JSON.parse(responseBody));
^
ReferenceError: compareStates is not defined
at HttpAccessory. (/usr/local/lib/node_modules/homebridge-http/index.js:240:25)
at Request._callback (/usr/local/lib/node_modules/homebridge-http/index.js:173:17)
at Request.self.callback (/usr/local/lib/node_modules/homebridge-http/node_modules/request/request.js:186:22)
at Request.emit (events.js:160:13)
at Request. (/usr/local/lib/node_modules/homebridge-http/node_modules/request/request.js:1163:10)
at Request.emit (events.js:160:13)
at IncomingMessage. (/usr/local/lib/node_modules/homebridge-http/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:255:19)
at IncomingMessage.emit (events.js:165:20)
at endReadableNT (_stream_readable.js:1101:12)
Hello,
not sure this module is still maintained, but I need help on this error. I defined custome status
"status_on": {"data": "on"}, "status_off": {"data": "off"},
My API returns json like :
{"data": "off","result": "ok"}
But when it tries to compare, it got the error: