Closed bkhall closed 3 years ago
Interesting issue - these are setup as a "Generic Component Temperature Sensor" as provided by Hubitat. Looking into that, I believe I can add a Unit specification to them and this may clear things up. I didn't realize the system was not accepting these values and assuming it was a temperature in the system units ( Fahrenheit ).
What do you see when you look at events for Air Temp? I rechecked some code for that and the units are in fact there:
Well, you're right about the logs. They do show units.
Google Home kicks it out as an invalid sensor though. I just assumed that because no units are shown on the Current State section on the Hubitat sensor view, that Hubitat might not be sending a scale with the number to Google. But I have no ways of confirming that.
I'm also not sure where these logged units are coming from. Are they sourced from a setting in Hubitat, or are they being pulled in with the number from the poolController library?
I am not surprised that ones like SetPoint don't work - since they are not "TemperatureMeasurement" capabilities just generic attributes. But AirTemp and SolarTemp are using off the shelf Hubitat code for the devices so I really can't do anything to even change the behavior on those.
I am going to look into options to add units to the SetPoints and similar ones. Perhaps you can investigate the interface to Google and see if you can learn anything there. For example, do other temperature devices work with Google? When I get a chance I will try adding these to my Google Home setup here as well.
It's also interesting that the poolController-webClient is not showing a scale - on any temperature - air temp, water temp, and setpoints.
It looks to me like the poolController library is just sending you a number, with no scale. So I'm not sure where the scale shown in the logs is coming from.
That being added by me in the driver code.
Ah ok...how do you know it's F vs. C?
If I change the option to C in ScreenLogic, this happens:
They're not F anymore...
I just pushed a fix to include the unit on SetPoint. The driver does not currently get the value from the PoolController - it is just using the locale setting in Hubitat.
I see. I'll go talk to the poolController dev and see if the units can be sent over.
I suspect they can - I think I have talked with them on this before. I just haven't implemented it at this point. You can open an issue here and I will take a look at some point.
It looks like there is a temperature units parameter in the top level object (system board). For you, that would be likely be in the data you ingest for the pool_controller.groovy driver. Generally, that would be sufficient, but there are other states, and equipment that might have their own scales. So, you may need to look at other drivers that might be different from the main board - pool_controller_chlorinator, pool_controller_heater, pool_controller_intellichem
We do store the temp units and they can be retrieved via http://server:4200/state/temps
or http://server:4200/state/all
(under temps).
@bsileo Can you retrieve this when you setup the equipment? It isn't currently included with the body temp emits.
The latest update fixed the way temp units were being retrieved and used.
We do store the temp units and they can be retrieved via
http://server:4200/state/temps
orhttp://server:4200/state/all
(under temps).@bsileo Can you retrieve this when you setup the equipment? It isn't currently included with the body temp emits.
Yes I am pulling units from /state/temps now and using this for all events in Hubitat.
Successfully linked up the poolController library to Hubitat with this package - nice work.
Was able to get most things to show up in Google Home.
The ones that I could not get to work correctly were anything regarding temperatures. AirTemps, Water temps and setpoints - none of it would link to Google. I suspect this is because no scale is provided with the reading for Hubitat to pass to Google to know what to show.
Spa Body:![image](https://user-images.githubusercontent.com/1682276/103824720-1674a300-503a-11eb-8652-fc7b5aea441b.png)
Pool Body:![image](https://user-images.githubusercontent.com/1682276/103824776-2ee4bd80-503a-11eb-80aa-c7d7813bb2f5.png)
AirTemp:![image](https://user-images.githubusercontent.com/1682276/103824835-4b80f580-503a-11eb-9e4f-c5ee239f6128.png)
Solar Temp:![image](https://user-images.githubusercontent.com/1682276/103824914-766b4980-503a-11eb-9511-6a4e04f15bac.png)