eibenp / homebridge-gree-airconditioner

Homebridge plugin for GREE Air Conditioners
Apache License 2.0
17 stars 3 forks source link

Homebridge on different network #9

Closed TKrisee closed 1 month ago

TKrisee commented 1 month ago

Describe Your Problem: I recently reinstalled my homebridge server and I can't add my AC. My homebridge is on 192.168.0.x while my ac is on a different network 192.168.20.x. From the homebridge I can ping the ac, but during the scans it cannot detect it, even if I add it manually by it's mac address. The broadcast address is correct as can be seen from the screenshot. With the previous plugin versions 1.x I was able to make it work.

Logs:

[19/05/2024, 18:26:03] [GREE Air Conditioner] Initializing GREEAirConditioner platform...
[19/05/2024, 18:26:04] [GREE Air Conditioner] UDP server bind to port 7002
[19/05/2024, 18:26:37] [GREE Air Conditioner] Scan finished.

Plugin Config:

{
    "name": "GREE Air Conditioner",
    "port": 7002,
    "scanAddress": "192.168.20.31",
    "scanCount": 10,
    "scanTimeout": 3,
    "devices": [
        {
            "mac": "502cc6e004ef",
            "speedSteps": 5,
            "statusUpdateInterval": 10,
            "sensorOffset": 40,
            "minimumTargetTemperature": 16,
            "maximumTargetTemperature": 30,
            "xFanEnabled": true,
            "temperatureSensor": "disabled"
        }
    ],
    "platform": "GREEAirConditioner"
}

Screenshots:

Screenshot 2024-05-19 at 18 30 09

Environment:

eibenp commented 1 month ago

Version v2.0.x was a major change in the plugin. It was completly rewritten from the base and it requires a new configuration as well. Version v2.x has a new concept and a new developer. There is no guarantee that if a configuration has worked in v1.x will continue to work in v2.x

This plugin uses broadcast communication to pair with AC devices. Broadcast traffic is not routed to different subnets (DoS protection). Only a few routers support broadcast forwarding and they also require a very special configuration. If you can not move the AC unit into the same subnet then you have to search for a router which supports broadcast forwarding.

Short answer: Broadcast is for one subnet only. Using Homebridge and the AC unit on different subnet is not supported.