rchrch / homebridge-mhacwifi1-lan

Homebridge Plugin for LAN Control of Mitsubishi Heavy Industries MH-AC-WIFI-1
Apache License 2.0
6 stars 2 forks source link

Homebridge can't start when device ist not available #1

Closed Frederick-G764 closed 1 year ago

Frederick-G764 commented 3 years ago

When Homebridge and the AirCon is noch available Homebridge can't start.

[12/05/2021, 18:46:41] SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at IncomingMessage. (/usr/local/lib/node_modules/homebridge-mhacwifi1-lan/src/accessories/device.ts:380:41) at IncomingMessage.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) [12/05/2021, 18:46:41] [Air Conditioning] No device found at address: 192.168.178.26 ([object Object])

rchrch commented 1 year ago

Sorry for the very late response. I haven't had any time for this project.

I can't reproduce this problem. With an incorrect IP address, homebridge continues to run for me (of course with errors saying no device is available). Here is a log except with a bad IP address:

[02/10/2022, 11:09:35 am] Homebridge v1.5.0 (HAP v0.10.4) (Homebridge) is running on port 51826.
[02/10/2022, 11:09:36 am] [Homebridge UI] Homebridge Config UI X v4.50.1 is listening on :: port 8080
[02/10/2022, 11:09:38 am] [homebridge-mhacwifi1-lan] Http request error: Error: connect EHOSTUNREACH 10.0.20.209:80
[02/10/2022, 11:09:38 am] [homebridge-mhacwifi1-lan] No device found at address: 10.0.20.209 (Error: connect EHOSTUNREACH 10.0.20.209:80)
[02/10/2022, 11:09:48 am] [homebridge-mhacwifi1-lan] Checking for device at 10.0.20.209
...
[02/10/2022, 11:09:51 am] [homebridge-mhacwifi1-lan] Http request error: Error: connect EHOSTUNREACH 10.0.20.209:80
[02/10/2022, 11:09:51 am] [homebridge-mhacwifi1-lan] No device found at address: 10.0.20.209 (Error: connect EHOSTUNREACH 10.0.20.209:80)
[02/10/2022, 11:10:01 am] [homebridge-mhacwifi1-lan] Checking for device at 10.0.20.209
...
more of the same

I don't see a JSON error in my logs. Was that possibly the problem?

rchrch commented 1 year ago

If you are still having trouble, please let me know. Otherwise I will close this issue.