Showing posts with label integration. Show all posts
Showing posts with label integration. Show all posts

Friday, April 20, 2012

DZ + Android + Arduino

DZ + Android + ADK
DZ core has been ported to work on Android OS using ADK devices as actuators.

Supported Android hardware:

  • Galaxy Nexus (unlocked) running ICS 4.0.4 (verified);
  • Nexus S running ICS 4.0.4 (verified);
  • Any phone or tablet running Android 2.3.3 or higher that supports ADK.
Supported ADK hardware:

What's in it for me?

  • No more messy software installation - DZ will install from Android Market.
  • No more messy hardware installation - all necessary peripherals are reduced to the Arduino board with the connector shield on it.
  • No more messy configuration.
  • There's a good chance that soon you will be able to - gasp - just buy it, nail it to the wall and it will "just work".

What's in it for me if I don't have or don't want a tablet/phone?

Arduino can still be used as a single peripheral device for all DZ needs.

Can I get it now?

Yes and no.

  • Arduino firmware is available from the source repository.
  • Android application will be soon published to Android Market.

Stay tuned.

When I can get it, what do I get?

In default configuration,
  • 6 analog temperature sensors
  • 6 servos
  • 2 4-way HVAC control blocks
Currently, 1-Wire and XBee drivers for DZ are in development. After they're done,
  • As many sensors as 1-Wire bus supports;
  • As many sensors as XBee network supports;
  • Up to 48 servos;
  • As many HVAC control blocks as XBee network supports.

Is it compatible with current DZ installation?

Yes, all aspects. The same Android application will be used to control all flavors of DZ.

Friday, February 12, 2010

FAQ: Getting Google Calendar Dependencies

In order to successfully build dz3-scheduler-gcal, you need some extra dependencies, and in order to run it, you need some more (both come from gdata-java-client library). Following are the steps to make them available (implies wget(1) installed on your system):

cd /tmp && \
wget http://gdata-java-client.googlecode.com/files/gdata-src.java-1.40.2.zip && \
cd /usr/local/src && \
unzip /tmp/gdata-src.java-1.40.2.zip
The /usr/local/src location is hardcoded into dz3-scheduler-gcal/pom.xml, change it if it doesn't work for you.

1.40.2 was the latest version available at the time the development of dz3-schedule-gcal was finalized, feel free to replace it with the latest available - but make sure individual dependency version numbers match.

Why So Ugly?

Because gdata-java-client hasn't been made available to the Maven Central Repository yet.

If you want to make it happen and know how to do it, please do so. If you find out that dependencies in question are already in the central repository by the time you read this, please let me know.

Thursday, February 4, 2010

DZ 3.5.1 Release Is Out

Changes since 3.5

Fixed a bug in Google Calendar Schedule Updater causing period times not ending on the hour mark improperly calculated.

There are no other changes, you don't need to bother if you're not using Google Calendar schedule integration.

Monday, February 1, 2010

Early Access: Google Calendar Integration

Subversion contains code that allows to pull your schedule off your Google or Google Apps calendar.

As usual, if you can read source code (dz3-scheduler-gcal is the module to look at) and configure a Spring IoC container, you will have no trouble utilizing it.

Put Your Tinfoil Hat Away

For the paranoid out there: you don't have to write your precious authentication credentials into the configuration in plaintext - you can skip them from the configuration altogether and provide them to the runtime environment via JMX.

Saturday, January 30, 2010

Coming Up: Calendar Integration

You could see some pretty definite hints here, now it's coming to life. So, what exactly is it?

Generic Schedule Updater

ScheduleUpdater interface in dz3-scheduler module provides the interface, and AbstractScheduleUpdater provides the most generic baseline for implementing any back end integration. Want to store your schedule in a flat file? Be my guest. Want to read it off IRC? Anytime.

The updater is injected into the scheduler, so you're pretty much free in what and how you do it. That is, in case if you're not happy with the concrete implementation that will be a part of the release.

Google Calendar Integration

Just like it was planned, DZ will read the schedule from the the calendar of the account of your choice. Both Google and Google Apps accounts are supported, as well as pulling schedule details off any public calendars that you've subscribed to. Basic connectivity has already been implemented, details will be ironed out between now and next release.

Friday, January 22, 2010

FAQ: How Schedule Periods Work

(IMPORTANT: Google calendar has a bug which makes all "forever" recurring events to last for just two years. If the calendar looks empty, scroll the example back to November 2017 to see the actual complex schedule breakdown).

Period scheduling already looks very similar to what is displayed below, and it will look even more like so as wrinkles are ironed out:



Clicking on the calendar button will request to add this calendar to your list of calendars (if you already have a Google account and are logged in) , or present you with Google authentication page. Adding a calendar is a reversible action - you can always remove it later (go to Settings/Calendars and click on Unsubscribe).

The only benefit of adding the calendar to your list is a nice full screen view of the schedule.

In any case, don't forget to click on individual event descriptions to find out how things work (this doesn't require being logged in). Note that the embedded view is scrollable.

Keep in mind that the link is live, and the content will change as details are sorted out.

At this point it is expected that each zone will have its own calendar, to reduce clutter. Moreover, it is currently expected that cooling and heating schedules will be represented by two sets of calendars, with the same purpose - you can easily select and deselect individual calendars, but it'll be a mess if you have more than one set of settings in the same calendar.

Wednesday, December 10, 2008

${mobile-device} + ${appliance}, Nokia edition

Not sure if this post reached the right audience, so reposting it here:

Nokia released the Control Center - a complete home automation solution.

Here's a video - there's a couple of fragments worth looking at if you're interested in temperature zoning.

I don't have any doubts that this system will be beyond the reach of the majority of readers here, and doubt that partial solutions will be offered (though wouldn't be surprised if this actually happens, I've been trying to show for years that this is quite doable).

Still, it's worth noticing that the big players are finally catching up to the game.

Friday, August 29, 2008

SketchUp + Energy Performance, part 4

(part 1)
(part 2)
(part 3)

I think I'm going to stop referring to HVAC-Calc, lest there be any confusion...

Anyway, the saga continues - and here's the last installment: See your building's energy performance - and note, it's free.




Let the fun begin.

Monday, November 12, 2007

Who Needs A Thermostat?

I've been pondering about this question for a long, long time - starting in about 2001 when the only way to control DZ available was a debug panel, and last time in an essay about SWMBO Compliance Certification (Squeezebox is still a good candidate), but it seems that there's been a new development that might if not put an end to the fruitless search, then significantly widen the options available.

I'm talking about Android.

It remains to be seen how viable the platform is and how many hardware manufactures will jump on the bandwagon. But for now - having worked on different Google APIs (Checkout and Calendar in particular) I can say that it's sure going to be a hell of a fun ride, and I'm about to get busy installing the Android SDK and tinkering with it to see how well can a user interface for a HVAC system work on a cell phone.

Now, who needs a thermostat on the wall, really?

Saturday, August 4, 2007

Google Calendar as external scheduler for DZ???

Just thinking aloud - would using Google Calendar API be a gross overkill or actually a smart idea?

Let me see...

  • Unlimited number of zones supported...
  • Unlimited number of periods scheduled...
  • Arbitrarily flexible scheduling - you want 5+2? We have it. You want 5+1+1? We have it. You want 7-Day? we have it, too.
  • Accessible from Internet...
  • Accessible from your mobile phone...
  • Relatively nice and user friendly user interface...
  • They even work on improving it while you sleep...
Actually, this may not be such a bad idea at all.

Tuesday, July 31, 2007

SketchUp + HVAC-Calc = ?

Loosely quoted, "Good companies have many great ideas. Great companies know which great ideas to discard".

Alas, I will not have time to implement this, nor ways to approach the Big Guys to make this happen, but I wonder - am I the only one that sees an obvious symbiosis of SketchUp and HVAC-Calc?

Granted, it's not a five minute project, but all the necessary components are already there - and it won't be that difficult (especially for big guys like Google) to implement a real-time heat loss and gain recalculation as one works on the model of the house...

One of the most important features of SketchUp is that it, being a Google application, evolves fast. Plugins are there, too. It would be really interesting to see where it goes - SketckUp Blog is a nice place to keep an eye on it.

More on SketchUp later - it might have many obvious and not so obvious ramifications on the ways home automation, HVAC and general improvements are done. For example, the most obvious side effect of one creating a house model is that all the hidden spaces you've never thought about become obvious, and the task of routing your cable system becomes significantly less intimidating.

to be continued...

Friday, July 6, 2007

Software Architecture: Centralized vs. Distributed

Evolution of software moves in mysterious ways. Especially if you're not the one contemplating it, but the one making it happen. Hindsight is always 20/20, and now that I'm looking back at the way DZ evolved, I'm seeing that I was merely trodding the same path as countless others - namely, coming all the way from monolithic single host software design to modular distributed.

Just as dinosaurs became extinct, DZ ceased to be a monolith even before it become public - the first GPL'd version was already split in several parts able to talk to each other via TCP/IP, and the parts were linked together in a modular container driven architecture.

Further down the road, the project started shedding more pieces as better versions of them arrived elsewhere (scheduler would be one example). It also became clear that as computers become smaller and cheaper, the day will come when it would be not only possible, but beneficial to utilize multiple computers for a task that could be perfectly done by just one - just for the very reason of having a particular computer in a convenient place for connecting hardware.

Most prominent examples would be -

  • An HTPC which has to reside in a rigidly defined place, next to the rest of AV equipment;
  • A wireless router that is a focal point of wireless and Ethernet connectivity;
  • A workstation, which by itself provides several relevant data streams (CPU temperature, motherboard temperature, hard drive temperature).
Which makes distributed communications difficult to underestimate. Initially, it was just about protocols, now, it's getting all about application interoperability and plugins (Cacti, Munin, Nagios, Mister House to name a few).

Stay tuned.

Wednesday, July 4, 2007

The Dual Nightmare

There is an ongoing heated discussion among homeowners and HVAC professionals about what solution to the problem of properly balancing the house is better - zoning the house, or having multiple units installed. There are all kinds of arguments on both sides.

The proponents of zoning are usually saying that it would be silly to use one switch to turn on or off all the lights in the whole house, whereas the opponents are pointing out that it is silly to pump the amount of air intended for all ducts together through one.

The opponents of zoning are usually saying that it is more reliable to have two simple HVAC units than it is to have one complicated HVAC unit and one complicated zoning system, whereas the proponents are pointing out that maybe HVAC professionals may be simply out of their depth and are trying to cover that up by silly arguments.

The opponents of zoning are saying that having two units is an adequate solution to the balancing problem and point out to the fact that existing commercial zoning systems are rarely extending "affordable" options beyond four zones, to which I say they are completely nuts and give the room (read: zone) count for three quite average houses that I've lived in: roughly 11 zones in Iowa farmhouse (2 levels, 4 bedrooms, full basement), 14 zones in one house in Arizona (3 levels, 4 bedrooms, game room, library) and 13 zones in the house I live in now (2 levels, 3 bedrooms). Oh, I do include bathrooms, too.

But I digress.

Sometimes you just have two units - for example, when you simply buy the house with them installed - it would be silly to rip them out, wouldn't it? So one just has to deal with it...

Whereas having two units is certainly nice, it is by no means a guarantee of any improvement whatsoever. Like it was pointed out before, all your luck depends on having the job done right.

Sometimes your luck is improved by the fact that the house was designed with heat exchange physics in mind (little heat transfer between floors, narrow staircases).

Sometimes it is degraded by the fact that aesthetic considerations took priority over common sense - wide open floor plans with walls being mostly glass, rooms spanning several floors vertically, and different floor count in different parts of the house.

Which is exactly the situation I have to deal with right now. The north side of the house (1 floor, 2 rooms + 2 bathrooms) is served by a nice powerful variable speed high SEER Lennox split unit. The south side (2 floors, 4 rooms + bathroom + kitchen + laundry room) is served by a puny rooftop Trane and a set of drinking straws they called ducts.

So let me skip the rant about how unthoughtful that was, and get directly to describing various interactions between two units that may happen. Let's assume for simplicity that we're talking about cooling season behavior.

Unhappy Load Meter

If both units kick in at the same time, and you are on a load controlled electrical billing plan, you're not gonna be happy. Neither is your electrical company, but that's a completely different story for a different time.

Cold Spots

It may happen that both units serve the same room[s], directly or indirectly, and the room has enough or more than enough supply and return capacity, and neither of the thermostats is in it. If both units kick in at the same time, the room will get uncomfortably cold.

Hot Spots

It may happen that the cold air supplied by unit A drags down the temperature at the thermostat controlling unit B. In this case, it will not get unhappy and cause unit B to switch on until unit A is off. Which will cause the rooms normally served by unit B to become uncomfortably hot.

The Skew

To add insult to injury, it is quite possible that the layout described above also makes unit A serve, at least partially, the zone that is supposed to be served by unit B - and in this case, unit A will keep running and running, possibly not even catching up with demand - and it will not get any help from unit B because the effect described above robbed unit B of necessary control input and is preventing it from switching on. You end up with one unit trying to do the work of two, for which it is clearly undersized. To further aggravate the situation, it is possible that the overworked unit will go beyond its normal design range, and then you have a dead unit (ask me how I know).

For more than one floor, The Skew is rather a rule than an exception.

Ask yourself a question, don't you always have to set the thermostat downstairs a couple of degrees lower than upstairs, otherwise it feels hot and stuffy? The scenario above explains it vividly. All there is is a leak of cold air from upstairs through the staircase (or a tall room) that causes the thermostat downstairs to make the unit stay off.

Catch-22

To prevent The Skew (further defined as one of the units working significantly longer than the other), you need to carefully balance the thermostats in such a way that the race never starts. This will usually mean that you will have one of the thermostat set below the comfort level, and the other above. Also, this is going to cost you, because the difference between "comfortable" and "balanced" positions of thermostats is going to make a significant contribution to your electric bill. Also, it robs you of comfort. Also, it will make you fiddle with controls all the time, unless you have monitoring set up, in which case you'll just spend half of the time fiddling.

It would be interesting to know what side of argument described at the beginning of the article you are now...

Sunday, July 1, 2007

HVAC Interoperability? Forget about it...

"The Home Plug and Play Specification represents a strong first step towards unifying the industry behind a common open industry specification and accelerating the deployment of smart interoperable devices in the home," stated Kevin Kahn, Director of Intel's Communications Architecture Lab and Intel Fellow. "This will enable new applications for the PC bringing increased convenience and security to the homeowner."

This inspiring quotation comes from a press release dated... January 10 1997. Over 10 years ago.

So, what do we have today?

The Home Plug and Play Specification never materialized.
Same is the fate of CEBus, for all practical purposes.
BACnet, Modbus, and LonTalk never made it down to residential applications.

Up to this day, there is no sign of existence of a unified diagnostic interface across residential HVAC devices.

Only the very advanced and recent systems such as Carrier Infinity have remote access, but even for that you have to pay a hefty $100 annual fee, and it does NOT have a simplest possible thing - the Ethernet interface. Yes, instead of providing an ability to plug a CAT-5 cable into it, it goes across the SkyTel pager network, quote, "because it didn't require a computer network to operate".

Side note: forgive me for being blunt, but I don't really understand why two pieces of equipment, both of which reside in my house, keep nagging for money and require a roundtrip across the world, rely on complicated and expensive infrastructure, absolutely refuse to talk to anything that hasn't been paid for and/or thought of by the designers? Two answers come to my mind:

  1. The manufacturers want to milk the customers and make them pay for most number of upgrade modules they can (market segmentation in action, also, see Carrier Infinity vs. Bryant Evolution);
  2. The designers didn't know about the fact that an Ethernet connector hardware costs pennies to implement and the computer network in a strict sense is not even necessary (hint: static IP, DHCP, zeroconf, Ethernet hub).
You pick the answer you like better.


Let me skip the rest of the long list of arguments that lie just beneath the surface, and state the fact as it appears from a consumer standpoint: Interoperability between commercially available hardware appliances is effectively nonexistent.

One of possible reasons for this is that the residential HVAC industry hasn't reached maturity - technically speaking, we're barely at introduction stage yet. None of the manufacturers seem to have realized that with drastically shortened product development and obsolescence it is much more profitable to play nice together than to rip the sandbox apart trying to get the biggest share of toys.

Related is the fact that the explosive growth of IT, achievements in hardware and software interoperability and the benefits they can yield are mostly being ignored.

Yet another fact is that most probably the manufacturers are stuck in the middle of the hardware development pipeline - and they still can't wake up and realize that unless they manage to shake off the illusion that they can pull it off, cut the losses, drop the pipeline and start working as the present day demands, they will be overrun by smaller, more agile companies that are able to utilize all these nice things referred and alleged to above.

Mark my words.