With an environment with more than 80 Samsung ACs (SHP version, port 8888) and control them through HA and SebuZet’s samsungrac (https://github.com/SebuZet/samsungrac). We need to automatize token request and put retrieved data to configuration.yaml on the fly. I have a Python script that does Token request (still you need to turn on AC) and stores it on MySQLite db. Each row has: IP (last known), UUID (all in all it is device MAC), Name, DeviceToken. Moreover, I already have a separate script that maps IP-MAC on LAN to recover devices IPs from a possible DHCP leasing/AP. The main problem is there, I need to update IP of a device in configuration.yaml if needed. Network equipment on-site may not support +64 DHCP IP reservations! With these steps, could write every device on bulk as:
- platform: climate_ip config_file: 'samsungrac.yaml' ip_address: 'device_ip' token: 'ABCDEFGHIJ' cert: 'ac14k_m.pem' friendly_name: 'Hotel Room 11'
My answer is: can I change configuration.yaml when HA is running and get inmediate operative changes (assuming HA opens it without locking it)? Or it is a restart of HA needed every time? Are there alternatives to change that data online? A plus could be initiate token negotiation from HA UI: typing MAC addr of device and a friendly name, ie “Hotel Room 125” (but I do not know how to do it). But as token request it is only done once I think it is not worth, but some users could benefit. If I get some hints could implement it and share it.