Author
Topic: Digging into Climate plugin:got out with some interesting features (Read 3563 times)

since I'm trying to support quite some different devices in my home, I'd also like to interact with them properly through floorplans on Orbiters...

I currently spot some inconsintencies and also unifinished features in floorplan devices, so I'm starting my adventure into Climate and Lighting plugins (cause they suit my newbie knowledge of programming). Thread and wiki page for lighting plugin will follow... Now back to Climate Plugin.

I've started wiki page with highlights of code and behaviour and also my comments, my opinions what is probably not done ok (I could be easily missing something - I hope "senior developers" will correct me where necessary)...

I'd be happy to see some discussion on this matter. I propose few quite enhancements (so less info is displayed for simple sensors and also display of devices in colors showing their state is better supported). I'm curious if they make sense....

I plan to try to make those enhancements, but would like to get some supervision from developers and also discussion about this matter, so we can clear out how the things regarding climate devices are supposed to be...

I also think that some discussion would be good on support for Blinds,Drapes and Shutter devices. I guess they belong to this category, but currently they don't seem to be supported at all. I guess displayed dimmed light controls is a solution for a start...

I'd kindly ask more LMCE and c++ experienced guys to help me with determinining device template of device that is subject of highlighted Climate_Plugin::GetFloorplanDeviceInfo method. It seems like pointer to DeviceData_Router is the only option, but I don't know if I can get some more device data (most important is template) via that pointer... How can I get to device data from this subroutine, or how can I do this in general ? Is there any other example that I should look and learn ?

for instance: default string value for displaying exactly the same info as it is know is :'$1/$2/$3/$4 ($5)' - omit quotes!

Climate device has a state consisting of five components: Active($1), Mode($2), FanMode($3),Setpoint($4),ActualTemp($5) and by default everything is displayed on floorplan... Now by changing this string you can easily control/select and add text info to floorplan - few examples :'Outside ($5)' will display text Outside and then ActualTemp'$2 ($4)' this is probably the thing for actual thermostat without fan....

OSD string is changed from default - computed :- only if Extra parameters string exists- if they exist, $1..$5 are replaced by actual values one by one- everything else is intact...

I've tried to do this on my 710 system and must admit that now my floorplan is getting more user friendly and informative....

What do you think about solution ?

I also have an idea for further possible replacement of hardcoded states that are displayed on floorplans:- for instance what if you don't like HEAT/COOL/AUTO, then you could set an replacement for them -something like'$1/$2/$3/$4 ($5) $3=HEAT|High;COOL|Low' - omit quotes!

That means that when evaluating $3, state of 'HEAT' is replaced by custom 'High'... I think this is not so hard to code, but it's beyond my c++ knowledge, so if anyone can come up with a bit of help it would be welcome.... With this possibility you gain total control of what is displayed on floorplan and you can easily customize things on floorplan...

I run out of time, wanted to do also possibility to replace certain keywords with custom one, but will probably do that later. Similar changes could be made to other similar floorplan plugins, but there are some other problems to solve - with Lighting plugin I think JonDecker promised a quick fix so device state will be displayed on floorplan at all - we can proceed from there....