tag:blogger.com,1999:blog-129133582024-03-13T17:51:50.823-07:00PRNG: Pseudo Random Noise GeneratorJust making noise.Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.comBlogger64125tag:blogger.com,1999:blog-12913358.post-44465323482217564612020-02-01T00:26:00.000-08:002020-02-01T00:27:21.073-08:00HOWTO: Environment Sensors in the Home<span style="font-size: x-small;"><i>[ it has been a while since I had something to write about; this is something I feel can help others ]</i></span><br />
<br />
We have a large aquarium at home, and last year a leak occurred in one of the pumps in the equipment space below. Water overflow the catch-bucket and flowed into our walls. We ended up with some water damage. Never fun.<br />
<br />
I recall a friend of mine had a pipe leak in his condo, while he was out of town. The management company called him about the water flowing out from under his door. He signed into his in-condo camera system and saw a "shimmer" on the floor -- completely covered with water. Checking his NetAtmo device, he saw (belatedly) the jump in humidity within his condo. That humidity jump gave me an idea that I should monitor the humidity in the aquarium equipment space, and alert us when it got "too high".<br />
<br />
While I could put together something with the DHT22 sensors that I have laying around, I wanted something more turnkey. This post will describe the overall system that I assembled, using mostly off-the-shelf, and one small service that I wrote. These were installed onto an Ubuntu 16.04 server in my house, and should work on any Unix-ish server (I don't know the portability of the components to Windows).<br />
<br />
In short, the major components:<br />
<br />
<ul>
<li><a href="https://tehybug.com/">TeHyBug</a> sensor</li>
<li>MQTT broker (<a href="https://mosquitto.org/">mosquitto</a>)</li>
<li>Time-series database (<a href="https://www.influxdata.com/products/influxdb-overview/">InfluxDB</a>)</li>
<li>My <a href="https://gstein.svn.beanstalkapp.com/oss/trunk/homesvr/bridge/">"bridge" code</a> to move data from the broker into InfluxDB</li>
<li><a href="https://grafana.com/">Grafana</a> to visualize and alert, based on the data in InfluxDB</li>
</ul>
<br />
<h3>
TeHyBug Sensor</h3>
I bought the <a href="https://www.tindie.com/products/gumslone/tehybug-mini-wifi-temperature-and-humidity-logger-2/">TeHyBug Mini</a>, but Oleg makes a <a href="https://www.tindie.com/stores/gumslone/items/">variety of sensors</a> based on what environmental measurements you want to make, and whether your application will be indoor or outdoor. These are small devices powered by battery, or by a standard USB charger. There are a variety of options that you can select, and shipped from Germany to Texas in a single week. A friend has emailed Oleg, and reports that he is quite responsive and helpful.<br />
<br />
In "configuration mode", the TeHyBug presents a nice web interface with all the configuration options. It supports several mechanisms to report environment data, and I configured it to send its data via MQTT to my server. I was able to specify the format of the payload, enabling me to keep it tight, and easy to parse. I only have a single sensor, but I can imagine needing to get a bit more general if you load up on a large variety of sensors and applications.<br />
<br />
<h3>
Mosquitto MQTT Broker</h3>
This is a simple pub/sub system. Data arrives from the TeHyBug to a particular "topic", and delivered to all connected clients that are subscribed. There isn't much to do here, except install the software.<br />
<br />
<h3>
InfluxDB</h3>
This is a high-performance, hugely-scalable time-series database. The website says it can intake millions of samples per second. Yikes. Total overkill for my needs, but it has a simple Python API (see below), and the Grafana frontend knows how to connect to it. Turnkey.<br />
<br />
I ended up having to create a username/password because Grafana requires such. Before I started the Grafana setup, I was able to place the MQTT data right into InfluxDB without needing to specify a user. So, just go ahead and create one (I used the Python API to do it; there is a command-line tool for doing stuff like this, but I never installed it).<br />
<br />
<h3>
Bridge Service</h3>
This is where I needed to dig in further. Data arrives at the mosquitto MQTT broker, and goes nowhere. There must be a client subscribed to the topic, for the data to move any further. It looks like "Telegraf" may be a package to move samples from MQTT into InfluxDB, but that seemed very complicated.<br />
<br />
There were a couple Python examples that I found, to move samples, but I didn't like them. I wanted a configuration file, I wanted it to run as a service, and I needed to handle my specific data and InfluxDB measurement samples/format.<br />
<br />
The resulting code for the bridge is located in my <a href="https://gstein.svn.beanstalkapp.com/oss/trunk/homesvr/bridge/">OSS repository</a>. It includes a systemd service file, and an example config file. It simply hangs around, waiting for samples to arrive, and shoves them into InfluxDB. Easy peasy.<br />
<br />
<h3>
Grafana</h3>
This part was quite a bit more complicated. There is a Grafana package within the Ubuntu 16.04 package repository. That was my mistake. <i>Way</i> too old. I switched to use the grafana.com package repository, and installed the stable version from that. Attaching it to InfluxDB was easy, once I did that.<br />
<br />
Then I wrestled with configuring a dashboard, but that's just user education. After reading some documentation, and some Q&A on the web, I was able to get the graph I wanted:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJO6M7Hr1rKh4JlKQS1pQnelHspoNnM0_BVGY-JgsaOjs7iWQc8d7afv1wwjqClpt8tpFQg1Cb1p6REWWVsj_isXhiK9sgXiEZJz-EEdrGxwx-Hve1rZKjkCYpnWpbJ8x0RYXNgg/s1600/Screenshot+2020-02-01+at+02.10.50.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="433" data-original-width="913" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJO6M7Hr1rKh4JlKQS1pQnelHspoNnM0_BVGY-JgsaOjs7iWQc8d7afv1wwjqClpt8tpFQg1Cb1p6REWWVsj_isXhiK9sgXiEZJz-EEdrGxwx-Hve1rZKjkCYpnWpbJ8x0RYXNgg/s320/Screenshot+2020-02-01+at+02.10.50.png" width="320" /></a></div>
<br />
My next step is to hook up an alert on the Humidity, and it looks like Grafana has plenty of options.<br />
<br />
---<br />
<br />
I hope this helps. The TeHyBug is an affordable, turnkey solution. But you can imagine data from many IoT devices, such as an Arduino, an RPi, a Particle device, and others. Each of these delivering data to the MQTT broker. The rest of the solution would be the same from there, with minor tweaks in the Bridge to deal with parsing the MQTT payloads.<br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com3tag:blogger.com,1999:blog-12913358.post-91844170170892970612016-11-19T21:25:00.000-08:002016-12-20T21:12:37.465-08:00PSA: Redbud Custom HomesMost of my recent posts have been technology-related, but for this ... I'm throwing back to something a bit more personal. This is a Public Service Announcement (PSA) to provide my opinion (and my wife's) on the Austin-area builder named Redbud Custom Homes (and its owner Michael Alwan). In short: we think they suck more horribly than any other business that we've ever interacted with.<br />
<br />
On their since-deleted Facebook business page, I wrote my thoughts:<br />
<blockquote class="tr_bq">
<blockquote class="tr_bq">
Completely unprofessional. Poor communications, poor scheduling, poor follow-through, incomplete work, requires nagging, ... on and on. Michael is personable, but (IMO) does not have the skills to run a business and to *follow through* on completing the home we contracted him to build.</blockquote>
<blockquote class="tr_bq">
I have countless stories of failure, so I don't even know where to start. Ask a question if you're actually considering working with Redbud. I'll provide my own experience.</blockquote>
</blockquote>
My wife has also written a series of Facebook posts about our problems, detailing her opinions on the matter:<br />
<br />
<ul>
<li><a href="https://www.facebook.com/marla.stein.58/posts/1043447795802140">BBB rating drops to C+</a></li>
<li><a href="https://www.facebook.com/photo.php?fbid=1038504956296424&set=a.167573700056225.58837.100004107884795&type=3&theater">Second photo of construction trash</a></li>
<li><a href="https://www.facebook.com/photo.php?fbid=1021346398012280&set=a.314643912015869.1073741826.100004107884795&type=3">A subcontractor files an affidavit for Redbud non-payment</a></li>
<li><a href="https://www.facebook.com/photo.php?fbid=1014867648660155&set=a.167573700056225.58837.100004107884795&type=3">Photo of construction trash</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/1012710928875827">Non-working balcony fireplace</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/1011252282355025">Trying to shift job management to us, after a bit of social media shaming</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/1009802752499978">Fed up: filed BBB and Texas Attorney General complaints</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/835692283244360">Another planting season missed, and no fireplaces</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/797340567079532">Eyesore of an unfinished yard</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/794764500670472">How hard are cabinet handles?</a></li>
<li><a href="https://www.facebook.com/marla.stein.58/posts/793620417451547">Over two years ... still unfinished</a></li>
</ul>
<div>
She has prepared a long review for Houzz (unpublished, at this time), but the abbreviated <a href="https://www.yelp.com/biz/redbud-custom-homes-austin?hrid=HNIY1QNKaawo0ekujvgMWQ&utm_campaign=www_review_share_popup&utm_medium=copy_link&utm_source=(direct)"><b>review on Yelp</b></a> still provides a lot of material for reading.<br />
<br />
The anger and frustration that we feel is only partly described by the above posts. After over a year of neglect, we filed a complaint with the Better Business Bureau; it is now <a href="https://www.bbb.org/central-texas/business-reviews/home-builders/redbud-custom-homes-inc-in-west-lake-hls-tx-1000100541/reviews-and-complaints">published on their website</a>. A small thing, but symbolic of the overall failure to execute.</div>
<div>
<br /></div>
<div>
If you are thinking about contracting with Redbud Custom Homes, then please read our thoughts to help form your own opinion.</div>
<div>
<br /></div>
<div>
I hope this PSA saves somebody from similar pain in the future. Good luck.</div>
<div>
<br />
---<br />
<i><span style="font-size: x-small;">Updated 12/15/2016: added a couple more links, some labels, BBB complaint, and noted owner/proprietor as Michael Alwan</span></i><br />
<i><span style="font-size: x-small;">Updated 12/20/2016: link to Yelp review</span></i><br />
<i><span style="font-size: x-small;"><br /></span></i></div>
Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0Austin, TX, USA30.267153 -97.74306079999996729.828484 -98.388507799999971 30.705822 -97.097613799999962tag:blogger.com,1999:blog-12913358.post-7269108625720248672015-10-07T17:07:00.000-07:002015-10-07T17:07:06.556-07:00Value of ASF ProjectsMatt Asay wrote an <a href="http://readwrite.com/2015/10/01/open-source-code-value">interesting piece</a> last week, that took a rough stab at the "worth" of Open Source code under the care of the Linux Foundation. All the right caveats are there, of course: this isn't really the "worth" of the code, but an approximate cost in developer-years to produce that many lines of code. Fair enough, but when the number that pops out is <b>$5 billion</b>, that says something awesome. No matter how you may want to fiddle with the methodology, there are very few companies on the planet that can or have produced that much code.<br />
<br />
Then he threw out the question: does the code under the umbrella of the Apache Software Foundation have that beat? It made me curious ...<br />
<br />
I went to <a href="http://www.openhub.net/">OpenHub</a> and got its list of 340 Apache projects. For each project, I fetched the "lines of code" dataset used to produce a project's chart of LOC over time. After some edge case rejects, I had LOC for 332 projects at Apache, that OpenHub knows about. The result?<br />
<br />
The ASF represents 177,229,680 lines of code, compared to Linux Foundation's 115 million.<br />
<br />
So yes, by this crude measure, the ASF is "worth" something like <b>$7.5 billion</b>.<br />
<br />
Talk amongst yourselves...<br />
<br />
<span style="font-size: x-small;"><i>(obviously, I didn't use Wheeler's COCOMO model, but how far off could the value be on such a large/varied dataset? I think it's also interesting that the ASF provides a space for all this to happen with a budget of <b>only</b> about $1 million a year)</i></span><br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-26491680840436423472015-09-20T02:41:00.001-07:002015-09-20T02:41:50.575-07:00GPASM object filesAs part of the work on my home automation system, I've been doing a lot of assembly programming for the PIC16F688. That is my chosen microcontroller for all the various embedded systems around the house.<br />
<br />
One of the particular issues that I've run into, is that I've divided the code into modules (like a good little boy). The <a href="http://gputils.sourceforge.net/" target="_blank">gputils</a> toolchain supports separate compilation, relocatable code, and linking. SWEET! But this is <b>assembly</b> code. I can't instantiate the I2C slave or master code for a particular pair of pins on the '688. There are tight timing loops, so the code must directly reference the correct port and pin (as opposed to variably-defined values).<br />
<br />
One of my control boards talks to <b>TWO</b> I2C busses, and can operate as both slave and master on both busses. Since I must directly reference the port/pin, this means that I need separate compilations of the assembly code for each bus. And then I run into the problem: symbol conflict.<br />
<br />
My solution is to <i>rewrite</i> symbols within the library modules for each bus instantiation. So the "start" function for the I2C master (<span style="font-family: Courier New, Courier, monospace;">I2C_M_start</span> in the library's object file) is rewritten to <span style="font-family: Courier New, Courier, monospace;">HOUSE_I2C_M_start</span> and <span style="font-family: Courier New, Courier, monospace;">LOCAL_I2C_M_start</span>.<br />
<br />
This works out really well, though I just ran into a problem where one library refers to another library. Not only do I need to rewrite the entrypoint symbols, but also the external reference symbols.<br />
<br />
All of this rewriting is done with some Python code. The object files are <a href="https://en.wikipedia.org/wiki/COFF" target="_blank">COFF files</a>, so I wrote a <a href="https://gstein.svn.beanstalkapp.com/oss/trunk/pic/bin/coff_file.py" target="_blank">minimalist library</a> to work with GPASM's object files (rather than generic COFF files). Using that library, I have a <a href="https://gstein.svn.beanstalkapp.com/oss/trunk/pic/bin/picprefix.py" target="_blank">support script</a> to add prefixes like <span style="font-family: Courier New, Courier, monospace;">HOUSE_</span> or <span style="font-family: Courier New, Courier, monospace;">LOCAL_</span>.<br />
<br />
Here are my support scripts:<br />
<br />
<ul>
<li><a href="https://gstein.svn.beanstalkapp.com/oss/trunk/pic/bin/coff_file.py">coff_file.py</a></li>
<li><a href="https://gstein.svn.beanstalkapp.com/oss/trunk/pic/bin/picprefix.py">picprefix.py</a></li>
<li><a href="https://gstein.svn.beanstalkapp.com/oss/trunk/pic/bin/picnm.py">picnm.py</a></li>
</ul>
<br />
<ul></ul>
If you're dealing with PIC object files, then maybe the above scripts will be helpful.<br />
<br />
As an aside, I find it rather amusing to go back to assembly programming days, yet find myself still enmeshed within libraries, object files, and linkers.<br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com1tag:blogger.com,1999:blog-12913358.post-53547479946682048762015-08-22T20:20:00.000-07:002015-09-20T11:07:02.479-07:00My Google Code projects have movedBack in March, Google announced that the <a href="http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html" target="_blank">project hosting service on Google Code was shutting down</a>. I wrote a post about <a href="http://prng.blogspot.com/2015/03/sigh-google-code-project-hosting.html" target="_blank">why/how we started the service</a>. ... But that closure time has arrived.<br />
<br />
There are four projects on Google Code that I work on. Here is the disposition of each one:<br />
<dl>
<dt>serf</dt>
<dd>This has become <a href="http://serf.apache.org/" target="_blank">Apache Serf</a>, under the umbrella of the Apache Software Foundation. Justin and I started serf at Apache back in 2003. Two people are not sufficient for an Apache community, so we moved the project out of the ASF. We had a temporary location, but moved it to Google Code's project hosting at the service's launch, where it has resided for almost 10 years. The project now has a good community and is returning to its original home.</dd><dd>(link to: <a href="https://code.google.com/p/serf/" target="_blank">old project site</a>)</dd><dd><br /></dd>
<dt>pocore</dt>
<dd>This is a portability library that I started, as a tighter replacement for <a href="http://apr.apache.org/" target="_blank">APR</a>. Haven't worked on it lately, but will get back to it, as I believe it is an interesting and needed library. I've <a href="https://github.com/gstein/pocore" target="_blank">moved it to GitHub</a>.
<br />
<br /></dd>
<dt>ezt</dt>
<dd>This is a very old, very simple yet capable, and mature templating library that I wrote for Python. It is used in many places due to its simplicity and speed. Also <a href="https://github.com/gstein/ezt" target="_blank">moved to GitHub</a>.
<br />
<br /></dd>
<dt>gstein</dt>
<dd>This is my personal repository for random non-project work. I open source everything, even if it might not be packaged perfectly for use. Somebody might find utility in a block of code, so I keep it all open. The code in this repository isn't part of a team effort, so I'm not interested in the tooling over at GitHub. I just want an svn repository to keep history, and to keep it offsite. For this repository, I've chosen <a href="http://beanstalkapp.com/" target="_blank">Wildbit's beanstalk</a>, and the repository has been <a href="https://gstein.svn.beanstalkapp.com/oss/" target="_blank">published/opened</a>.</dd><dd>(link to: <a href="https://code.google.com/p/gstein/" target="_blank">old project site</a>)</dd>
</dl>
<div>
I'm sad to see Google Code go away, and I don't consider the above movements ideal. But it's the best I've got right now. Flow with the times...<br />
<br /></div>
Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-46154753988141589202015-03-14T03:33:00.000-07:002015-03-14T03:33:28.331-07:00Sigh. Google Code project hosting closing down<div class="tr_bq">
Google has just let us know that <a href="http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html" target="_blank">Google Code's project hosting will be shutting down</a>.</div>
<br />
On a story over on Ars Technica, there were a lot of misconceptions about why Google chose to provide project hosting. I posted a long comment there, but want to repeat that here for posterity:<br />
<br />
<blockquote>
As the Engineering Manager behind Google's project hosting's launch, I think some clarifications need to be made here. </blockquote>
<blockquote>
In early 2005, SourceForge was not well-maintained, it was hard to use, and it was the <b>only</b> large hosting site available. Chris and I posed the following question, "<i>what would happen if SourceForge went dark tomorrow</i>". … F/OSS apocalypse. SF would take 10's of thousands of projects down with it. This wasn't too far-fetched, given the funding and team assigned to SourceForge.net at the time. Chris and I explored possibilities: provide Google operational support, machines, or just offer to buy it outright. … Our evaluation was: we didn't need to acquire SourceForge. We just needed to provide an <b>alternative</b>. Provide the community with another basket for their eggs. </blockquote>
<blockquote>
Myself and three highly-talented engineers put together the project hosting from summer 2005, to its launch at OSCON in July 2006. We let SourceForge know late 2005 what we were doing, and they <b>added</b> staff. We couldn't have been happier! … we never set out to kill them. Just to provide safety against a potential catastrophic situation for the F/OSS community. </blockquote>
<blockquote>
Did GitHub provide a better tool? I think so. But recall: that is their <b>business</b>. Google's interest was caretaking for the F/OSS community (much the same as the Google Summer of Code). The project hosting did that for TEN YEARS. </blockquote>
<blockquote>
I'm biased, but call that a success. </blockquote>
<blockquote>
There are many more hosting options today, compared to what the F/OSS ecosystem was dealing with in 2005 and 2006. I'm <b>very</b> sad to see it close down, but I can understand. Google contributes greatly to F/OSS, but what is the incremental value of their project hosting? Fantastic in 2006, but lower today. </blockquote>
<blockquote>
… I hope the above helps to explain where/how Google Code's project hosting came about.</blockquote>
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com3tag:blogger.com,1999:blog-12913358.post-88973079162137630132015-01-15T03:35:00.002-08:002015-01-15T03:35:59.216-08:00DisappointingI've been reading Ars Technica for <b>years</b>. The bulk of what they do: I find awesome.<br />
<br />
A recent article used the phrase "Climate Denial" in its title. To me, in terms of the scientific method, there is no such thing as "denial", but simply "critical" or "questioning" or "not convinced". "Skeptical", if you will. All of these labels are fine, as they acknowledge that the hypothesis in question (AGW) is being tested. But "denial" has been used to shut down conversation, as if critical examination is no longer allowed.<br />
<br />
So I posted my thoughts, in the forum attached to that article, basically repeating the above.<br />
<br />
Ars Technica appears to have disliked my points about questioning. and that <a href="https://en.wikipedia.org/wiki/Falsifiability" target="_blank">falsifiability</a> is no longer applicable to AGW. So they <b>closed</b> my forum post, marking it as "<i>trolling</i>".<br />
<br />
The ridiculous thing is that somebody even replied to my post, pointing out <a href="https://en.wikipedia.org/wiki/Scientific_consensus" target="_blank">"scientific consensus"</a> on Wikipedia, yet that article specifically discusses that certain theories can never be <b>proven</b>. Only <b>disproven</b> (ref: falsifiability, above). So when you find a hypothesis in this pattern... the approach is to disprove.<br />
<br />
But nope. Ars Technica shut me down.<br />
<br />
I will still read you, Ars. I like your content. But when you shut down discussion? And call it <i>trolling</i>, despite some kind of rational basis, and an attempt at civil discussion?<br />
<br />
No. That is wrong, and I have lost respect for what you do.<br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com3tag:blogger.com,1999:blog-12913358.post-35568538014210479122014-10-05T18:56:00.000-07:002014-10-05T18:57:40.640-07:00Raspberry Pi and (lack of) I2C Repeated StartsJust spent several hours digging into a communication bug between my <a href="http://www.raspberrypi.org/" target="_blank">Raspberry Pi</a> and a <a href="https://www.sparkfun.com/">SparkFun</a> <a href="https://www.sparkfun.com/products/9695">MPR121 breakout board</a>. I found two core problems: the MPR121 requiring Repeated Starts in its I2C communication, and the RPi's BCM2835 not implementing them.<br />
<br />
<h3>
MPR121 Requires Repeated Starts</h3>
<div>
<br />
The MPR121 uses <a href="https://en.wikipedia.org/wiki/I%C2%B2C">I2C</a> to communicate with its host. There are over a hundred registers in the MPR121 that can be read. From a functional standpoint, it would look something like:</div>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><b>uint8 value = read_register(uint7 addr, uint8 which_reg)</b></span></blockquote>
<div>
On the I2C bus, the bits/frames look something like:</div>
<blockquote class="tr_bq">
<b>| Start | <i>addr</i>/W | <i>which</i> | R-Start | <i>addr</i>/R | <i>data</i> | Stop |</b></blockquote>
The Repeated Start allows the host to hold the bus during this "write which register we want, now read it" transaction. If a normal Stop-then-Start sequence was performed, then you have a time where the bus was released, allowing another I2C master to take control. That race condition could allow the other master to <i>change</i> the register-to-read. The original I2C master would then get bad data.<br />
<br />
The requirement for a Repeated Start is eminently sensible in a multi-master environment, although the MPR121 documentation does not call out this <b>requirement</b>. My own experimentation and a bit of Google action confirms this. Sensible, yes, but poorly documented. (Though I have to say: the MPR121 doc and application notes are overall <b>very</b> outstanding! Usually, I use their I2C timing diagrams rather than the formal I2C specification)<br />
<br />
It is also important to note that most environments are single-master, so a Repeated Start wouldn't be necessary, and the requirement is a potential burden upon the I2C master (compared to a standard write/read pair of operations).<br />
<br />
<h3>
BCM2835 Lack of Repeated Starts</h3>
<div>
<br />
My test code was using the Python "smbus" module to speak I2C to the MPR121 breakout. Everything was quite straight forward, and there are several tutorials and pages on the web to show you how to set up I2C on an RPi, and to use Python to control it.</div>
<div>
<br /></div>
<div>
But when I tried to read the "touched" results for the 10 pads (two bytes), I kept getting the same byte values. The first byte (in register 0x00) has the first eight pads, and the second byte (at 0x01) has the next four. But that second byte was always the same, and changed right along with the first byte as I touched various pads.</div>
<div>
<br /></div>
<div>
After thorough digging through code, trying alternative approaches, oscilloscope review of the I2C bus, etc, it became apparent that upon receiving a Stop condition, the MPR121 would reset the which-register value to 0x00. Thus, I'd tell the MPR121 "read from 0x01. Stop. give me the byte.", and it would always return the value from register 0x00.</div>
<div>
<br /></div>
<div>
After further investigation and reading: the BCM2835 does not implement Repeated Starts. There is no way for it to read from arbitrary registers of the MPR121. Some people have attempted gimmicks around the BCM2835's 10-bit addressing feature, but I'll avoid that.</div>
<div>
<br /></div>
<div>
However, you <i>can</i> read all the sensor data by reading two bytes, starting at register 0x00. I2C supports a block data transfer, so this is quite straightforward. In fact, the host doesn't ever have to say "start reading from 0x00" since that is the default. It can just issue a read for two bytes.</div>
<div>
<br /></div>
<div>
In order for an RPi to read arbitrary registers, it would be necessary to use "bit-banging" on the GPIO pins to manually run through the I2C protocol. Code out there exists, if this feature is needed.<br />
<br /></div>
<h3>
Summary</h3>
<div>
<br />
In my research, I found there are a number of I2C peripherals that <i>require</i> a Repeated Start. Presumably for transaction purposes (as noted above). Most work just fine with a Stop/Start pair, which will work in the typical single master environment.</div>
<div>
<br /></div>
<div>
In my home automation scenario, the host will (always?) be a PIC16F688 microcontroller running my own I2C master code. Needless to say, it will incorporate the Repeated Start capability.</div>
<div>
<br /></div>
<div>
Hopefully, my research will help your own use of an MPR121, or the I2C bus on a Raspberry Pi.</div>
<div>
<br /></div>
Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com3tag:blogger.com,1999:blog-12913358.post-80618649914238032322014-10-05T18:13:00.000-07:002014-10-05T18:13:00.255-07:00Capacitive Touch Sensors, revisited<a href="http://3.bp.blogspot.com/-po6WVSVtRCg/UmYjNN_-YJI/AAAAAAAAD4w/FC-rDSYY80E/s1600/boards.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-po6WVSVtRCg/UmYjNN_-YJI/AAAAAAAAD4w/FC-rDSYY80E/s1600/boards.jpg" height="320" width="240" /></a>Last year, I wrote about my plan to use <a href="http://prng.blogspot.com/2013/09/capacitive-sensing-wall-switches.html">capacitive touch sensors</a> in my house as "wall switches" rather than what you'd find in any sane person's house.<br />
<br />
I got my first batch of <a href="https://code.google.com/p/gstein/wiki/WallSwitch#Sensor_Board">sensor pad boards</a> a year ago, but never got around to actually writing a post about them. The rather poor picture to the right shows the pads and the ground-hatch on the back. You can even make out an Apache Subversion revision tag on the silk screen :-)<br />
<br />
It has a few problems, however: sizing is incorrect for our 1-gang electrical boxes, it is missing drill/mounting holes, and there are no cutouts so the backlighting can shine through. Whoops! When the new board is designed and back from production, then I'll get some good pictures posted.<br />
<br />
So why post now? It's been a year!! ... well, I finally got around to pairing this sucker up with <a href="https://www.sparkfun.com/" target="_blank">SparkFun'</a>s <a href="https://www.sparkfun.com/products/9695" target="_blank">MPR121 breakout board</a>. Connected that to a Raspberry Pi, and started Real Testing. I may have to tweak the pads and traces a bit for Rev2, but it is doing very well for the first iteration.<br />
<br />
The largest obstacle to getting this functioning with the MPR121 was failure to use its "Auto Config" feature. Once I let the chip figure out what the hell it is connected to... it worked like a dream.<br />
<br />
(see next post, re: problems talking to an MPR121 from a Raspberry Pi)Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-9371386439492562722014-08-15T01:09:00.000-07:002014-08-15T01:26:57.339-07:00API Endpoints for ArduinosAs part of my home automation system, I need to connect "high-level" systems (such as the primary Linux server) down into the underlying hardware systems around the house. The PIC16F688 microcontrollers that run those systems are <b>seriously</b> low-level. Thus, I've chosen to place all of them onto an I2C bus(*) driven by an Arduino. Why? ... the Arduino has enough capability to mount an Ethernet port on the "high" side, and has built-in I2C support for the "low" side. It is a great mapping device between the complex systems, and the hardware systems.<br />
<br />
With the hardware selected, and the wiring selected, it came down to protocol. How can that Linux server talk to the Arduino, as a proxy to the individual microcontroller critters splattered across the household? ... Naturally, HTTP was my first choice, as it allows all kinds of languages, libraries, and scripts to perform the work, and even some basic interaction via a full-on browser.<br />
<br />
Digging into HTTP servers for the Arduino... Ugh. The landscape is very disappointing. Much of the code is poorly engineered, or the code is designed for serving <b>web pages</b>. During my search, I ran into a colleague's <a href="https://github.com/ovidiucp/TinyWebServer" target="_blank">TinyWebServer</a>. I'd call it the best out there for web serving (well-designed and well-coded), but is still overpowered for my purpose: mapping a protocol down to simple hardware interactions.<br />
<br />
As a result, I designed a <a href="http://goo.gl/O5GJ3g" target="_blank">small library</a> to construct a simple API endpoint on the Arduino. The application can register dozens of endpoints to process different types of client requests (62 endpoints are easy, more if you want to seek out the critical edges of allowed-characters in URIs). Each endpoint can accept a number of bytes as parameters, and can return zero, or an unlimited set of bytes to the client.<br />
<br />
I have yet to "package" the Endpoint system, so any requests and changes are most welcome! I've got some documentation to write, along with incorporating feedback from others' and my own usage.<br />
<br />
Would love to get some feedback! ==> <a href="http://goo.gl/O5GJ3g">http://goo.gl/O5GJ3g</a><br />
<br />
<br />
<span style="font-size: x-small;">(*) and yes, I know an I2C bus is designed for 0.5m meter runs, rather than a whole house; bus accelerators, speed compensation, and other approaches "should" manage it. I'll report on my success/failure in a future post.</span>Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com2tag:blogger.com,1999:blog-12913358.post-56767932436014706932014-08-01T18:50:00.000-07:002014-08-01T18:50:24.033-07:00CanaKit PIC Programmer ResetEarlier tonite, I scorched one of my 16F688 PICs in a stupid move. To see if it was recoverable/usable, I dropped the sucker into my CanaKit programmer and ran '<span style="font-family: Courier New, Courier, monospace;"><b>pk2cmd -P</b></span>' on my Mac to check whether it could see/detect the PIC.<br />
<br />
<i>Bad move</i>.<br />
<br />
"No PICkit 2 found." ... and the red BUSY light just started flashing.<br />
<br />
It took some research because CanaKit has almost zero documentation. The short answer is the programmer is a clone of Microchip's <a href="http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=pg164120" target="_blank">PICkit 2 Development Programmer/Debugger</a>. The red flashy means the board couldn't load its firmware.<br />
<br />
<b>Solution:</b><br />
<br />
Download the V2.32 firmware from the above page. Unzip the file. Then load it onto the board:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><b>$ pk2cmd -D/path/to/firmware/PK2V023200.hex</b></span><br />
<br />
It'll load the firmware, verify it, then reset the device. No more angry LED!<br />
<br />
<i><span style="font-size: x-small;">(I hope those who run into a similar problem will find this blog post, to more quickly reach a solution)</span></i><br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-7655023630441573242014-06-06T20:07:00.000-07:002014-06-06T20:07:15.625-07:00LED lighting control boardsWoot! I just ordered a set of PCBs for lighting control in the new house. Wifey would kill me if we had no lights, so the priority kinda jumped on this one ... (*<i>Wifey comments</i>: I wouldn't kill you. However, I consider it prudent to go to Home Depot and buy some cheapo mechanical switches just in case)<br />
<br />
One of the more unique things about my (upcoming) house is that the bulk of our lighting are LED 24 VDC cans/pots/recessed lamps(*). Ceilings fans, chandeliers, and watercloset light/fans are standard high-voltage AC, but the bulk of our electrical fixtures are using these nifty low-voltage lamps. One neat thing is that the lamps don't require AC/DC stepdown transformers, so their cost is dropped, their reliability increases, and their heatprint is lowered.<br />
<br />
The wiring becomes both simpler, and more complex in ways, and possibly cheaper depending on your choices. Simpler because you can run standard 14 gauge stranded speaker wire (cheap; flexible around those corners) instead of the heavier gauge Romex stuff. The lower gauge wire can save you quite a bit on copper costs, and you can lose the heavy insulation and concerns of high-voltage wires in your walls. But much more complicated because you need special hardware to run them ... a repair is no longer just a run to your local Home Depot.<br />
<br />
In my case, much of the wiring in the house has been "home-run" back to my server room, so I ended up doubling my copper/install costs. All the control is localized to that room, which also means I don't have actual "switches" in my house, but just sensors (see <a href="http://prng.blogspot.com/2013/09/capacitive-sensing-wall-switches.html" target="_blank">Capacitive Touch Wall Switches</a>). This leads to "how do I control these lighting circuits?"<br />
<br />
Thus, my custom <a href="http://goo.gl/b0P8Q6" target="_blank">PWM Control Boards</a>. They have an embedded microcontroller which can "do anything" with the nine (9) output channels. A higher-level "upstream" controller will tell it what actions to perform, when, and how, communicating via TTL Serial or I2C or what-have-you. The boards sink current, at whatever voltage (so I will <b>also</b> use these for my 12VDC LED light strips).<br />
<br />
I've sent the PCBs off to <a href="http://imall.iteadstudio.com/open-pcb/pcb-prototyping.html" target="_blank">ITEAD</a> for production. Between now and when they arrive, I'll finish the microcontroller work that I've been working on. Assemble some parts from Mouser, plug it all together, and LIGHTS!<br />
<br />
Theoretically.<br />
<br />
Will report back, as I make progress...<br />
<br />
<br />
(*) I decided not to name/link the manufacturer until I get experience and form an opinion. Just email me to ask, if you're interested.Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-64875322001104397862013-09-09T03:09:00.000-07:002013-09-09T03:09:48.952-07:00Capacitive Sensing Wall SwitchesFor my new house, I wanted to go with an unobtrusive, "no controls" style. There are no thermostats, no pool controller, no security panels, and no standard toggle/paddle switches for the lights. Instead, I'm going for a designer style piece of colored glass with capacitive touch sensors behind it. Think of your smart phone's touch capability, and that will be my light switches.<br />
<br />
The "switches" are really just sensors, as the signals are delivered to the main house controller where the actual lighting management occurs. The sensor pad can detect touches, gestures, and multi-taps to provide different lighting requests, based on time of day and ambient light. The switches also include optional hookups to an IR/motion sensor, temperature measurement, and all switches have RGB backlighting.<br />
<br />
All my work will be Open Source, so I've started the <a href="https://code.google.com/p/gstein/wiki/WallSwitch">documentation for the wall switches</a>. I have a couple custom PCBs that I'm working on, and (eventually) a whole <a href="https://code.google.com/p/gstein/wiki/WallSwitchSoftware">mess of microcontroller code</a> for the PIC16F688.<br />
<br />
I'll keep updating the wiki pages, and committing changes to my repository. I don't have commit emails going anywhere, but Google Code supports <a href="https://code.google.com/p/gstein/feeds">feeds for wiki and source changes</a> if you'd like to track the changes. Of course, I'll keep posting here when interesting milestones occur!<br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com1tag:blogger.com,1999:blog-12913358.post-33017008926198984852013-08-12T15:51:00.000-07:002013-08-12T15:51:09.220-07:00Bluetooth HouseholdFor my home automation project, I chose to go with a fully-wired approach since I'm building from scratch. I get to run wires wherever needed, providing (hopefully) more reliability and an ability to troubleshoot problems. Certainly, the parts cost will be much lower than an RF solution.<br />
<br />
But with that said, I met <a href="https://twitter.com/ericmigi">Eric Migicovsky</a> a couple weeks ago (Founder/CEO of <a href="http://getpebble.com/">Pebble</a>). He came up with a great idea: use a Pebble watch as a control mechanism. Sure, I'll have phones, tablets, infrared remotes, and various sensors... but something on my wrist? Always handy? <b>Very</b> cool idea! With multiple Bluetooth base stations, I can even detect signal strength and triangulate a user's position in the house, in order to provide context-sensitive menus and button controls. If you're in the home theater, then "Pause" is going to be a handy watch button, when that drink needs a refill! Given that I'm writing the app, I can even provide Wifey with her own customized watch experience.<br />
<br />
To that end, I started doing some research on <a href="http://en.wikipedia.org/wiki/Bluetooth_low_energy">Bluetooth</a>, and on the <a href="http://developer.getpebble.com/">Pebble SDK</a>. The first thing to pop up was the need to use Bluetooth Low Energy (aka Bluetooth 4.0, BLE, or Bluetooth Smart [Ready]) rather than the older Bluetooth 2.x or 3.x protocols. BLE allows for interactions without pairing, which is important for roaming about the house, with multiple base stations. The Pebble hardware <i>supports</i> BLE, but it seems that the SDK doesn't (yet) allow for applications to deliver messages to one/more/available base stations. My hope is to work with the Pebble guys to see where/how to make that available to (my) home automation application.<br />
<br />
The second part of the problem is the development of the base stations for my house. There are inexpensive Bluetooth/USB dongles (about US$11) that can speak BLE. I've got a few <a href="http://www.raspberrypi.org/">Raspberry Pi</a> boards around the house, with previously-unused USB ports. A little searching seems to indicate the dongles are supported under Linux.<br />
<br />
These dongles seem to present themselves as an HID device (eg. keyboard, mouse, etc), and can be switched to a [Bluetooth] Host Controller Interface (HCI). I haven't dug in deeply on this stuff yet, but I <b>do</b> have a Fitbit dongle on my Mac OS. The Fitbit (Flex) speaks BLE, so it seemed appropriate to experiment with.<br />
<br />
Working with HID seemed harsh, until I found <a href="http://www.signal11.us/oss/hidapi/">hidapi</a>. The API is very clean and simple. As a Python programmer, bindings were the next step. Ran across Cython-HIDAPI, which sucks: forked copy of HIDAPI and heavyweight Cython-based bindings (given the ugly, I'm not gonna provide link-love).<br />
<br />
Answer: I wrote a ctypes-based binding for hidapi. My first, undocumented draft landed at just 143 lines of Python. Of course, I've <a href="http://gstein.googlecode.com/svn/trunk/python/hidapi.py">checked it in</a>, along with a <a href="http://gstein.googlecode.com/svn/trunk/python/hidinfo.py">sample script</a>.<br />
<br />
And after all that, my Fitbit dongle is purely a USB device (calling <span style="font-family: Courier New, Courier, monospace;">hid_open()</span> fails). Sigh.<br />
<br />
I've got more research to do, and maybe ordering a dongle for experimentation (see <a href="http://www.adafruit.com/products/1327">Adafruit</a>, or various on Amazon). Maybe I can interact with the Fitbit dongle through USB rather than HID. Who knows. But once I figure the base station thing out, I can track Pebble watches, Fitbits, and other Bluetooth devices throughout my house.<br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com2tag:blogger.com,1999:blog-12913358.post-60566179135332882192013-04-16T19:55:00.001-07:002013-04-16T19:55:33.910-07:00Building omxplayer on a Raspberry PiThe past couple days, I set aside my <a href="http://prng.blogspot.com/2013/04/pic-programming-on-mac-os-x.html">PIC work</a> and concentrated on setting up a Raspberry Pi ("RPi"). I've got a couple of these, and will use them as video streamers for televisions in my house.<br />
<br />
There is quite a bit of documentation for getting an RPi set up, so I won't repeat that here. My current focus is on getting video streaming working. An obvious candidate is <a href="http://www.raspbmc.com/">RaspBMC</a>, but I was looking for something very bare-bones to simply put a video onto the HDMI output. I ran across <a href="https://github.com/dalehamel/pyplex">PyPlex</a> which seemed right up my alley: Python and effectively an interface-less control of the video.<br />
<br />
Yah. Well. Then I look at the setup/build requirements. twisted-web? pexpect? Seriously? Somebody has made this much more complicated than it should be. Whatever happened to just using <a href="http://docs.python.org/2.7/library/basehttpserver.html">BaseHTTPServer</a> and the <a href="http://docs.python.org/2.7/library/subprocess.html">subprocess</a> module?<br />
<br />
Digging in, I find it is using <a href="https://github.com/huceke/omxplayer">omxplayer</a> underneath. No wonder they're using pexpect -- there is a tty/keyboard interface to omxplayer. (of course, <a href="http://docs.python.org/2.7/library/pty.html">pty</a> might be simpler than pexpect, but whatever) So this PyPlex thing starts up a web service and then controls omxplayer via a tty connection. I'm not seeing reliability and responsiveness here. And a <b>lot</b> of code, to boot.<br />
<br />
Tearing off another layer of the onion, I start looking at omxplayer. Sigh. Requirements hell yet again. GCC 4.7. Boost. ffmpeg. Oh, and it is generally set up for cross-compilation rather than building on the RPi. This isn't a bad concept in general, as the RPi is no speed demon. But the build only takes a long time because they chose ffmpeg, whereas the Raspbian distribution uses libav. (these two libraries are reasonably similar, as libav forked from ffmpeg rather nastily a couple years ago)<br />
<br />
So I'm looking at this giant pile of C++ code with a bunch of crazy requirements, which would take <b>hours</b> to build on my RPi. This is the wonderful state of video on the RPi. Sigh.<br />
<br />
Well... I found a <a href="http://wrightrocket.blogspot.com/2012/08/building-omxplayer-for-raspbian-on.html">post by Keith Wright</a> where he talks about building (a tweaked fork) of omxplayer on Raspbian. Much better, but the instructions <b>still</b> have crazy oddities about reconfiguring RAM, sudo to build in strange filesystem locations, and hey! fun! building ffmpeg from scratch again. Sigh. A guy just can't get any love around here.<br />
<br />
Being the good geek that I am... this just wasn't something that I want to put up with. I want to build this sucker on my RPi, using standard tooling and libraries that come on Raspbian.<br />
<br />
First up, I started from huceke/omxplayer rather than <a href="https://github.com/wrightrocket/omxplayer">Keith's</a> because it is much newer. But I did grab <span style="font-family: inherit;">the Makefile.include from</span> Keith, as it was sane for building on the RPi. Adjusted some of the paths to point to the <b>installed</b> items. Then, I had to install the following packages on the RPi: libpcre3-dev, libavcodec-dev, libavdevice-dev, libavfilter-dev, libavformat-dev, libboost-dev. As I started working through getting omxplayer built, I ran into a bug in a system header.<br />
<br />
In /opt/vc/include/interface/vmcs_host/vcgencmd.h, line 33 needs to be changed to:<br />
<blockquote class="tr_bq">
#include "interface/vmcs_host/linux/vchost_config.h"</blockquote>
I've filed a pull request to github:raspberrypi/firmware to fix this. Not sure if that is the Right place (that code may come from upstream?), but hopefully somebody will see it.<br />
<br />
Next up, I had to hack away, tweak, and otherwise put a bit of pain on the omxplayer sources. Some hacks were easy, but others likely broke stuff (I'm not sure if subtitles work any more). Hard to tell. A/V code is not easy, and not something that I'm familiar with.<br />
<br />
You can find all of my changes in my <a href="https://github.com/gstein/omxplayer">omxplayer fork</a>. Clone that to your RPi, install the necessary packages, and hit "make". No system reconfiguration. No sudo. No hours of ffmpeg building. No GCC 4.7 requirement.<br />
<br />
Clone. Make.<br />
<br />
Go have fun, and watch some movies!<br />
<br />
<span style="font-size: x-small;"><i>(my next step is to tear off the user interface bits, and shift to a simpler, pure-C library which I can wrap/control from Python)</i></span><br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com16tag:blogger.com,1999:blog-12913358.post-40080113727140805532013-04-14T14:42:00.001-07:002013-04-14T14:42:20.844-07:00PIC Programming on Mac OS XLately, I've begun working on home automation to wire up my entire house with all kinds of goodies. The hobbyist in me, and with an attempt to be frugal, I'm skipping off-the-shelf solutions and building my own. A friend of mine calls me crazy, that it will reduce the value of my house, etc. Whatever. This is some fun stuff!<br />
<br />
A big part of these systems is wiring together sensors and activators. You need something to control all of these things. There are a gazillion various solutions, with the obvious ones being an Arduino or Raspberry Pi and their GPIO pins (among many other features they have). I decided on a layered approach with "small brains" connected to the sensor, managing the specifics, then communicating upstream to a larger brain. I'll likely talk about the upstream bits in a later post, but this one is dedicated to the small brain: the PIC 16F688 microcontroller.<br />
<br />
I grew up on a 6502 microprocessor. Graduated to a 68000 when it arrived in the Mac 128k. And after that, never really worried about machine/assembly code. As I looked around for microcontrollers, I ran into the <a href="https://www.sparkfun.com/products/219">16F688</a> on <a href="https://www.sparkfun.com/">SparkFun</a>. This is a <b>crazy</b> chip -- the number of features packed into a tiny 14-pin DIP is simply incredible compared to where I came from. A couple key features that pointed me at this chip: UART on board, and about $2 per part. This allows me to do stuff such as communicate to serial sensors (such as the Zilog ePIR IR sensor), use bit-banging to communicate to I2C sensors (such as the MPR121 capacitive touch sensor), measure voltages for security systems and temperature (TMP36), ... and all in a tiny and cheap package.<br />
<br />
Next up is programming the dang thing. I've got a <a href="https://www.sparkfun.com/products/9671">programmer</a> and my Macbook. This post will document the steps needed to get some code running on the PIC. (to help others, and if I have to retrace these steps in the future)<br />
<br />
First, you will need the following software packages installed:<br />
<br />
<ul>
<li><b>pk2cmd</b> (<a href="http://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz">download</a> from Microchip)<br />This uses a standard configure; make; make install<br /></li>
<li><b>gputils</b> (see their <a href="http://gputils.sourceforge.net/">SourceForge project</a>)<br />I used "make mac105", then symlink'd "pk2cmd" and "PK2DeviceFile.dat" into my PATH<br />Note: I did <b>not</b> setuid-root on the binary (as the docs seem to suggest). It seems to operate fine with my login id.</li>
</ul>
<div>
When I plug my programmer into the USB port and run "pk2cmd -P" it detects my PIC16F688. Woot!</div>
<div>
<br /></div>
<div>
And for a basic "Hello World" to test my setup, I wrote a "<a href="http://gstein.googlecode.com/svn/trunk/pic/blink/">blink an LED</a>" program. Download that and type "make install" and it should assemble and load the program onto the PIC sitting in your programmer. Yank out the PIC, wire up RA0 to an LED tied to Vdd (I used a 680Ω resistor), and apply power. The LED should blink at you.</div>
<div>
<br /></div>
<div>
Not that hard!</div>
<div>
<br /></div>
<div>
If it doesn't? Well. Not like you can bring up Visual Studio and debug this thing. The program works for me, and the wiring is dead simple, so I wouldn't know where to point you.</div>
<div>
<br /></div>
<div>
Next up: switch my blinky program to use the chip's Sleep Mode and interrupts [rather than a busy loop]. Less power consumption!</div>
<div>
<br /></div>
Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com1tag:blogger.com,1999:blog-12913358.post-50835409352005910032012-03-07T15:59:00.001-08:002012-03-07T15:59:42.872-08:00Oroppas, by St ClementSo it was finally time to open and drink my flight of <a href="http://www.stclement.com/">St Clement</a>'s Oroppas wine (<a href="http://goo.gl/9b81l">info on 2007 bottling</a>). It's been waiting too long, so the wife and I decided to cook a <a href="http://goo.gl/aIgBt">wonderful dinner</a> and start popping open bottles.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghbiLhtSlr_BEpVxxdBpY-Gam8inWSN92flKH-Z02rzHSyIGmumSCaPSkRbNzZE9nuvELLOY_0L-cIKfcuHCIuKD9C9edcltTimRQ6RSe4ek3qu5xj5tUXXV9JkMVCAVwZHfNvWg/s1600/IMG_20120304_180215.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghbiLhtSlr_BEpVxxdBpY-Gam8inWSN92flKH-Z02rzHSyIGmumSCaPSkRbNzZE9nuvELLOY_0L-cIKfcuHCIuKD9C9edcltTimRQ6RSe4ek3qu5xj5tUXXV9JkMVCAVwZHfNvWg/s320/IMG_20120304_180215.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Flight of Oroppas, 1995 through 2002</td></tr>
</tbody></table>
My oldest bottle was from 1995. Waiting 17 years is certainly too long, but what's done is done. The 1995 still had a lot of flavor, rich notes, but with a very short finish (as expected).<br />
<br />
Sunday night, we opened up the first four bottles (1995, 1996, 1997, and 1998). Since these bottles were old, I figured they wouldn't be strong representatives of Oroppas. So... I also opened up a 2007 Oroppas; the tasting notes said it was just getting ready to drink. The 2007 was our "control" bottle to really show the bold, smooth flavors of St Clement's Oroppas series.<br />
<div>
<br /></div>
As I mentioned, the 1995 was still good, but with a short finish. The 1996 was tasty, starting to show some of Oroppas' deeper flavor.<br />
<div>
<br /></div>
<div>
Strangely enough, the 1997 was a step backwards. The wine was a bit sharp and acidic, unlike the big bold flavor of the 2007. Even the 1996 demonstrated some of that boldness. Given the usual success of Napa wines from 1997, I was quite surprised. Thankfully, moving onwards to the 1998 put everything back on track. The 1998 was a good representatve of that Oroppas flavor and style. Bold and smooth, with lots of rich flavor and a great mouth feel. The 2007 had even more flavor, but still contained some of the rough tannins of a young wine; the 1998 had none of that roughness and much (though not all) of the flavor. I will probably wait at least two or three years before opening more of the 2007, to age away some of the tannins.<br />
<div>
<br /></div>
<div>
By mid-evening on Monday, we had finished off the 1995, 1996, and 1997. We kept around some of the 1998 and the 2007 for comparison, as I popped open the 1999 and 2000. The progression from 1998 was quite obvious with the 1999 wine -- the flavor and finish just got bigger. But the 2000 was missing the strong berry and fruit undertones, leaving just a woody finish. The 1999 was the clear winner in these few years.</div>
</div>
<div>
<br />
Tuesday night, we opened the last two... the 2001 and 2002. This pair was very similar to Monday night's bottles: one smooth and full-bodied, and the other was a bit less. The 2001 was excellent. It had all the favor, smoothness, fruit and berry, and richness expected. The 2002 was a bit weaker on the fruit and the tannins were starting to creep in.</div>
<div>
<br />
Okay... Wednesday evening, we opened a 2004 Oroppas as the final bottle in this tasting. It was hiding behind the flight, in the picture above (along with the 2007). Based on tasting all of these wines, I have to say: the 2004 is the absolute <b>best</b> of the entire pack. It has all of the fruit, boldness, smooth flavor, and only a little tannin. I would suggest that holding Oroppas for right around eight years (from the vintage date) is its ideal. <span class="Apple-style-span" style="font-size: x-small;">(well... based on my tastes)</span><br />
<br />
Overall, please remember that I'm talking <i>comparisons</i> here. All of these bottles were very tasty. There is just no way to call any of these bad wines. As expected, the 1995 had weaker flavor yet no tannins. Moving forward in time, the flavor definitely improved, but the true Oroppas boldness did not show up until about 1998 or so. Around 2001 or 2002, a light shade of tannins started to arrive. The 2004 seemed to be the peak in the bottles that I had.<br />
<br />
I've been a club member of St Clement for 10 or 15 years. Their whites, reds, and specialities like the Oroppas are all fabulous wines. Their winery is a big Victorian up on a hill; it is beautiful, with a wonderful view over Napa Valley. I'm definitely a fan, and this flight has been an awesome experience. I highly recommend their wines, and a visit to their wonderful property.<br />
<br />
<b>Cheers!</b><br />
<br /></div>Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com1tag:blogger.com,1999:blog-12913358.post-73356289483644020702012-03-04T22:52:00.001-08:002012-03-04T22:52:11.380-08:00Lots of StuffI spent a good amount of time in front of my television. Watching shows (cable and Netflix streaming) or playing video games. The TV occupies a large portion of my life. Good? Bad? Who knows. But that isn't the topic for today...<br />
<br />
Lately, I've been fascinated watching the show <i>Hoarders</i> on A&E. The show is like a train wreck -- you just can't stop watching. It is a bit sad once you truly understand that hoarding is a psychological disorder, but it is <b>so</b> hard to stop watching. The things that people collect, that get hoarded, the condition of the house, etc ... there is always something new on the show.<br />
<br />
But here is where the "Stuff" from my post title comes in. There are a number of shows on that focus on "stuff". <i>Hoarders</i> is one show, but TLC has a similar show named <i>Hoarding: Buried Alive</i>. The show title is a bit crazy, given that it <a href="http://www.examiner.com/internet-trends-in-national/missing-las-vegas-hoarder-found-dead-home-video">actually happens</a>.<br />
<br />
It doesn't stop there. Those two shows are about people collecting. But there are shows on the other side of the equation, too. Hoarding is about acquiring, but the stuff (sometimes) needs to go away, too. <i>Storage Wars</i> is about lockers that get auctioned off when people don't pay their bill. In many cases, the lockers were owned by hoarders, and all kinds of awesome stuff is found in there.<br />
<br />
And then you have the show, <i>American Pickers</i>. The show is extremely fascinating. Mike and Frank find lots of stuff in peoples' hoards, but they concentrate on old items, and the history behind them. As a big History Channel fan, <i>American Pickers</i> is an interesting lens into history. Old cars, music legends, bicycles, cars, and other memorabilia.<br />
<br />
The stuff that people accumulate is incredibly fascinating, and these shows provide a broad view into history, people, and an endless variety of "stuff".<br />
<br />Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-5768949430463346242011-10-31T14:06:00.000-07:002011-10-31T14:06:52.011-07:00Installing Zabbix on Mac OS (Leopard)My friend Sam Ruby dabbles in a lot of technology, and he tends to do writeups on <a href="http://intertwingly.net/blog/">his blog</a> as he experiments with the stuff. I figured to take a page from his book, and share my own issues/troubles getting <a href="http://www.zabbix.com/">Zabbix</a> up and running on my MacBook (running Leopard).<br />
<br />
I grabbed the 1.8.8 tarball and unpacked it. For my scenario, I needed the server, the agent, and the frontend (but not the proxy). For simplicity in testing, and because I don't need to monitor bunches o' boxes, I decided to go with SQLite for the database. Zabbix uses the standard "configure/make/make install" pattern, so no hassle so far.<br />
<br />
Burp. The compilation failed. Investigating, I found that I needed to apply the patch from <a href="https://support.zabbix.com/browse/ZBX-4085">ZBX-4085</a>. The build completed, so started to look at the frontend.<br />
<br />
The Frontend is written in PHP, which is natively available (along with Apache) on my laptop. With some configuration, I got the frontend to load in my browser. There is a click-through GPL license (huh?) and then a really awesome page that checks your setup. I quickly realized that the builtin PHP was not going to work. Sigh.<br />
<br />
I've got MacPorts installed on my laptop, so I just continued with that. Homebrew is all the new rage with the kids, but it doesn't have builtin recipes for PHP. There are a few out on the 'net, but I really didn't want to monkey with that stuff.<br />
<br />
Lots of packages were needed: <span style="font-family: 'Courier New', Courier, monospace;">php5</span>, <span style="font-family: 'Courier New', Courier, monospace;">php5-gd</span>, <span style="font-family: 'Courier New', Courier, monospace;">php5-mbstring</span>, <span style="font-family: 'Courier New', Courier, monospace;">php5-sockets</span>, <span style="font-family: 'Courier New', Courier, monospace;">php5-sqlite3</span>, <span style="font-family: 'Courier New', Courier, monospace;">sqlite3</span>. A hojillion dependencies were installed, including another copy of Apache (sigh).<br />
<br />
Reloading the setup page, it continued to say SQLite wasn't installed. Looking at the frontend source, it was using a function named <span style="font-family: 'Courier New', Courier, monospace;">sqlite3_open()</span>. With some investigation, I found <a href="http://lists.macosforge.org/pipermail/macports-users/2009-January/013658.html">an email describing the SQLite interfaces for PHP</a>. Zabbix was using an unmaintained version. Rather than monkeying with that, I just edited the code to use the <a href="http://php.net/manual/en/book.sqlite3.php">preferred PHP SQLite interface</a>, and filed issue <a href="https://support.zabbix.com/browse/ZBX-4289">ZBX-4289</a> to push my changes upstream.<br />
<br />
Finally, I needed to tweak <span style="font-family: 'Courier New', Courier, monospace;">/opt/local/etc/php5/php.ini</span> for the recommended Zabbix settings (after copying <span style="font-family: 'Courier New', Courier, monospace;">php.ini-development</span> to <span style="font-family: 'Courier New', Courier, monospace;">php.ini</span>). This included some timezone settings, timeouts, upload sizes, etc. The Zabbix setup page is quite good about guiding you here.<br />
<br />
So I created my initial SQLite <span style="font-family: 'Courier New', Courier, monospace;">.db</span> file based on the instructions from the manual and pointed the Zabbix configuration page at it (taking a moment to realize it wanted the <b>pathname</b> put into the <b>database</b> field of the form). The test connection worked and then Zabbix saved the configuration file into <span style="font-family: 'Courier New', Courier, monospace;">frontends/php/conf/zabbix.conf.php</span>. It looks like there is a "download" option for that configuration file, which I presume appears when the <span style="font-family: 'Courier New', Courier, monospace;">conf</span> directory is not writeable. The Apache server (running from MacPorts now, using the MacPorts PHP) was running as myself, so it had no problem writing that configuration file.<br />
<br />
Next up: wrestling with the zabbix-server. The first annoying problem was that you cannot give it a configuration file in the current directory. It fails trying to lock "." for some dumb reason. Solution: pass an absolute path to the custom configuration file (the default is in <span style="font-family: 'Courier New', Courier, monospace;">/etc</span> or somesuch, which I didn't want to monkey with). Getting the server running was very frustrating because it spawns multiple processes which communicate using shared memory. It kept failing with errors about not being able to allocate the shared memory segments. After some research, I found that Mac OS defaults to some pretty small limits. Given that I wasn't about to reconfigure my kernel (using sysctl and some recipes I found on the web), I went to rejigger all the various cache sizes in the <span style="font-family: 'Courier New', Courier, monospace;">zabbix_server.conf</span> file.<br />
<br />
It ended up that I had to drop all the sizes to their minimum 128k setting: <span style="font-family: 'Courier New', Courier, monospace;">CacheSize</span>, <span style="font-family: 'Courier New', Courier, monospace;">HistoryCacheSize</span>, <span style="font-family: 'Courier New', Courier, monospace;">TrendCacheSize</span>, <span style="font-family: 'Courier New', Courier, monospace;">HistoryTextCacheSize</span>. Each were set to 131072. Finally, the server started. Whew.<br />
<br />
When I returned to the frontend to "Finish" the installation and bring up the console... it hung. No response from the server. Huge sigh. With a bunch of investigation, I found that something was holding an <b>exclusive lock</b> on the whole damned SQLite file. Nothing else could write to it (and it seems the frontend likes to test its writability by creating/dropping a dummy table).<br />
<br />
Fuck. Time to scrap the whole damned "simple SQLite" idea. Fine... I've used MySQL before, so I went with that. Back to MacPorts to install MySQL, the server, and the PHP driver for MySQL. Then I fired it up, created a "zabbix" user, loaded in all the tables, and zapped the <span style="font-family: 'Courier New', Courier, monospace;">zabbix.conf.php</span> file to trigger reconfiguration (after noting to restart Apache to pick up the PHP changes).<br />
<br />
The frontend looked happy now, so I tweaked the server's configuration file for MySQL and restarted the server. No workee. Damn. Forgot to reconfigure the server using <span style="font-family: 'Courier New', Courier, monospace;">--with-mysql=/opt/local/lib/mysql5/bin/mysql_config</span>. After reconfiguring, the link failed with unsatisfied references to <span style="font-family: 'Courier New', Courier, monospace;">iconv()</span>, <span style="font-family: 'Courier New', Courier, monospace;">iconv_open()</span>, and <span style="font-family: 'Courier New', Courier, monospace;">iconv_close()</span>. The MySQL interface in the server needs these for some UTF-8 conversions. The builtin Mac OS libiconv should work, but my MacPorts copy of libiconv was interfering, and these functions are named <span style="font-family: 'Courier New', Courier, monospace;">libiconv()</span>, <span style="font-family: 'Courier New', Courier, monospace;">libiconv_open()</span>, and <span style="font-family: 'Courier New', Courier, monospace;">libiconv_close()</span>. My patience was ending, so I was not about to delve into autoconf bullshit and conditional compilation and all that. I simply edited <span style="font-family: 'Courier New', Courier, monospace;">src/libs/zbxcommon/str.c</span> to call the <span style="font-family: 'Courier New', Courier, monospace;">libiconv*</span> versions of the functions. The compile and link succeeded, and I re-installed the newly built server.<br />
<br />
Yay! The server restarted, and the website loads up with a nifty little default console.<br />
<br />
After a day to get this sucker installed, now I gotta start figuring out how to <b>use</b> it. Oh, joy.<br />
<br />
I hope this post will help some future person treading these waters. Good luck!<br />
<br />
<span style="font-size: x-small;"><i>ps. I may have missed some steps or packages to install or whatever. YMMV, but I think that I've got most of it down. Zabbix is supposed to be some hotness, and I <b>do</b> like its custom agent capability. But hoo-wee. Not a simple package to bring up (I hope it will be easier on a recent Ubuntu, than it was on my creaky Leopard install).</i></span>Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com1tag:blogger.com,1999:blog-12913358.post-4371874233446578312011-08-15T09:54:00.000-07:002011-08-15T09:54:41.818-07:00Blast from the past: removing the GILWay back in 1996, I created a patch to remove the <a href="http://en.wikipedia.org/wiki/Global_Interpreter_Lock">GIL</a> from Python's interpreter (version 1.4!). Dave Beazley just picked up the patch and tore it apart, and writing <a href="http://dabeaz.blogspot.com/2011/08/inside-look-at-gil-removal-patch-of.html">a fantastic blog post</a>. It is quite nostalgic for me, from back in the day when I was working at Microsoft on their electronic commerce efforts.<br />
<br />
<i><span class="Apple-style-span" style="font-size: x-small;">[ I <a href="http://dabeaz.blogspot.com/2011/08/inside-look-at-gil-removal-patch-of.html?showComment=1313426575375#c6890423699055362381">commented</a> on Dave's post; it provides some context that you may also be interested in reading ]</span></i><br />
<br />
Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com3tag:blogger.com,1999:blog-12913358.post-13621600082639852162010-11-29T13:50:00.000-08:002010-11-30T03:28:31.313-08:00Open Languages are Not RequiredI just posted again to <a href="http://blogs.computerworlduk.com/apache-asserts/">Apache Asserts</a> on Computerworld UK: <a href="http://goo.gl/yk33n">Open Languages are Not Required</a>.<br />
<br />
And please note that I'm speaking primarily to enterprise (internal) software developers, who are the vast majority of developers on the planet. They shouldn't really have to worry about the language that they use for their development. Having an open language is critical for us FLOSS developers, but that is an entirely separate discussion. <span class="Apple-style-span" style="font-size: x-small;">(hat tip to <a href="http://webmink.com/">webmink</a>, to clarify my point here)</span><br />
<br />
<br />
<i><span class="Apple-style-span" style="font-size: x-small;">Note: the publish date is wrong (says last month); dunno what's up with that.</span></i><br />
<br />
<b>Update</b>: corrected link after the publish date was fixed.Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-67109925509662339832010-10-29T13:08:00.000-07:002010-10-29T13:08:36.904-07:00Are You An Open Source Friend?The <a href="http://www.apache.org/">Apache Software Foundation</a> was invited to find some people for <a href="http://www.computerworlduk.com/">Computerworld UK</a> to write for a new blog named "<a href="http://blogs.computerworlduk.com/apache-asserts/">Apache Asserts</a>". Myself and a few others were selected to post our thoughts on open source, the enterprise, and whatever else we may find interesting.<br />
<br />
My first post has been published... <a href="http://bit.ly/bjwSP3">check it out</a>!Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com0tag:blogger.com,1999:blog-12913358.post-61557100242684329482010-08-15T21:39:00.000-07:002010-08-15T21:39:47.272-07:00Android uses Java? Um... noI've seen a lot of misinformation over the weekend, talking about the <a href="http://news.google.com/news?pz=1&ned=us&hl=en&q=oracle+google+lawsuit">Oracle/Google lawsuit</a>. Many of these blog posts and article talks about how "Android uses Java". Heh. That simply isn't true.<br />
<br />
Android applications are written using the Java <b>programming language</b>. True. But those applications<a href="http://www.betaversion.org/~stefano/linotype/news/110/"> run on the Dalvik virtual machine</a>. Not the Java virtual machine. Source code is owned/copyright by the author and is entirely unbound from any intellectual property concerns based around the syntax/grammar of that language.<br />
<br />
Class libraries? Not Java either. Much of the core libraries come from <a href="http://harmony.apache.org/">Apache Harmony</a>, and the rest are libraries that Google wrote. Given that Apache was never provided <a href="http://www.apache.org/jcp/sunopenletter.html">access to the Java Compatibility Kit</a>, Harmony is not labeled as "Java-certified". Also note that Harmony is a clean-room implementation of the Java class libraries.<br />
<br />
So, people: stop saying that Android "uses Java". It doesn't.<br />
<br />
<i><span class="Apple-style-span" style="font-size: small;">(obviously, some of these various components may trample on Oracle's patents; I have no idea, and that is an entirely separate question)</span></i>Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com12tag:blogger.com,1999:blog-12913358.post-6812429440089452992010-08-04T23:46:00.000-07:002010-08-04T23:46:45.887-07:00OutcomesNights out with a friend can be quite interesting. <b>Especially</b> if they are single and "looking". I've found there are generally three possible outcomes with these nights out:<br />
<br />
<ol><li><b>The Cock-Block</b>.<br />
Your friend is trying to hook up or otherwise get especially friendly with somebody, but you monopolize the "target's" attention in some way to distract them from your friend's intent. Obviously, this outcome is "poor", unless you're some kind of dickhead that doesn't want your friend departing early with the target. Quite selfish, to try and keep them out with you. Of course, there are all sorts of minor rules variants here, that are rather crass: e.g if you're both interested in the target, who steps forward, who holds back? It's simply best to avoid this scenario because it never turns out well.<br />
</li>
<li><b>The Wingman</b>.<br />
Oh yah. We all know this one... the friend who props up the other and makes them ever more desirable. Talk up their strengths, ensure that the person-of-interest gets excited to know more about your friend. This is the ideal outcome, especially if they make some kind of lasting connection.<br />
</li>
<li><b>The Bus-Tosser</b>.<br />
This isn't nearly as bad as the Cock-Block, but your friend isn't going to be all that happy with you. At least for a short while. This is where you <i>think</i> your friend is interested in somebody, so you move into Wingman mode. Provide lots of opportunity for the two to talk and hang out, provide some good commentary, etc. Like any good Wingman would do. But afterwards, you find out your friend was <b>not</b> interested. At all. This is the "thanks for throwing me under the bus" maneuver, putting your friend into harms way. Especially if the purported target <b>is</b> interested and giving undue attention to your friend. ... Thankfully, in the long run, this provides lots of laughable material for how you sucked as a myopic Wingman.</li>
</ol><div>I think the best answer all around is to simply go out and have a great time with your friend. Anything that will involve a possible third person can fall into a poor outcome, or simply distract from an awesome evening with a friend.</div><div><br />
</div>Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com2tag:blogger.com,1999:blog-12913358.post-72546052113181943682010-05-19T11:53:00.000-07:002010-05-19T11:53:08.935-07:00svn stashThis is the third of (at least four) posts in my miniseries about Subversion's next-generation working copy library. See <a href="http://prng.blogspot.com/2010/04/what-is-subversions-wc-ng.html">the introduction</a> and <a href="http://prng.blogspot.com/2010/04/wc-ng-changes.html">what we're doing to fix things</a>.<br />
<br />
Once we have this fancy new code, it will provide a stable and robust base for building <b>new</b> features. The DVCS systems have done a great job exploring new areas and needs of version control users. One feature in particular is called <i>stashing</i> or <i>shelving</i> (see "<a href="http://www.kernel.org/pub/software/scm/git/docs/git-stash.html">git stash</a>" and "<a href="http://mercurial.selenic.com/wiki/ShelveExtension">hg shelve</a>").<br />
<br />
For those not familiar with the stash concept: consider the scenario where you've been doing some work, and a high-priority bug arrives, needing to be fixed right away. Classically, a Subversion user would check out a fresh working copy, fix the bug, perform the commit, and go back to their work in the original working copy. Instead, when using stash, it takes all of your current work and sets it aside, leaving you with an unchanged working copy, ready for your bug-fix work. After your commit, you retrieve the changes that were stashed. The presumption here, of course, is that stashing is a much faster and simpler operation than setting up a new working copy.<br />
<br />
We'll be able implement this feature quite easily using the WC-NG datastore. It will take just a few operations:<br />
<br />
<ol><li>preserve all metadata about local changes</li>
<li>place a copy of each locally-modified into pristine storage, recording their SHA-1 key with the stashed metadata</li>
<li>revert all local changes</li>
</ol>Since the metadata is recorded in a single SQLite database, step 1 is "simply" some copying of those changes off to a separate set of tables. The pristine storage is a generalized mapping of SHA-1 keys to file contents that we'll be using for storing more things (such as merge sources, pending conflict resolution), so it can easily hold stashed items. And step 3 has been in Subversion for a long time :-)<br />
<br />
Recovering the changes from the stash is effectively running a big "svn merge" operation. The merge is required because you may have made other changes to the working copy (your bug-fix) and/or updated to the latest revision.<br />
<br />
Other features, such as multiple stashes, management of those changes, applying subsets, and whatnot would be added, too. The feature set has not (yet) been designed, so I have no idea what is required or how we would present this to our users. We'll definitely be looking at git and hg as we explore the needs around stashing/shelving.<br />
<br />
"<b>When?</b>" is your next question, I'm sure :-) ... Well, we're releasing WC-NG in Subversion 1.7. That will probably happen this fall. We want to get those changes out the door since that will mark 18 months of development time. WC-NG is a feature in itself, and we want to get it into people's hands without further delays [waiting for additional features]. After that, I'm interested in adding stash support (and a "checkpoint" feature (described in my next post)). So let's say stashing will appear in 1.8 which should be released around this time next year.Greghttp://www.blogger.com/profile/02475017701402788075noreply@blogger.com4