Sunday, February 12, 2012

hvac control web front end

I started on the front end for the hvac control. In my mind I had really fancy ajax stuff with graphs and whole 9 yards, but then I realized I don't even know ajax so I think I will keep it simple for now, and might add on to it later, and also make it look more pretty.

This is the programming section. A program is basically a set of "rules" that will be followed for a single day. Each day has a program assigned to it. It's very similar to a programmable thermostat where you set a temp for a certain time and it will hold it till the next program starts.

There is a calendar where the program is assigned to an actual day. Note the lack of "weekly" schedule setting. I originally was going to make it so I can set a schedule on a per week basis then go back to override it but it got too complicated for nothing. I work shifts so I'm always going to be going to change it anyway. I will make the back end default to a certain program if no program is specified. Basically it will default to the vacation one.

I did not do the dashboard yet, but that will basically just be a display of the current temp, the program that is active, the temp goal, and an option to do a temporary override without changing the program. Basically an override will be a specific temp at a specific time and a specific duration. This will take priority over the program.

One thing you will notice is that instead of specifying a temp, it's a temp range. This will be more flexible and more efficient as it will avoid short cycling. I will tweak that as I go to get a balance of comfort and efficiency.

After that, I just need to do the back end, which should not be too hard as I already wrote the control class for the relay/sensor board. The back end will basically just be a looped app that checks the sensors, and checks the program, and updates/reads the sql database.

In the future I may make it plot temp graphs and stuff. There will also be some logic such as starting the furnace earlier based on the outside temp and indoor temp. I can probably figure out a formula for that, otherwise I can just make it learn over time.

No comments: