Closed PeterV989 closed 1 year ago
If I understand correctly, on your Z box Hub, the values of self.properties.coolingThermostatSetpoint and self.properties.heatingThermostatSetpoint are in Celcius degrees. The input values of the methods setHeatingThermostatSetpoint and setCoolingThermostatSetpoint are in fahrenheit degrees ?
With my Home Center 3, (when i configure the box with fahrenheit unit), all values are in fahrenheit degrees... It will be complicated to do a quickApp that works for both boxes.
The documentation is poor and incomplete. The most complexe tasks is to discover the APIs... I will try to check if I can directly retrieve the values in the view. So that it will be possible to change heating and cooling points at the same time.
I will do this this week end.
According to the Google documents, the setpoints are always in Celsius. I found that to be odd because Google is an American company and we tend to arrogantly think there should be no other way but our own. I say that only half seriously. I would also be surprised that they would have two standards for the APIs based on region. I am not disagreeing with you, just musing out loud. I see some mention of an EU device which I presume is a European marketed device. The APIs have said something to the effect that those devices are not using the APIs. For my immediate needs this driver works great. I have seen something about the pub/sub aspect of the APIs and I hope to independently look at that to learn more about it and see if that might be a more elegant solution to the timer looping that Fibaro promotes. Given the nature of thermostats and the HVAC operations, a one minute timer update is more than sufficient. Nothing changes so rapidly that a rapid response is called for. I just want to learn more about it. I have done factory automation in my life and this whole home automation idea has appealed to me for a while. I have been struggling to learn the newer languages (first Node JS, now Lua). They have really turned my concept of programming on its head. Lua’s fluid use of tables has my head spinning but I’m getting there. The way you have structured your code has made my learning curve very small. It is very easy to figure out. I am sometimes confused about the inner workings of the Fibaro system and how the user interfaces are connected to the QAs. I finally remembered the Swagger button on investigated it. That seems to be where a lot of the real work is done. While my box is a Z-Box Hub, the software seems to be all Fibaro. I think Zooz is a small hardware company and licensed the “operating system” for the Z-Box Hub from Fibaro. Possibly like the Yubii system?
Thank you again. I look forward to what you find and I will keep poking around here. I don’t think there’s much more that is in need of “fixing” to make our respective systems work. I have a late start today because of an ice storm. I have been off the last two days and may be working a half day today. If they don’t offer any overtime Friday and Saturday I will be off for my usual three day weekend. I work four ten hour days each week which gives me a nice three day weekend. Hope all is well with you. Stay safe & warm and I will share my findings with you to improve on a very nice QA.
Peter
Didn't mean to close.
Thanks, perfect. It works also for me on my home center 3.
The only thing left to see is the simultaneous modification of the temperature points.
I installed your update and played around with it. The first glaring problem was that the setpoint for the unchanged setpoint does not need to be converted to °C. The value you are using is already in Celsius. I simply removed the call to getDegreesCelsius for that setpoint.
This next problem is very subtle. I tried to track down a way to fix it but can't quite do that yet. The problem is that when I change both setpoints in the device screen, only the last change is sent to the thermostat. What I mean by that is that since the heating setpoint is updated first, the value doesn't get updated in the traits area or properties area. Then the cooling setpoint is changed but the old heating setpoint is still in the body['traits']['sdm.devices.traits.ThermostatTemperatureSetpoint'] (perhaps because while the value may have been sent to the thermostat, the thermostat has not been read back into the body yet?). My thoughts were to have an setAutoThermostatSetpoint() method and use it when the device is in Auto mode. But, for the life of me, I can't see where those methods are connected to the event system. That may not make sense within the context of the Fibaro system but IMHO the documentation is very sparse and your ability to have hunted down the mechanisms for all of this is astounding. (Maybe when I grow up I can be just like you [weird American humor]).
And finally, this won't be a problem for me but a final check should prevent the cooling setpoint to be less than the heating setpoint. I notice in the Nest app when I bump one value up or down towards the other value it automatically adjusts the value to keep them 2° or 3° different. Not at all sure of a clean way to do that other than to pick one and adjust it when that condition is met.
If I can help further with my setup just let me know. I'm happy to oblige.
Peter