kongkx / homebridge-gree-air-conditioner

Apache License 2.0
20 stars 8 forks source link

Can't Connect to my Ac's #8

Open imeSven opened 2 years ago

imeSven commented 2 years ago

Expected behavior: i cant connect to my 2 air cons

Logs: [7/14/2022, 6:17:15 PM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:101:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/14/2022, 6:17:17 PM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:101:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/14/2022, 6:17:20 PM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:101:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/14/2022, 6:17:22 PM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:101:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/14/2022, 6:17:25 PM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:101:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/14/2022, 6:17:27 PM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:101:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.
    {
        "name": "Gree AC",
        "language": "en",
        "port": 6667,
        "scanAddress": "192.168.0.255",
        "defaultValue": {
            "statusUpdateInterval": 3,
            "sensorOffset": 40,
            "defaultSpeed": 3,
            "defaultVerticalSwing": 0,
            "defaultHorizontalSwing": 0
        },
        "devices": [
            {
                "mac": "381f8dfb6f5d",
                "name": "dormitor",
                "sensorOffset": 40,
                "defaultSpeed": 3
            },
            {
                "mac": "d81f124611be",
                "name": "living",
                "sensorOffset": 40,
                "defaultSpeed": 3
            }
        ],
        "platform": "GreeAirConditioner"
kongkx commented 1 year ago

I think you may try another port number, the messege received is unexpected.

If it does not work, try the new patch version i just published. In the new version, I add add a debug log to print the raw message received, you may need to enable debug mode to view it.

imeSven commented 1 year ago

just tried, but nothing works :( same error. if i change the port i dont have the error but it wont find the ac.

kongkx commented 1 year ago

The new patch does not fix any bug, it just log extra info in debug mode. You needs to enable the debug mode of homebridge to see the log. Share the debug log with me, then we can try to solve the problem.

imeSven commented 1 year ago

[7/17/2022, 11:01:53 AM] [Gree AC] Initializing GreeAirConditioner platform... [7/17/2022, 11:01:53 AM] [Gree AC] Config: {"name":"Gree AC","port":6667,"scanCount":10,"language":"en","scanTimout":3000,"scanAddress":"192.168.0.255","defaultValue":{"minimumTargetTemperature":16,"maximumTargetTemperature":30,"sensorOffset":40,"defaultSpeed":3,"defaultVerticalSwing":0,"defaultHorizontalSwing":0,"statusUpdateInterval":3,"switches":"power,verticalSwing,horizontalSwing,quietMode,powerfulMode,light,dryMode,fanMode,sleepMode"},"devices":[{"mac":"381f8dfb6f5d","name":"dormitor","sensorOffset":40,"defaultSpeed":3}],"platform":"GreeAirConditioner"} [7/17/2022, 11:01:53 AM] [Gree AC] Finished initializing platform: Gree AC [7/17/2022, 11:01:53 AM] [Gree AC] handleMessage U��#�_�V�3�����3�s�B�d(���R@LK�m![R��wM,k;dе�^�̦��OrT7X�irV��� ����1r���8�W����yz�b����~Y���U[A3��?MB���bz#�$�Z�H��Q��9<f��U �ɔol���HS. [7/17/2022, 11:01:53 AM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/nodemodules/homebridge-gree-air-conditioner/src/platform.ts:102:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/17/2022, 11:01:56 AM] [Gree AC] Broadcast '{"t":"scan"}' 192.168.0.255:7000 [7/17/2022, 11:01:56 AM] [Gree AC] handleMessage U��#��V�3�����3yg䜟q���]l9tM2�5��+�+ޒ����C"���������L�rV��� ����1r���8�W����yz�b����~Y���U[A3��?MB���bz#�$�Z�H��Q��9��N"�U �ɔol���HS. [7/17/2022, 11:01:56 AM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/nodemodules/homebridge-gree-air-conditioner/src/platform.ts:102:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/17/2022, 11:01:58 AM] [Gree AC] handleMessage U��#��V�3�����3�s�B�d(���R@LK�m![R��wM,k;dе�^�̦��OrT7X�irV��� ����1r���8�W����yz�b����~Y���U[A3��?MB���bz#�$�Z�H��Q��9<f��U �ɔol���HS. [7/17/2022, 11:01:58 AM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/nodemodules/homebridge-gree-air-conditioner/src/platform.ts:102:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/17/2022, 11:01:59 AM] [Gree AC] Broadcast '{"t":"scan"}' 192.168.0.255:7000 [7/17/2022, 11:01:59 AM] [Hue] Phoscon-GW: request 4: GET /sensors [7/17/2022, 11:01:59 AM] [Hue] Phoscon-GW: request 4: 200 OK [7/17/2022, 11:02:01 AM] [Gree AC] handleMessage U��#��V�3�����3yg䜟q���]l9tM2�5��+�+ޒ����C"���������L�rV��� ����1r���8�W����yz�b����~Y���U[A3��?MB���bz#�$�Z�H��Q��9��N"�U �ɔol���HS. [7/17/2022, 11:02:01 AM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/nodemodules/homebridge-gree-air-conditioner/src/platform.ts:102:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/17/2022, 11:02:02 AM] [Gree AC] Broadcast '{"t":"scan"}' 192.168.0.255:7000 [7/17/2022, 11:02:03 AM] [Gree AC] handleMessage U��#��V�3�����3�s�B�d(���R@LK�m![R��wM,k;dе�^�̦��OrT7X�irV��� ����1r���8�W����yz�b����~Y���U[A3��?MB���bz#�$�Z�H��Q��9<f��U �ɔol���HS. [7/17/2022, 11:02:03 AM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/nodemodules/homebridge-gree-air-conditioner/src/platform.ts:102:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/17/2022, 11:02:04 AM] [Hue] Phoscon-GW: request 5: GET /sensors [7/17/2022, 11:02:04 AM] [Hue] Phoscon-GW: request 5: 200 OK [7/17/2022, 11:02:05 AM] [Gree AC] Broadcast '{"t":"scan"}' 192.168.0.255:7000 [7/17/2022, 11:02:06 AM] [Gree AC] handleMessage U��#��V�3�����3yg䜟q���]l9tM2�5��+�+ޒ����C"���������L�rV��� ����1r���8�W����yz�b����~Y���U[A3��?MB���bz#�$�Z�H��Q��9��N"�U �ɔol���HS. [7/17/2022, 11:02:06 AM] [Gree AC] handleMessage Error SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Socket.GreePlatform.handleMessage (/homebridge/node_modules/homebridge-gree-air-conditioner/src/platform.ts:102:28) at Socket.emit (node:events:527:28) at UDP.onMessage (node:dgram:922:8) [7/17/2022, 11:02:26 AM] [Gree AC] Scan finished.

kongkx commented 1 year ago

I'm sorry, I can not figure out what is going wrong.

briakpal commented 1 year ago

i maked the good instal the first time. The plugin is working for me. (Fisher air condition)