Open trlafleur opened 1 month ago
This means the KumoCloud service has not (yet?) picked up the IP addresses of your indoor units.
See https://github.com/dlarrick/hass-kumo#ip-addresses for some suggestions to get that to refresh via the Installer mode in the Kumo app.
You can try saving the output of the get_raw_json
method to a file, editing it to add your IP addresses, and passing that to KumoCloudAccount (as kumo_dict
) instead of providing username/password for the KumoCloud service.
Not a Python expert, not sure how to do this??
You can try saving the output of the get_raw_json method to a file, editing it to add your IP addresses,
and passing that to KumoCloudAccount (as kumo_dict) instead of providing username/password
for the KumoCloud service.
Here is my Python3 Test program, might point others in the right direction, ps only a test, pss, tab formatting is messed up by Github, but you should be able to get the idea
Updated 8/14/2024 Changed unit.update_status() to getKumoStatus(unit)
import os import sys import pykumo import json import pprint
unit_data = {"0Y34P008W100262F": {"name": "Master Bedroom", "nickname": "MB", "address": "192.168.25.96"}, "2634P008T100191F": {"Name": "Joeys Bedroom", "nickname": "JB", "address": "192.168.25.98"}, "2634P008T100189F": {"Name": "Erics Bedroom", "nickname": "EB", "address": "192.168.25.97"}, "2634P008T100193F": {"Name": "Guest Bedroom", "nickname": "GB", "address": "192.168.25.95"}}
def KumoAccount(fetch_if_needed=False):
account = pykumo.KumoCloudAccount("wxxw@xxxx.com", "***********", kumo_dict=None) #
account.get_indoor_units() # Needed to build kumo_dict
kumo_json_raw = account.get_raw_json() # Get kumo_dict
# Insert IP address into Dictionary
for id in unit_data:
kumo_json_raw[2]["children"][0]["zoneTable"][id]['address'] = unit_data[id]["address"] # add IP Address
kumo_dict = kumo_json_raw # switch to update DICT with addresses
print(kumo_dict)
kumos = account.make_pykumos() # kumos is a dictionary
unit_MB = kumos["Master Bedroom"]
#unit_MB.update_status() # Returns True/False for Status updated
unit_JB = kumos["Joeys Bedroom"]
#unit_JB.update_status()
unit_EB = kumos["Erics Bedroom"]
#unit_EB.update_status()
unit_GB = kumos["Guest Bedroom"]
#unit_GB.update_status()
return unit_MB, unit_JB, unit_EB, unit_GB
def getKumoStatus(unit): unit.update_status() name = unit.get_name() mode = unit.get_mode() fan = unit.get_fan_speed() vane = unit.get_vane_direction() roomTemp = unit.get_current_temperature() coolSP = unit.get_cool_setpoint() unit.set_mode("off")
return name, mode, fan, vane, roomTemp, coolSP
unit_MB, unit_JB, unit_EB, unit_GB = KumoAccount()
unit_name, unit_mode, unit_fan, unit_vane, unit_roomTemp, unit_coolSP = getKumoStatus(unit_MB) print(unit_name, unit_mode, unit_fan, unit_vane, unit_roomTemp, unit_coolSP)
also tried