Let’s End Homelessness – Then, Let’s Square the Circle

I’m not cynical. I believe attacking systemic homelessness is a worthy idea. I don’t believe defeating homelessness permanently is possible. (More on that below). That’s not a justification for not making housing circumstances better. Kudos to Phoenix’s Mayor Gallego for teeing up the problem and challenging participation. Now, it’s a problem at the scale of digesting an elephant; it requires baby steps and a lot of thought beforehand. The devil, as they say, lurks among the details.
One bright guy I knew as a youth, the late Craig Gold, said one evening that “intractable social problems have no clear answers – but they’re susceptible to evaluating by asking better and better questions.” That’s how I envision homelessness solutions: They’re moved forward only by asking and answering probing questions first. I’m going to discuss in a few parts over several weeks how to frame the important questions, which I think are:
• What are the authentic goals of the troops in this battle?
• What difficult policy choices must local leaders make?
• What’s the most sensible implementation of short-term homelessness mitigation?
• What’s the cost to local leaders of implementing homelessness mitigation?
• Where are mitigation resources coming from?
• How do you ensure the stickiness of solutions implemented?
I begin with goals-setting. That requires stating one’s genuine individual motivations for minimizing homelessness. If the troops don’t realize why they’re charging this mountain, it gets much harder to take it. It seems there are many motivations for desiring to reduce homelessness. Here are several:
1. Homelessness is the product of an unjust society; justice demands a fix and, come the revolution, it shall be done. The problem of identity politics is imbedded in the word identity. Prepare for screaming and dangling the problem in your face until you identify with [something]. With being accountable. With being greedy because, unlike the homeless, you have someplace to live and you haven’t devoted all your time and money to solving social ills. This is the thing: Incessant restatements of the problem and identifying those responsible causes/individuals/classes in society won’t implement solution(s). Neither will admissions of failed attentiveness, which aren’t forthcoming regardless.
2. I want to make my city look enlightened, progressive and earnest, to attract youthful tech and other knowledge workers to my community, turning it into a 24-hour city and boosting taxes and other revenue streams filling municipal coffers.
3. I want to look enlightened, progressive and earnest, to attract youthful tech and other knowledge economy workers as volunteers and donors to my future campaign for office.
4. I want to contain as many homeless persons as possible, so I don’t have to look at/deal with them on the street corners and sidewalks of my town. Let’s clean up this place!
5. I want to house as many homeless persons as possible, on the chance there’s the possibility the homeless in America someday may experience dignity in their lives. That’s because a great nation extends opportunities that are accessible and affordable to a wide swath of its citizens.
6. The Lord said “Love your neighbor as yourself. There is no commandment greater.”
I align more with group 5 but slightly with a few others. I’ll cavalierly label Group 5 the “pragmatists.” I suspect pragmatists know no local government will ever house everyone living on the streets within their community’s boundaries. Pragmatists also know that the incremental cost of attempting to punch the ball the last 10 yards to achieve 100% housing isn’t optimal use of municipal resources.
There are a few categories of homeless persons who will remain homeless. Recidivists are those who cannot cope with confinement within organized or independent housing, for a variety of reasons. Intransigents at one time were called “hobos,” folks who traveled the country at low costs, surviving by whatever means they could devise – including doing hard work at times. Intransigents want to come and go on their schedules. They don’t want your housing; living under a bridge is fine, thanks. They don’t want to be driven out of your community, either. They just want independence except from those from whom they seek aid.
How you understand and express your motivations informs what solutions to homelessness are implemented. Motivations color your approach to street planning. Such urban planning is what social scientists call a “wicked” problem involving many stakeholders with competing interests asserting claims to finite municipal resources. Competing interests are susceptible to no single right answer but endless debating over differing versions of value. For some, solutions implicate zero-sum outcomes – not reserved to the abortion rights debate. Homelessness solutions, properly conceived and implemented, don’t have to set off zero-summing competitions. The answer likely lies in a suite of solutions that address a variety of motivations.

Origination of the Lawyer Species

February brought on interesting claims of high-tech advances in loan origination and closing. The question for attorneys is whether the advances step on their professional toes. Two first quarter 2020 events trigger these observations:

On February 5, Docutech, which brings you the platforms of eSign and eClose digital technology announced that it would partner with Origence. The Origence lending platform, according to  hype on Business Wire, is a “ground-breaking, end-to-end system that combines powerful point-of-sale and loan origination system tools that accelerate a lender’s loan production and reduce process cycle time while significantly reducing costs,” by streamlining workflow for generating, distributing, and signing loan documents.

On February 21, the Phoenix Business Journal reported that First American Financial, which provides title insurance and settlement services to the mortgage industry, has purchased Docutech. So, what is the net result of this consolidation that we’re told will offer better digital mortgage experiences to consumers? Is this rollup intended to make execution and delivering of loan documents streamlined and no more? Otherwise put, is it kosher from the legal industry’s perspective? Courts, prodded by Bar Associations, have been a bit particular in regulating exactly who can engage in law practice. In Arizona, Rule 31 of the Rules of the Supreme Court defines the practice of law as “providing legal advice or services to another by preparing a document in any medium intended to affect or secure legal rights for a specific person or entity.” Aren’t loan documents intended to secure legal rights to both parties to the lending transaction – borrowers and lenders – by defining the rights and obligations of each?

There are exceptions to this definition. Title Companies, for one entity, have long been permitted to prepare certain “closing documents” connected with transactions as to which those companies will be selling a title insurance product. Secondly, per the Arizona Code of Judicial Administration § 7-208, Certified Legal Document Preparers may provide general factual information pertaining to legal rights, procedures, or options available to a person in a legal matter when that person is not represented by an attorney. UPL Advisory Opinion No. UPL 06-02 (April, 2006).

But it remains to be seen if First American Financial has stepped on a landmine. In 1961, the Arizona Supreme Court in State Bar of Arizona v. Arizona Land Title & Trust Co., 90 Ariz. 76, 96, entered an order stating:

It is further ordered, adjudged, and decreed that: the defendant title companies are engaging in unauthorized practice of law when they: (a) prepare by drafting or filling in blanks, deeds or conveyances of any kind, forms of notes, mortgages, satisfactions of mortgages, assignments of mortgages, contracts for sale of real estate, or assignments thereof . . .. (emphasis added)

So, if a borrower goes to a First American branch and signs finished loan documents (that is, with all blanks completed, including the loan amount, dates for each payment due, and so on) tendered by a First American Title employee, has that employee engaged in law practice? Were we in Nebraska, that question has been answered by the state’s Commission on Unauthorized Practice of Law, in its Title Insurance Advisory Opinion 2010-001, ¶5 – with a resounding “yes” in response – a title insurance agent cannot prepare a deed of trust or mortgage, even if it is just to fill in the blanks. That is considered conducting the unauthorized practice of law in Nebraska.

In 1985, the State Legislature repealed the Arizona statute prohibiting the unauthorized practice of law – without, of course, impacting the judge-made law. And in 2000, the Supreme Court indicated: “We are quite aware of the social, technological, and economic changes that have taken place since our decision in Arizona Land Title.   In some situations, these changes may require us to reexamine our broad definition of the practice of law.” (In Re: A Former Member of The State Bar of Arizona, Frederick C. Creasy, Jr., Respondent, 2000.) Are we on the cusp of examining anew, in Arizona anyhow, that law practice definition? Is the legal profession overprotective, trying merely to keep its monopoly on billings? Well, what happens when Consumer Clive asks the escrow officer at the signing table what “defeasance” or “due on transfer” means in Clive’s Deed of Trust, and the escrow officer doesn’t know the answer but has a wiring cutoff deadline to get signed documents? Whose ox is being gored has much to say about the rigidity built in to notions of unauthorized practice. 

— Mike

About Coaching

A recent conversation I had with some friends led me to think more about coaching. Why do athletes at the top of their game have coaches, and why are the coaches not as good as the person they are coaching? Why do people in varied industries have coaches that don’t know much about how the industry works?

As many of you know, I have worked as part of the leadership team at Tony Robbins events for many years, coaching and working with people from every walk of life. So I have a little bit of insight into coaching. Also, Robbins basically created the coaching industry, and has various models for how to work with people to improve their lives and/or performance.

Often we enlist a coach to get better at something – golf, tennis, day trading, real estate — whatever we want to improve in our lives. But the coaching only seems to work well for a very few people. Partly I think this is because there are many coaches who are not equipped to help some clients, and there are uncoachable clients, and the spectrum in between all that.

Malcom Gladwell, in the book Outliers, talks about how we learn. Maybe he doesn’t say that specifically, but when I read it, that’s what I get out of it. That we need to learn stuff at the subconscious level to master it (that’s a Robbins thing) but when we have learned it this way, then we really have no idea, consciously, of what the “secret sauce” is that makes us successful; as a result, we have problems when we try to coach others to have the same success that we have.

For example, if you want to learn to day trade, you can be taught by the very, very best. And they will in all sincerity tell you how they trade. And you will follow exactly what they tell you, and you will lose.

Why? They are good at what they do because they are in the flow; their subconscious mind is doing the work, trained by thousands of hours of failing and ultimately succeeding. Their conscious mind thinks it knows what they do – they will tell you they know exactly what they do – but in reality they are wrong! Their subconscious knows what to do.

Gladwell talked to a bunch of tennis players, I forget the specific details now, but he asked them how they hit their best forehand shots. And they told him how they hit the ball, how they swung the racket, etc. And so Gladwell used a high speed motion camera and filmed them making the shots.
None of them made the shots in the way they described. They do not know exactly what they do. But a good coach knows, he has watched them and others like them until the coach figured out what was happening.

I have a great example from my personal story. When I was 30 (yes 30…) I decided I wanted to be a gymnast. Now at 6’2″ and 220 pounds this did not bode well, but I got into the greatest shape of my life, and over 5 years I got pretty decent, I had a floor routine and I could do giant swings on the high bar, I could do some rings, I pretty much accomplished what I set out to do. It was VERY hard but massively rewarding.

What I learned was that when little kids learn, the barrier between the conscious and the subconscious is thin – the filters and meta programs have not developed. So little kids have no problem learning the skills, they see them, they do them. But as an adult, oh boy. I practiced. I read books. I watched videos. It was brutally difficult.

It doesn’t help that as a little kid you have no idea about mortality and getting hurt, but as an adult, contemplating spinning in the air above the ground… And kids weigh, what, 70 pounds? Try missing something when you are 225 or so and having everyone in the gym stop and stare to see what the loud noise was when you smashed onto the mat.

One particular example was trying to learn to do a back extension roll. This is where you do a backwards summersault and, when upside down, you pop up into a handstand. It looks easy. (And it is…) But I could not make it work. My coaches, one of whom was a national champion gymnast, said, “It’s just timing”. Others said I was not strong enough (right, I could do 20 handstand pushups…)

So one day I asked one of the coaches if he would spend 20 minutes and do a bunch of them, right in front of me. And I watched. And then finally I saw what he was doing, which was not in any way what I had been told. As soon as I saw what he was doing, I had the trick. Like in that moment. None of those coaches had any idea how to do the trick. They thought they did, but they didn’t. And while timing is a factor, it had nothing to do with how the trick works.
I am really good at coaching older kids and adults in gymnastics. Because I had to figure out how the tricks actually work, because it was never in my subconscious.

So if you have been trying to teach someone a skill and it isn’t working, try getting someone who has never done it to watch – and ask questions. It can be eye-opening.

— PLH

Lighting for a Murphy bed

Last year I built a murphy bed for an AirBnb property. It was a fun project, and I am a decent woodworker, so it came together in about a week, and for a fourth the price I might have paid to buy one.

But, there was a problem. Since the bed folds up into the wall, the sides stick out a foot or so, and then the bedside tables don’t really work for lighting because the side of the bed is in the way.

Mine is like this, but without the shelves on the sides.

So you can see how it might be interesting to get reading lamps on each side. So I started looking for lamps that might work, that had a narrow focus, and I found one on Amazon that was very expensive and could be focused – overkill, but would work well. Then I found one on AliExpress that was inexpensive, bright, ran on 12 volts, and had a 30 degree beam — perfect!

These are less than $10 each,12 volt, and are tiny!

But I needed a small switch. Looking on eBay, there are some little 12v controllers that let you turn them on and off, and dim – so that’s what I got, and installed them on the inside edges of the bed where they were easy to get to – and they work great! Just hook up a 12v power supply and you are all set.

LCD/LED TV Tech Impacts Large Events

If you have been to a ball game recently, you know about the Jumbotron. In the past, these were made up of lots of little LEDs (light emitting diodes), similar to the daylight readable road advertisement signs, but if you are far enough away, you don’t notice that the individual pixels are fairly large.

But in the last couple years, that has changed. As many of you know, I attend lots of events in support of a well known motivational speaker, and he often has some of the very best tech at his shows. They have recently grown rather dramatically, when I first went 12 years ago there were a few thousand, the most recent LA show was more than 10,000. But the event I attend most is one that has grown from about 1500 to now about 4500; and the tech has grown dramatically.

As recently as 3 years ago, the display screens were rear projection, and there was a significant lag between the live person on stage and what was shown on the screen. But that has changed.

The main display is about twenty feet across. And the two side bars are also digital displays. How do they do this? There are a couple of companies that make ‘video walls’, and you can customize them to just about any size. I am a bit of a geek, so I was looking behind the display to see how it worked. Each display is an HD LCD display that is borderless, and about 24×42 inches. And they bolt a bunch of them together (God knows what the thing weighs!)

The result is a huge, incredibly bright, responsive LCD display. And there is almost no lag between the speaker and what we see on the display. As his events grow, more and more of these displays are added – in a stadium for a 12,000 person event, there might be 12-15 of them so that each person has a great view of what is happening.

And the sound systems have improved as well! The combined sound and light show is better than any rock concert I have ever attended (and I have been to a few, including Pink Floyd, U2, Led Zep, Trans-Siberian, and others.)

So if you decide to attend one of his events, you won’t be disappointed!

The Latest Rental Property

As you, my readers, know, I work in real estate. Part of being involved in residential real estate sales is having access to the MLS, the multiple listing service. And it is a wonderful service, an online list of properties for sale, sold, and in other various states. It has more information than the tax service, and it includes new listings and lots of interesting valuation tools, like RPR, which is sort of like Zillow for realtors but better.

I know many of us spend the evenings watching TV, hanging out in the family room visiting with family and such. One thing I do from time to time (well okay lots more than that) is, while watching old re-runs of Deep Space 9 or Have Gun Will Travel, I have the MLS open on my laptop and am trolling for something interesting to buy or to show one of my investor clients. I don’t wait around for a search to send stuff to me (I do have lots of searches set up) but I get bored and try to find new and interesting ways to look for properties. Mis-spelled words, other agents who have made an error in posting a listing, properties that have been pending for a REALLY long time – lots of interesting ways to search.

A few years ago in the late spring, just before Memorial day, I found an interesting property that was bank owned, and had been on the market for some time. So I wrote a really low offer that was cash and the earnest money was the full amount of the purchase. Yep, got their attention – I didn’t get the price I offered, but it wasn’t far from it, either. Closed on the house, did some fast rehab and staged it, and sold it, all in less than a month for a very nice gain.

But about a year ago, there just wasn’t that much stuff on the market. I had sold a property and needed to re-invest the proceeds quickly (it was a Starker, or 1031 tax free exchange.) So I was looking not just in the MLS, but in several other places, including the foreclosure auction.

There are a bunch of good folks who operate bidding services, and I use one of them for my occasional auction purchase. Now, when you buy at auction, you usually only know if the property is going to sell late the day before the auction. And I was bidding (low) on a half dozen properties each day, and finally got one. Of course, I wasn’t driving to see them and so the purchase was sight unseen. I bid low enough that I was sure it would work out alright.

And it did, but as usual, there was quite the education process involved. I closed on the property, and then went to see what I had. (Yeah, I know, I probably should have looked at it first but it was REALLY cheap…)

What I found was actually a pretty decent house on a nice lot. The electric panel was missing, and it was… rough. So I called my contractor to come take a look, pull a permit, and get going. My first sign of trouble was that the zoning people refused to let my contractor pull a permit because… he was not licensed in that city (yes, it is in the valley, and yes, he has a Phoenix license…)

So he got a license (another $30 or something) and THEN they tell him they won’t give him a permit because… well, because there are “issues”. So I go to the zoning people to determine what these issues are. The home was built in the 1930s and when it was built, another home was also built on the adjacent lot. Their home was partly on my lot and my driveway was partly on their lot. So I had to move the lot line. Which involves dealing with planning and zoning (mostly just write them a big check) and getting drawings done by a surveyor.

Originally the same people had owned both lots, and in the 1930s no one really cared what you built or where it was, apparently. But we got it fixed. The issue was then, that once I had approved re-zoning plans, I needed the signature of the lot owner next door. They were nice folks, but the actual owner had dementia, was in the hospital, and was not expected to live long, and no one had a power of attorney. So… I got signatures from all the potential heirs. I don’t know if it was legal, but the city accepted it and the town council approved my rezoning request.

Then they finally let us pull the permit, and we did all the work. When I went to get the final inspection, the inspector came out and said “They were supposed to tear this house down. I can’t sign anything.” Well that was exciting.

Ultimately, though, the work was approved and we got a final inspection acceptance and a year later, the house is rented. Sure, it was lots of work, and I have probably a thousand miles on my car driving back and forth to the property and the city, but the rental cap rate is about 16%.

Yeah, it was worth it.

Flying a light jet

My Bonanza

As many of you know, I am a pilot, and for the last 15-20 years, my plane of choice (that I can afford and has a reasonable mission profile) has been an older V35 Bonanza. I love the plane, I can load 4 people plus luggage and full fuel and fly over 1,000 miles.

The freedom you get from this is amazing. I have flown from Phoenix to Lake Placid, NY, all over California, the midwest, Utah, Texas – we used to fly to South Padre Island from Phoenix every year.

But… fuel prices have risen, and aviation fuel, in particular 100LL, has become quite expensive. And flying a plane that burns 16-18 gallons an hour starts to really hurt. I went out to fly a couple years ago, and I saw that the last time I had flown was almost a year earlier. Not good. Not only not good for the plane, but just not safe.

Sure, I always did the flight reviews and such, and occasional instrument flight checks, but my attitude, in a plane like a Bonanza, is that you ought to be flying at least monthly to stay on top of things. And I wasn’t, so for this and other reasons, I ultimately sold my wonderful plane. I hope the buyer is enjoying it as much as I did. At least it is flying more.

Recently, I had a family member who became ill. They were wealthy enough that they could charter a small jet to fly to places for treatment options, and also to see other relatives, as she was unable to travel via the scheduled airlines. [And there is that freedom thing again where you can bring a full sized tube of toothpaste, a bottle of bourbon if needed, and it is on YOUR schedule.]

On one of the trips, I was privileged to be invited along, and I got to sit in the right seat of a Cessna Citation Mustang, a very nice smaller twin jet. It was interesting that it had similar capabilities to my Bonanza in terms of payload and range, the main difference being that what takes 3-4 hours in the Bonanza takes 2 hours in the jet. And of course the jet can fly over all the weather (I have flown my Bonanza at 25,000 feet but we flew at 40,000 buy lorazepam online us feet…)

In my plane, there are many options. You get to actually _fly_, although not as much as if you are in a smaller Cessna 152 or 182, often used for flight training, but – you get to _fly_. The jet is a different story. It is almost always flown on an IFR mission, which means there is often a departure procedure, a specifically designated enroute flight plan, and an approach and landing procedure. What does all this mean?

When you spool up the jet, you already know how you will enter the airspace system. Like the Bonanza, you depart, follow runway heading until xxx then fly some course … and then it changes. In the Bonanza, I was pretty happy to go my own way at 10,000 feet or even 15,000 feet, and it is optional whether you talk to air traffic control (except in instrument conditions.) But jets are happiest high, so we immediately talk to ATC and climb through 18,000 feet where we are required to talk to ATC, and follow the plan as filed with them.

Generally the flight management system and the autopilot fly the plane, and it is the job of the pilot to manage the systems. Sure, we did lots of systems management in the Bonanza also, but there weren’t as many requirements. Flying the jet is a series of specific procedures and requirements, and they must be followed.

I love the mission capabilities of the little jet, and it was very interesting flying mostly higher than the other airline traffic and being able to see all the commercial jets below us – rather than sitting under the clouds and hearing about the jets and wondering where they were – but it seemed much less like flying and much more like a management job to me.

Of course if I complain about $200 an hour just for fuel in my plane and the jet is more like $1000 an hour for fuel, well, there’s another reason I don’t plan to buy one anytime soon. The entry price of a used Bonanza like mine was 120k-150k. The little jet was more than 10x that.

But gosh it was fun to sit in the right seat for a few hours. It didn’t hurt that the pilot was one of the best I have ever flown with, either.

 

–PLH

Pool Lighting and Flips

As a property rehab specialist, I am often looking at the swimming pool and what will happen during the ultimate buyer’s inspection.


One of the things that happens is that if there is any sort of special equipment, like a heater or automatic chlorinator, or a spa control of some kind, it will not be working and I usually am not really in the mood to repair it. And the buyer will want it repaired…

So mostly these added items are negotiated as conveying “as is”, or if it is a simple thing, I remove them (like the automatic chlorinators. I have removed many.)

Pool lighting is another matter. Most people want the pool lights to work. And I have had to repair many of them. Often, someone has unscrewed the light fixture and lost the screw so the light is either sitting on the deck, or is floating around in the pool at the end of the cord. The other problem is that they trip the GFI.

Now, I really HATE GFIs. I don’t think a GFI has ever prevented any injury (I couldn’t find any stats) and somehow the human race dealt with the lack of them for decades without any problems. I don’t think throwing an operating radio into a bathtub that has a person in it will hurt you (Mythbusters aside.)

However, it is code that there be one, and I always comply with the code. And old pool lights almost always trip the GFI.

I put in a pool when I moved into my home, and I installed pool lighting. And last year, the pool light… started tripping the GFI. I could remove the fixture and dry it out, and it would be okay for a few weeks then start tripping again. There was never any visible moisture in the light, so I’m sure it is a pinhole leak somewhere.

When I installed the light, there wasn’t a choice for LED lighting. But now there is. So a couple months ago, I found some 12 volt LED floodlights online and ordered one for the pool. Then I went into the pool panel and added a 12 volt transformer (and left the GFI hooked up). I also made sure it was running on 12 volts DC not AC. Sealed everything back up, and … yep, it works. And it doesn’t trip the GFI. Even if it did leak voltage, 12 volts is not going to hurt anyone.

They sell retrofit kits now, and you can upgrade your pool light to a multi-color one, and I think they are far safer than having a 120 volt fixture under water. So next time I flip a house, before I replace the light fixture, I’m upgrading it to a 12 volt LED one.

 

–PLH

 

 

Is your home about to flood?

I like to think my home is well maintained. No leaks, no drips, the faucets all work correctly, the appliances are newer, the toilets have been replaced with water saving ones… I care about my home and so I like to keep up with the maintenance.

So imagine my surprise, when a couple nights ago, I heard the water running. Lots of water. Spraying. Inside the house. What the heck?

I’m really happy that I was home, because if I hadn’t been able to catch it and shut it off, there would have been a flood. A really BAD flood. So what happened?

My house was built in the mid-1980 era, and it has copper wiring, copper plumbing, the usual conveniences. In a copper-piped house, the sink faucets and toilets and such are attached to the water supply using a shut off valve. In the 80’s and 90’s,many of these valves were all one piece, with an attached metal hose than runs from the valve to the toilet (or faucet.) Most, if not all of these are multiple turn valves, ie. you have to turn the valve handle around a bunch of times to get the water to shut off.

Modern examples of the same thing are quarter turn – and while you can get them with an attached hose, most of them are just the valve. The multi-turn valves are prone to leaking, the quarter-turn ones are supposed to be better.

Here’s an example of the old style:

 

These are multi-turn, and the hose that is attached is a flexible buy ambien online forum metal. This type of hose is far more durable than the newer rubber hose covered with metal braid – those have a 100% failure rate in certain applications – but that’s not the issue. The issue here is the plastic end:

If you look close, you can see that the plastic end has failed. Here’s a better picture:

Yep, that is what happened a few days ago, and the full pressure from the water line was spraying in the bathroom. Luckily we caught it, and I was off to see homer about new angle stops and hoses for all the toilets in the house. (In my house the connections to all the faucets were metal, not plastic.)

What happens with the plastic is that over time, it ages and dries out. If an over-eager plumber or home owner tightens the plastic up REAL tight, it is stressed, and over the years as it dries out, it will lose strength and fail, which is just what happened. For a toilet, the seal depends on a rubber bushing, so these don’t need to be super tight. I’m sure some over-tightness contributed to the failure.

I replaced all of them with the nice angle stop valves:

And with newer braided lines:

So one end of this is also plastic, but it should last 25-30 years like the last one, right?

So if you are buying an older home, check and see if the angle stops are like the ones in the first picture. If they are, REPLACE THEM.

 

–PLH

 

Time lapse from Foscam webcams

WARNING! THIS POST FULL OF GEEK SPEAK!

I write on all sorts of subjects, and though I do try to stay in the realm of real estate, as you can see by my last post, I write about other things as well. Last time I wrote about divorce law. Not that it had anything to do with real estate, but one of my marketing efforts landed me some new friends that worked in this field, and I became interested… so I wrote about it.

schedule_20161016-152500My family has a property in a remote area, and for many years we have struggled with internet access. I remember the days of 9600-14400 baud dialup modems, and then we managed to get satellite service, a dramatic improvement but still…

Things started to turn around about 5-6 years ago when the local telephone company offered DSL. We were the very first DSL installation in the area, and we were REALLY happy to have 3 meg down and 400k up. Well, mostly. It was pretty unreliable. It was down for weeks at a time, or so unreliable nothing would work. It was barely possible to watch netflix.

Later, they did upgrade to 5 mb down, but it was still very unreliable, despite much effort by their tech folks to make it better. Portions of the phone line run through a lake, and we are at the far, far end of DSL capability. So it wasn”t great, but better than anything else we had tried.

A few years ago I saw that an area development company was pulling fiber optic cable down the highway, about a quarter mile away. “Wow, it would be so nice to have fiber optic service to our place…” I thought.

After a couple years of schmoozing, we finally inked an agreement a few months ago, and now we have (gasp!) gigabit fiber to our place. Well, the fiber is gigabit, we pay for a much smaller service, because now it is a leased line, and if you ever priced one, well, they are expensive. The nice part is that the bandwidth is not shared, it is ALL yours, with a leased line. Oh, and you have to additionally pay a service provider to give you internet service.

When we got everything working last month, I was eager to add an HD webcam to the mix. My other cameras were installed more than 8 years ago, and they are still working! These were the old Trendnet TV-IP100 cameras with a CMOS sensor. You can check out the web page at http://www.patrickharvey.net/regis

These cameras, the old Trendnet ones, can be configured to upload an image every X seconds, and they will dutifully upload it via ftp to a server of your choice; they also can be configured to upload only a certain number of images, and then roll over to the next image. They create PIC001.jpg, PIC002.jpg, etc. to whatever number you set, then roll over.

After implementing these cameras, I wanted to see a time lapse – so my friend Matt wrote a little animator script that steps through the images from oldest to newest, and shows a little movie. Unlike many webcam web pages that periodically create a time lapse for you, this creates onscreen-shot-2016-10-17-at-3-12-21-pme with the very latest images. The Trendnet cameras are configured to store I think 60 images, or about 5 hours of animation. If you want a copy of the Trendnet animator, let me know, but the Foscam one is more what you want. The directory structure from the Trendnet cameras looks like this:

The Foscam web cams can also be configured to upload images, but they don”t roll over or limit the number of uploaded images or anything like that, and the names don”t repeat, the image name is a timestamp. So it takes a little unix prowess to get a time lapse to work and behave well.

First, you configure the camera to upload an image from time to time. Mine are set for once every 5 minutes. The files are uploaded into a directory, and end up looking like the second directory image here.

r\nscreen-shot-2016-10-17-at-3-10-17-pmNow, that isn”t the most exciting thing, but you get the idea. These are the files we need to deal with. With the first set, the file names follow a set of repeating rules, so it is pretty easy to write a script to display each one in sequence. With the second set, it is slightly more interesting.

First, we need to limit the number of uploaded files. I wrote a shell script that scans the directory and deletes anything older than a day. So it keeps 24 hours worth of files, and it is run by cron every hour. I also have the cameras set by schedule to not upload anything between about 7PM and 6AM since it is dark. The script to delete older files is very simple:

 find . -iname ”*.jpg” -mtime +0 -exec rm {} \\;

You will want to replace the “.” with your fully qualified directory name since it will be run from cron. You can also control the age of files you want to delete with the argument after mtime.  Your crontab entry will be something like 0 * * * * script.sh, which would run your script on the hour each hour.

The next thing we want to do, is to stash the latest uploaded file into a specific filename. Most webcam services like this – it isn”t needed if you aren”t going to submit your camera to a webcam service, but it is easy to do, and again, I let cron run it every hour so the oldest photo is an hour old. The script for this one is a little more complex, note the direction of the quotes.

cp `ls -t -1 ./S*.jpg | sed ”1q”` new.jpg

So this says, first do an ”ls” command looking for files that start with S and end with .jpg (the Foscams upload a file like Schedule_xxxxxxx-xxxxxx.jpg so I use the S, so the script doesn”t match ”new.jpg” since it has no ”S” in it); The ls command sorts them by time and on a one per line basis. This is piped into sed which is told to return only the 1st line and exit. This (ls piped into sed) is within back quotes which tells the shell to execute the command inside the quotes and insert the output into the command line before doing anything else. The rest is just a copy command. So essentially this line gets the latest image uploaded by the camera and copies it into ”new.jpg”. If you have cron run this periodically, new.jpg will always have a most recent webcam picture in it.

nAgain, since cron is running this script you will want to fully qualify the directory/file names.

The other thing that I do with cron is to run another script, just like this one, just after noon every day and stash the latest file into a ”daily” directory so that I can do a monthly or longer term time lapse of the same image at the same time each day to see how it changes over the year. I just set that up, so I only have a couple days worth of data.

If you want to see the nice daily HD animation from the Foscam, click this image:

schedule_20161016-152500

Following is a copy of the animator source, if you want to try it. It is in zip format. It was a bit long and esoteric to insert into the post.

images-php

Enjoy animating your Foscams!

–PLH