I’m making progress on the development of the Heatzy service, and I have 2 questions about « best practices » or what is generally done:
Heatzy devices do not send data; it is up to Gladys to fetch their status every X seconds by making a GET request to the corresponding API. Is there a standard way to do this, a generic interval? I haven’t found an example in the existing services yet.
For each device, there are several features, including the MODE which can take the values: [ECO, OFF, HORSGEL, COMFORT]. What is the best way to model this as a feature/category of features? I’m having a bit of trouble understanding how to best integrate the features of Heatzy devices into the Gladys model. (I also saw in another topic that the operation of devices and their features was going to be modified, perhaps it would be better to wait for this update…)
Yes! You need to implement a « poll » function that will be called every X seconds according to the configuration of each device.
You may have noticed that in the « t_device » table, there is an attribute « should_poll » and an attribute « poll_frequency ». If, when you create the device, you specify them, Gladys will call the « poll » function of your service every X seconds according to the specified frequency.
You can look at the example of the Philips Hue service →
Or Camera:
For this, we were talking about a generic API for heating management, it goes with this debate I don’t remember, is there a topic where we talk about it?
On my side, it’s not in my short/medium term todos in terms of development, but I can give my point of view on proposals, so don’t hesitate to take the lead and start the debate on the community
Sorry for the delayed response, I’m not seeing daylight these days
Unfortunately, I haven’t finished developing the service yet. I’m struggling to find time to work on it, and since it’s my very first service/dev on Gladys, it’s taking a while! If anyone is available to give me a hand, I’d be delighted
Well, to be honest I don’t yet have a pilot-wire unit for my cellar (where I want to control my heaters), so it might be more relevant for me to look instead at a Matter-compatible pilot-wire heating control unit…
So I don’t know exactly what Heatzy is, but you mention a pilot wire and that gets my attention.
You mention Matter; I’d say Zigbee.
I currently have a Nodon SIN-4-FP-21 module on one of my radiators, and it lets me see the energy consumption.
1/ I was surprised to see that in frost-protection/eco mode, with 20°C in the room, the radiator was heating in regular spikes
2/ I think radiator control will be done with on/off and an external thermostat.
Anyway, long story short: either you control via z2m, or you absolutely want Matter — you can expose your z2m