Open yomotherboard opened 3 years ago
In general i figured out that key contains last 6 letters of MAC address (which is also present at device hostname ex. ESP-DE4E3F) . So you can find devices by seeking MAC addres in dhcp leases on you router (dhcp sever).
Firstly thank you to everyone involved for your very helpful work! I got a couple lumary recessed lights, saw they used ESP (were even tuya-convertable), so I ordered 60. Opened the new ones up to find that they switched chipsets... Yea I freaked out. Anyway this is saving me from a huge disaster.
Is there a good (scriptable) way to get the host IP address for various devices? I have over 60 identical lights, whose hostname are all showing up as "wlan0" on my router. localtuya seems to find most of the lights (about 80% of them) despite me putting the wrong host IP for all of the entries in their configuration files. However, it does give an error that it cannot connect to the IP address (as expected). If I remove any of the configuration files for a light it shows up as unavailable, so I know they are not being discovered completely by some auto-discovery method.
If there is a way for me to get the IP addresses through an API or cli, or for this to be optional in the configuration, this would allow me (and could help others) to automate the entire process if new devices are added or old ones need to be reconnected. I tried leaving the host field out of my configuration but I got:
Invalid config for [localtuya]: required key not provided @ data['localtuya'][0]['host']. Got None. (See /config/configuration.yaml, line 71). Please check the docs at https://github.com/rospogrigio/localtuya/
I think this problem has to do with my configuration as well; the discovery feature doesn't seem to be working at all.
Here are my logs without debugging enabled. They just loop like this, with whatever I gave as the host ip in the error output:
Here are my logs with debugging enabled:
It also seems to be in a loop. Here a minute later the fresh debug output look exactly the same as the beginning of the output I posted above.
I just copied and pasted this from the supervisor log page but I will get the full output if I can figure out how or if someone can tell me. It seems to be going by too fast to capture everything.