cemilbrowne / homebridge-airtouch5-platform

Airtouch5 Support
Apache License 2.0
10 stars 0 forks source link

Issues with airtouch5 connected to two units #7

Open mcmike313 opened 8 months ago

mcmike313 commented 8 months ago

Describe Your Problem: 1 airtouch5 with two units connected results in the following error

Logs: (AirTouch5) is running on port 48745. TypeError: Cannot read properties of undefined (reading 'zone_name') at Airtouch5Wrapper.AddZoneName (/usr/local/lib/node_modules/homebridge-airtouch5-platform/src/airTouchWrapper.ts:102:32) at AirtouchPlatform.onZoneNameNotification (/usr/local/lib/node_modules/homebridge-airtouch5-platform/src/platform.ts:141:14) at EventEmitter. (/usr/local/lib/node_modules/homebridge-airtouch5-platform/src/platform.ts:79:12) at EventEmitter.emit (node:events:514:28)

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

{ "name": "AirTouch5", "platform": "Airtouch5", "units": [ "192.168.1.211" ], "_bridge": { "username": "**", "port": 48745 } }

Screenshots: image image image image

Environment:

mcmike313 commented 8 months ago

think the issue lies in how it is reading the zones if its a nested list of somekind, are you able to assist?

cemilbrowne commented 8 months ago

Hi Mike;

I'll probably need some more details - could you turn on debug logging for me so I can see what's going on? It's hard for me to be able to tell what's going on, but you're almost certainly right about the nested list.

mcmike313 commented 8 months ago

[2/15/2024, 12:05:14 PM] [AirTouch5] API | Connected to Airtouch [2/15/2024, 12:05:14 PM] [AirTouch5] API | Assembling extended message to get information [2/15/2024, 12:05:14 PM] [AirTouch5] API | Got Extended message - AC ABILITY [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Creating AC: 0{"ac_unit_number":0,"ac_name":"Daikin 12.5","ac_start_zone":0,"ac_zone_count":4,"ac_support_cool_mode":1,"ac_support_fan_mode":1,"ac_support_dry_mode":1,"ac_support_heat_mode":1,"ac_support_auto_mode":1,"ac_support_fan_intelligent":0,"ac_support_fan_turbo":0,"ac_support_fan_powerful":0,"ac_support_fan_high":1,"ac_support_fan_medium":1,"ac_support_fan_low":1,"ac_support_fan_quiet":0,"ac_support_fan_auto":0,"ac_min_cool":16,"ac_max_cool":32,"ac_min_heat":16,"ac_max_heat":32} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Creating Zone: [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Creating Zone: [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Creating Zone: [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Creating Zone: [2/15/2024, 12:05:14 PM] [AirTouch5] API | Assembling standard message with type 23 [2/15/2024, 12:05:14 PM] [AirTouch5] API | Assembling standard message with type 21 [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating AC status: {"ac_unit_number":0,"ac_power_state":0,"ac_mode":4,"ac_fan_speed":2,"ac_target":22,"ac_temp":20,"ac_spill":0,"ac_timer":1,"ac_error_code":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Register AC being called for acnumber: 0 [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating AC status: {"ac_unit_number":0,"ac_power_state":8,"ac_mode":0,"ac_fan_speed":0,"ac_target":10.1,"ac_temp":3041.3,"ac_spill":1,"ac_timer":0,"ac_error_code":700} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating Zone status: {"zone_number":0,"zone_power_state":1,"zone_control_type":1,"zone_damper_position":15,"zone_target":22,"zone_temp":20.4,"zone_battery_low":0,"zone_has_sensor":1,"zone_has_spill":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating Zone status: {"zone_number":1,"zone_power_state":1,"zone_control_type":1,"zone_damper_position":0,"zone_target":22,"zone_temp":20.7,"zone_battery_low":0,"zone_has_sensor":1,"zone_has_spill":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating Zone status: {"zone_number":2,"zone_power_state":1,"zone_control_type":1,"zone_damper_position":0,"zone_target":23,"zone_temp":20.7,"zone_battery_low":0,"zone_has_sensor":1,"zone_has_spill":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating Zone status: {"zone_number":3,"zone_power_state":1,"zone_control_type":1,"zone_damper_position":0,"zone_target":22,"zone_temp":20.4,"zone_battery_low":0,"zone_has_sensor":1,"zone_has_spill":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating Zone status: {"zone_number":4,"zone_power_state":1,"zone_control_type":1,"zone_damper_position":0,"zone_target":22,"zone_temp":20.4,"zone_battery_low":0,"zone_has_sensor":1,"zone_has_spill":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Got an updated zone status, but zone hasn't been initialised yet number: 4 [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Updating Zone status: {"zone_number":5,"zone_power_state":1,"zone_control_type":1,"zone_damper_position":0,"zone_target":22,"zone_temp":20.8,"zone_battery_low":0,"zone_has_sensor":1,"zone_has_spill":0} [2/15/2024, 12:05:14 PM] [AirTouch5] ATWRAP | Got an updated zone status, but zone hasn't been initialised yet number: 5 [2/15/2024, 12:05:14 PM] [AirTouch5] API | Assembling extended message to get information [2/15/2024, 12:05:14 PM] [AirTouch5] API | Got Extended message - ZONE NAMES [2/15/2024, 12:05:14 PM] [AirTouch5] Child bridge process ended [2/15/2024, 12:05:14 PM] [AirTouch5] Process Ended. Code: 1, Signal: null [2/15/2024, 12:05:21 PM] [AirTouch5] Restarting Process...

mcmike313 commented 8 months ago

let me know if you need anymore ive messaged you on discord if you need me to test anything