Installed the new version, all working well. Thanks again!
@user3639 I have noticed a possible bug with the Daikin driver ver.1.0.5
The credentials do not survive a reboot of the HE hub, and I have to re-enter them after the re-boot.
If I do not, I constantly get the following:
Is there a way to make the credentials "stick"?
All the data IS in the State Variables, but don't get passed to the authorization.
I just copy/paste the values in the state variables "list" into the "save credentials" fields and "run" and it solves the problem,
BUT why do I even have to do this after a reboot?
Thanks!
In versions 1.0.3 and greater it should retain your credentials on reboots. I have rebooted and upgraded multiple times since I wrote that code and haven't had to re-enter my credentials. I tried it again just now. You shouldn't have to do anything after a reboot.
Can you please:
- Put the driver into debug mode
- Reboot the hub
- Share the logs you get immediately after a reboot?
Thanks.
INTERESTING!!!!
Here is my debug log just before a reboot, then after a reboot (at 16:55:00)
This is a partial screencap of the error time and initialize time:
Then at 16:58:18, on the device page, I clicked on "Initialize" and the errors started popping up
Then at 16:58:39, I clicked on "configure" and the errors stopped and the stat started working again!
SOOOOO...
I must have clicked on "Initialize" while on the device page (for some reason) and it messed me up!
I tried it again, and clicking on initialize messes things up and clicking on configure restores order and the errors stop!
What is the difference between initialize and configure, and why would the driver start to fail when initialize is clicked?
Thanks for the driver!!!! It has been working great!
Okay good, so it appears that it's working correctly in the mundane case.
I agree that the lifecycle method names in Hubitat (presumably inherited from Smart Things) are a bit ambiguous.
Initialize is part of the capability.initialize contract. It is often used to establish network connections. This driver uses it to create the child sensor, clear any old state, acquire an authtoken from the Skyport API if it doesn't have a valid one. It requires the API Key, email, and integrator tokens to have already been set with a prior call to Save Credentials.
Configure just calls Initialize in this driver.
So my guess is that by clicking configure and/or initialize in rapid succession you manage to interrupt the initialization process before it completes or perhaps create trigger a rate limit from SkyPort. I'm not really sure how to protect the driver from that sort of input.
The use/inclusion of Initialize, Configure, etc. all come from legacy code in the prior versions of the driver I modified. It's entirely possible that much of that is redundant and unnecessary, but since it was working I didn't experiment with removing capabilities. It appears that previous authors, like me, have not had a deep grasp on the Hubitat API. (Frankly much of the code had a certain "vibe code" flavor to it, if you know what I mean.)
That is probably what I did.. did not wait long enough for the initialization process to complete.
Thanks for the explanation about the difference between initialize and configure.
Bottom line... DON'T get click happy if it is working...... dummy!!!! LOL


