Tuesday, November 24, 2009

DZ 3.2 "Barebones" Release Is Out

CHANGES since 3.1-PASSIVE

Most important change: you can control your HVAC equipment again.
  • Fixed JMX control - only monitoring was possible before, complete control is possible now for attributes exposed;
  • Improved JMX representation - composite objects are now rendered correctly;
  • Ported HVAC equipment control logic from DZ1 code base.

CONFIGURATION

Blog format doesn't play well with XML excerpts, and as configuration is becoming more and more complex, it becomes more and more difficult to post it here. I'm currently writing the DZ3 configuration guide, and when it is ready, it'll be posted at DIY Zoning Project site, and this post will be updated to reflect the actual page.

Having said that, let me emphasize that this is an experimental release with many known bugts and even more unknown. Hence,

BIG RED WARNING

Just like it says here: YOU MUST UNDERSTAND THE CONSEQUENCES AND TAKE RESPONSIBILITY. THIS IS YOUR EQUIPMENT. IF YOU DO IT, YOU'RE ON YOUR OWN. IF IT BREAKS, YOU KEEP BOTH PIECES.

NEXT RELEASE

There are several possible directions where development efforts may be directed, and your voice counts. Please take a look at the poll on your right, and choose the option that suits you best. For now, here's an extended description of these directions.

Interface

Right now, this project is in a geek-only mode - Spring configuration is needed to boot it, JMX is the only way to control it. A GUI is much needed, with three distinctly different versions possible:
  • GUI-Swing
  • GUI-Web
  • GUI-Android
GUI-iPhone was also requested, but I neither have the iPhone itself, nor tany inclination whatsoever to do anything about it. If you do, welcome to the club, let's talk.

Configurator

Some day, it would be possible to have a visual, drag and drop PnP configurator for DZ. However, given the ratio of time it takes to learn how to configure it with Spring XML file (when the tutorials are done, that is) to the time it will stay up, chances of a Configurator materializing are slim. Nevertheless, the option is still available.

Distributed Operation

If you have several computers or other devices that can report their thermal state over TCP/IP, this option would be tempting. This is also very useful for integrating DZ with other home automation projects (MisterHouse comes immediately to mind).

Housekeeping

Like I said, Barebones is an experimental release. Of course, obvious bugs and/or improvements are already logged and being worked on, but again, priority matters, so this option is up. By the way, bug tracker is available, though right now it's still littered with DZ1 artifacts.

Something else?

Did I forget anything? Let me know.

Sunday, November 22, 2009

Jukebox 6.1 is out

WHERE TO GET IT

WHAT'S NEW?

JMX setAttribute() and setAttributes() is now supported.

Quite embarrassing - I thought I implemented JMX mutators all along when I was releasing 6.0, this is even mentioned in release notes. Now it works for real.


Thursday, November 19, 2009

servomaster-serial 0.8.2.1 released

CHANGES

Fixed constructor visibility for Parallax serial controller - it wasn't possible to instantiate it via Spring before. If you're not using Parallax servo controller, or not using it with DZ or Spring, you don't need this.

DOWNLOADS

Available from SourceForge and Google Code.

DZ3 FAQ: Everything in Celsius?

Q: Why is everything in C°?
A: To avoid a disaster like this.

Q: Will I be able to specify setpoints and see display and monitoring data in F°?
A: Yes, the user interface will take care of this. Default units will be determined by where you are, you're likely to never notice anything.

Development Tools: IntelliJ IDEA

This is a reminder, for those who didn't know or forgot: IntelliJ IDEA, which you normally have to pay for, also provides an Open Source License, for which you have to qualify.

According to the license terms (at the time of writing, emphasis is mine),

"Licensee" means an open source development group specified in the License Certificate.

If you think you are planning to contribute, please contact me for licensing details.

Configuration Change Required

If you're using a Subversion snapshot of the code and keeping it up to date, you'll have to change the configuration for 1-Wire device factory:

  • Was: net.sf.dz3.device.sensor.impl.onewire.DeviceFactory
  • Now: net.sf.dz3.device.sensor.impl.onewire.OwapiDeviceFactory

Power Can Violate Your Privacy, Too

Remember I've been telling you not to publish your temperature graphs on Internet for years? All right, with DZ you have a choice to publish or not to publish, but not so with your power company.

Load Signatures
Here's the article: Experts: Smart grid poses privacy risks

Well, here's my take on it: if you wanna get, you wanna give. Want to save a penny, gotta let them know what you're doing. Privacy is dead - regrettable, but a fact. You're back to village life, where everyone knows everything about everyone. Just on a new level, that's all.

<via /.>

Wednesday, November 18, 2009

DZ3: Running Without Dampers

When I heard this idea for the first time, I though - wait, it doesn't make sense, what's the gain? Then it dawned on me - the showstopper has just been removed.

What is stopping *you* from installing this system in your house? Most probably, the idea about ugly wires all over, and/or expensive wiring and wall repairs that will have to follow.

Now, what do you need to do if you run this system *without* dampers connected? Install as many wireless sensors as you wish or can afford, and a small control unit (like this, for example) somewhere in the mechanical room where your HVAC unit is installed. You don't even have to disconnect the existing thermostat and deal with te wall repairs. Now, let's consider both sides of the coin.

DISADVANTAGES

You won't be able to optimize the behavior of more than one zone at the same time. It's just like the good old thermostat that you carry in your pocket, and the house follows you. Hence, no energy conservation. But, this is a trade off, and if you calculate ROI, it may turn out that possible savings in electric bill vs. cost of wiring may break even many years from now.

BENEFITS

  • You can improve thermal behavior of your house instantly. Using different setpoints, zone shutoffs and zone voting settings (see detailed explanation here), you can have the desired temperature where you are, not where the thermostat is.
  • You don't have to destroy your walls doing wiring and deal with repairs and dust.
  • You will be able to collect monitoring data that will allow you to better assess what exactly do you need to do with your house in order to improve its thermal behavior.
So there, pick your poison.

(Idea credit: DC)

Tuesday, November 17, 2009

DZ NextGen Seeded: Home Climate Control

If you set your goals ridiculously high and it’s a failure, you will fail above everyone else’s success.

-- James Cameron, director of Terminator and Titanic, from The New Yorker

From the very beginning, one of DZ's goals was to make temperature zoning solutions accessible to the general population. That never happened. One of the reasons for that is that the niche it occupied is very narrow, and people don't even look into the dusty corner of the Web where the opening to this niche is.

#1 on search for temperature zoning, you say? So what, they say? Who cares?

And they're right, for in order to be looking into this niche you will have to have already investigated quite a bit, and already know words "zoning", and "hvac", and that's not what was supposed to happen. The person in need was supposed to find this project right away, and be able to use it right away.

That didn't happen, either. When you ask a geek for a result, you get a result only a geek can use.

So the next crusade, starting today, is to fix these two things: first, make this project easier to find, second, make it actually usable to people that have nothing but money in the pocket, and not too much money by that, either. Rich or poor, everyone deserves to live in comfort, and let's try to make that happen.

Here comes, http://homeclimatecontrol.com/.

Not much there now, but it takes time to build everything. Stay tuned.

Monday, November 16, 2009

DZ 3.1 "Passive" Release Is Out

CHANGES since 3.0-INSTRUMENTATION
  • Integrated Servomaster again (see dz3-servomaster module);
  • Passive Mode operation is possible again after a long while;
  • Another round of 1-Wire driver code refactoring, streamlined bus operation, fixed several race conditions;
  • Replaced hardcoded RxTx dependency with the reference to Maven Central Repository.
Unlike last time, there are no instructions to configure servo controllers along with the rest of the system, it is not possible to run it without detailed understanding of how to configure the whole system. However, this blog contains more than enough information on that - under /label/configuration. If this turns out to be insufficient, join the mailing list and start asking questions.

NEXT RELEASE

3.2-BAREBONES, for real this time. I hope. As soon as that relay board makes it here.

Servomaster 0.8.2 released

This is a maintenance update for 0.8.1.

CHANGES

  • servomaster-serial: now uses RxTx dependency available from Maven Central Repository, you don't have to manually install it (though you do have to take care of platform libraries, that'll come later);
  • servomaster-usb: now allows Phidget Quad Servo to be instantiated by Spring Framework (DZ3 dz-servomaster requires it).
DOWNLOADS

Available from SourceForge and Google Code.

Saturday, November 14, 2009

DZ3 FAQ: My servos growl and jump!

Q: I've used R/C servos to control my registers/dampers, just as you said, together with controllers that you told me to, but the servos growl even when they don't move!

A: Three causes are possible (ordered by probability):

  • Power is insufficient at the register/damper location, wiring is too weak. Run a 16 gauge speaker wire to it, and put a 470μF electrolytic capacitor from ground to power at each servo, this worked for me.
  • Register/damper is too tight for the servo you used. Either loosen it up mechanically and lubricate well, or use a higher torque servo.
  • Servo is getting old. Old setup I used to run 2001 to 2003 had no problems, but the same servos I used back then growl today, even though they haven't been used for last five years.
Q: Servos are jerking and generally misbehaving, why?

A: Control signal is too weak, servo doesn't recognize it as such anymore. Google up a "servo booster" (there are too many around to recommend anything specific) and install it at servo.

DZ3 Configuration: 1-Wire Sensors

Being too excited about the fact that OWAPI code started working again, I forgot to mention how to configure it for use with not just loggers, but to actually do something useful. Here:

<bean id="device_factory"
class="net.sf.dz3.device.sensor.impl.onewire.DeviceFactory"
init-method="start">
<constructor-arg index="0" value="/dev/ttyUSB0"/>
<constructor-arg index="1" value="regular"/>
</bean>

<bean id="temperature_sensor-6500000055FF1A26"
factory-bean="device_factory"
factory-method="getTemperatureSensor">
<constructor-arg value="6500000055FF1A26"/>
</bean>

The temperature_sensor-6500000055FF1A26 bean can be used in further configuration as usual.

NOTE: If you're inclined to fiddle with configuration before the GUI configurator is out, you might just as well get familiar with Spring Framework, if you aren't already. A powerful tool. All you need for now is the IoC container configuration.

Thursday, November 12, 2009

"Passive Mode": Early Access

As of now, Phidget Quad Servo controller is happily shuffling a servo on my desk, controlled by the code that you can get from Subversion trunk. This is what you have to add to the configuration in order to enable it:

    <bean id="damper_factory" class="net.sf.dz3.device.actuator.servomaster.DamperFactory">
<constructor-arg index="0" value="net.sf.servomaster.device.impl.usb.phidget.QuadServoController"/>
<constructor-arg index="1" value="00515"/>
</bean>

<bean id="damper-quad_servo0"
factory-bean="damper_factory"
factory-method="getDamper">
<constructor-arg index="0" value="USB Bus Powered Servo"/>
<constructor-arg index="1" value="0"/>
</bean>

Other servo controllers will be supported as well. Please answer the poll questions (on your right) to let me know which drivers I have to take care of first.

As of right now, DZ3 is completely capable of supporting the passive mode. I'm not going to release the code just yet, until all prerequisites for Barebones are satisfied.

Next Release: Barebones

WHAT'S IN?

Essential things that didn't make it into Instrumentation release, namely:

  1. Servo controller integration (see Servomaster);
  2. 1-Wire switch based HVAC driver.
This release will allow to run the complete system (including HVAC unit control) with single mode operation (either heating or cooling), no schedule, and no GUI (thermostat setpoints controlled via JMX).

WHEN?

I expect the code to be finished within a week - servo controller first (so the whole system can be run in passive mode), then HVAC driver.

However, I'm yet to acquire a relay board (all I have now is raw DS2406 switches driving LEDs), so some tweaking may occur afterwords, when it is actually connected - besides, it's not a good time to conduct real life experiments at my location now, there is no heating nor cooling required until, I believe, middle of December.

UPDATE (2009/11/12): 8 channel I/O 8 relay board is in the mail.
UPDATE (2009/11/16): I lied. Next release is 3.1-PASSIVE.

DZ3 Instrumentation Release is out

Don't forget to read release notes.

DZ3 Instrumentation Release: Tagged in Subversion

Source is ready for consumption, available from Subversion repository with the root being https://diy-zoning.svn.sourceforge.net/svnroot/diy-zoning/tags/3.0-INSTRUMENTATION.

Packed archive will be available for download shortly.

Please check the release notes.

UPDATE: released.

Wednesday, November 11, 2009

DZ3 Instrumentation Release: What's In, What's Not

Any large working system has inevitably evolved from a small working system.

-- Source lost in time

WHAT'S IN
  • 1-Wire Sensors. Temperature and humidity for now;
  • Shell Sensor. If you can extract information from your hardware via shell script, this is what you use to make it available to DZ;
  • Thermostat;
  • Zone Controller;
  • HVAC Unit abstraction;
  • Damper Controller for bang-bang dampers;
  • Damper Controller for modulating dampers;
  • Complete data logging for every measurement point in between, including hysteresis and PID controllers inside of thermostat;
  • JMX instrumentation (quite comprehensive) and control (limited for now).
WHAT'S NOT

Unfortunately, some essential stuff -
  • Servo controller integration;
  • HVAC Unit driver;
  • GUI;
  • Scheduler
And some not so essential -
  • DAC & Core talking over TCP;
  • Obviously, sensor discovery over LAN;
  • xAP, xPL loggers (try, they most probably work, but I haven't checked).
Reason for this is that I wanted to clean up issues accumulated over years, and make sure that the system is completely transparent, can be monitored, and bugs can be seen visually (and most of them are). So the net result of this effort, so far, is a working stable system with no actual outputs (other than data loggers). You can watch it, but you can't touch it.

SO HOW IS IT USEFUL?

Well, if you've never had DZ installed because it was too complex to install and configure, the day of Instrumentation Release is your lucky day. What is already done is a turnkey acceptance of all the sensor network with no configuration beyond 1-Wire adapter port name necessary. Hang the sensors on the wall, start DZ3 and watch your house's thermal behavior in gory details.

If you do already have some variant of DZ installed and connected to actuators, then hold off for a short while, the good stuff is coming.

WHAT'S NEXT?

Exactly what is missing from this release:
  • Servo controller integration;
  • HVAC Unit driver;
  • JMX instrumentation allowing to actually control the thermostat setpoints.
GUI and scheduler ports are still on a back burner for now, the priority is a stable and working system, not a nice looking system.

UPDATE: released.

Tuesday, November 10, 2009

DZ3 Instrumentation Release: Early Access

1-Wire sensor access works in the Subversion code, go for trunk/dz3-master directory tree.

Here's a simple configuration file to have a turnkey logger for all of your existing 1-Wire sensor network, with JMX instrumentation to boot:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<bean id="device_factory" class="net.sf.dz3.device.sensor.impl.onewire.DeviceFactory" init-method="start">
<constructor-arg index="0" value="/dev/ttyUSB0"/>
<constructor-arg index="1" value="regular"/>
</bean>

<!-- Loggers -->
<bean id="rrdtool" class="java.io.File">
<constructor-arg type="java.lang.String" value="/usr/bin/rrdtool"/>
</bean>
<bean id="rrdbase_onewire" class="java.io.File">
<constructor-arg type="java.lang.String" value="./rrd-onewire"/>
</bean>
<bean id="rrdlogger_onewire" class="net.sf.jukebox.datastream.logger.impl.rrd.RrdLogger" init-method="start">
<constructor-arg index="0" type="java.util.Set">
<set>
<ref bean="device_factory"/>
</set>
</constructor-arg>
<constructor-arg index="1" type="java.io.File" ref="rrdbase_onewire"/>
<constructor-arg index="2" type="java.io.File" ref="rrdtool"/>
</bean>

<!-- JMX configuration -->
<bean id="jmx-wrapper" class="net.sf.jukebox.jmx.JmxWrapper">
<constructor-arg index="0" type="java.util.Set">
<set>
<ref bean="device_factory"/>
</set>
</constructor-arg>
</bean>
</beans>

Just watch the paths, that's all.

Instrumentation Release itself will be finalized either late tonight, or tomorrow. The difference between now and then is that the path from DeviceFactory to TemperatureSensor is currently broken. The rest of the system (if configured) will work, except for the actual physical control - actuators haven't been ported yet.

UPDATE: release source is tagged in Subversion. The path in question has been created, obviously.

Jukebox 6.0 is out

The venerable Jukebox just had a major uplift, 6.0.

WHERE TO GET IT

WHAT'S NEW?

Lots.

Build: Maven based, at long last.

Configuration: self-aware object model is being eventually retired in favor of dependency injection (I know this is long overdue, but hey, how often Jukebox is released? Projects based on it usually just work and don't require uplifts). Jukebox entities are now mostly Spring ready.

jukebox-datastream: Pulled in from DIY Zoning, it has become way too common to afford to keep it contained there. Works with any kind of signal now.

jukebox-jmx: All you have to do in order to expose a method for JMX instrumentation now is to add a @JmxAttribute annotation. Works just like JavaBeans, on both accessor and mutator methods. Word of warning, this is based on JDK 1.6 JMX, not JDK 1.5 JMX - it will not work there. And oh, by the way, you can use it independently from the rest of Jukebox.

jukebox-fsm: Implementation of a Finite State Machine based on generics. 'nuff said.

The rest of Jukebox hasn't changed much, except for rigorous JDK 1.6 compliance uplift and testing.

DZ3 FAQ: Tests break on my system!

DZ3 tests at this point may often be host specific and work only on the host DZ3 is being developed on. If a specific test breaks on your box, you have two options:

  • Modify the test to fit your system. The problem is often caused a different path (for example, /dev/ttyS0 instead of /dev/ttyUSB0). If it is bigger than that, simply removing the test will help.
  • Skip tests altogether by running mvn install -Dmaven.test.skip instead of mvn install.
If you think the test shouldn't break, please send me the diff(1), if any, between the original test and yours, and output from the test run, so I can investigate your problem and fix it.

Monday, November 9, 2009

Servomaster 0.8.1 released

This is a bugfix release for 0.8-UNDEAD.

CHANGES

DOWNLOADS

Available from SourceForge and Google Code.

Sunday, November 8, 2009

OWAPI Refactoring, Round 2

I've done it once already. Haven't seen the code for a while, and when I looked at it again, I didn't like what I saw.

This is not going to be a lengthy process, just a quick walkthrough with a primary purpose to bring the OWAPI code base up to DZ3 coding standards.

DZ2 code base used OWAPI 1.00 as a base, and this is exactly what is being refactored further. Since that time, a new release came out, OWAPI 1.10. It doesn't look like changes between 1.00 and 1.10 are significant as far as DZ is concerned, and don't really care at this time, for there are reasons that look tangible enough to me:

  • Primary goal at this time is to release the complete working installation of DZ3 as soon as possible;
  • It looks like enthusiasm for 1-Wire sensor networks is dwinding;
  • OWPAI 1.10 still doesn't support the 1-Wire USB Adapter under Linux, and my workstation already doesn't have a serial port;
  • New sensor networ standards are coming out, and 1-Wire is just one of them.
If it turns out that there's a significant demand for features offered by OWAPI 1.10, well, there's always a diff(1) and patch(1).

Saturday, November 7, 2009

Bump: Green Dryer

There's been a comment on Green Dryer post that y'all might like:

You can find a nice version of this along with a custom base that raises the height of the dryer at:

http://www.heat-helper.com/
Thanks, Owen. Good timing, too - winter is coming.

First thing I would be concerned about before you reach for your wallet, though, is the smell that will get in if you're using scented sheets in your dryer. It is not really noticeable inside of the house, but I can tell you that if you walk down the street when someone's dryer is working, you can smell it from over a hundred feet away.

An easy test for that would be to move your drier away from the wall, disconnect the air hose and turn it on like you usually do - you'll know right away whether you'd be willing to tolerate that smell in the house or not.

Another consideration is that there will be some heat dissipation that you don't need during hot summer months. Relatively easy to deal with - it's not that big of a deal to reach behind the dryer and reconnect the hose directly to the dryer vent, especially keeping in mind that you have to clean that space couple of times a year anyway.

If that's the case, though, then I wonder why not just simply disconnect the hose from the dryer and let it be.

And, last but not least, the amount of lint and debris that comes out of the dryer is significant even with the stock dryer filter in place and cleaned before each run - if you're allergic, you might think twice about directing exhaust air into the house.

Tuesday, November 3, 2009

Servomaster 0.8-UNDEAD released

Fighting software rot is a difficult business.

To make DZ3 operational, Servomaster uplift was necessary.

CHANGES

  • Accommodated a less painful build tool (the project is now Maven2 compliant, like the rest of DZ3 and its dependencies);
  • Split the project into three parts: abstractions (servomaster-common), serial (servomaster-serial) and USB (servomaster-usb). Serial and USB packages require the common package to build, but are independent from each other;
  • Replaced ugly System.*.println with log4j (been done elsewhere long time ago, but wasn't really necessary in Servomaster because it just worked);
  • Package names are now net.sf.servomaster.*, for consistency, and to ensure the break away from the old code base.
HOW TO MAKE IT WORK

Get the necessary modules from the Subversion repository.

servomaster-common requires zero involvement (other than having Maven, or, even better, Eclipse Galileo installed).

For servomaster-serial you'll need RxTx 2.1.7. RxTx used to be a pain point, but right now (on Ubuntu 9.04 and 9.10) it's a matter of executing
sudo apt-get install librxtx-java
and you're good to go (POM file points where the library is).

I didn't get my hands on installing this part on Fedora yet, will update this page as soon as I do (by the way, your feedback is welcome).

For servomaster-usb, you'll need javax.usb. Roles flipped, now this is the pain point - there's no automated way to get it installed, get to the site and follow instructions. However, instructons are more or less painless, and once you get it there, it won't require much interaction. Make sure you match te POM file content with actual jar file name - JSR80 jar file is the only one you need to build, but you'll need all three to make it work.

Sunday, November 1, 2009

DZ3: JMX Instrumentation and Control

If you update the DZ runner shell script to its current form (just add -Dcom.sun.management.jmxremote to Java command line), you can use JConsole to monitor and control DZ3. This is what it looks like (click to enlarge):

DZ3 JMX

And this is how to make it happen (see previous examples for context):

<!-- JMX configuration -->
<bean id="jmx-wrapper" class="net.sf.jukebox.jmx.JmxWrapper">
<constructor-arg index="0" type="java.util.Set">
<set>
<ref bean="temperature_sensor-6EE055000000"/>
<ref bean="temperature_sensor-cpu1"/>
<ref bean="temperature_sensor-cpu2"/>
<ref bean="temperature_sensor-mobo"/>
<ref bean="temperature_sensor-sda"/>
<ref bean="temperature_sensor-sdb"/>

<ref bean="rrdlogger_sensors"/>
<ref bean="rrdlogger_thermostats"/>
<ref bean="rrdlogger_dampers"/>
</set>
</constructor-arg>
</bean>

Not all entities are JMX enabled at this time. Adding one to the configuration won't do any harm, but you'll get a warning message in the log.

It's worth mentioning that you need to add DZ3 classes to JConsole's classpath in order to get complex entities like DataSample<Double> rendered by JConsole, like this:
${JAVA_HOME}/bin/jconsole \
-J-Djava.class.path=${JAVA_HOME}/lib/jconsole.jar:\
${JAVA_HOME}/lib/tools.jar:$CLASSPATH
where CLASSPATH is the same that is used in DZ3 Runner.

The recommended value of I...

...is 0.0000002.

Don't ask.

You'll know what it is about when you get to it.