Tag Archives: automation

Home Automation Update

2017.

As with all things that change, much remains the same.  The past several years have seen an explosion of new products in the “Smart Home” market, yet no clear winner has emerged, resulting in a landscape that is even more fragmented and beset by compatibility issues than ever before.  Whereas 5 years ago one was faced with a choice of several protocols (Z-wave, X10, ZigBee) and control software options (HomeSeer or Vera) or expensive, bundled turn-key solutions like Control4 or Savant, the product offerings are now much more diverse.  Almost every large tech company (Google, Apple, Samsung) and many home appliance stores (Home Depot, Lowe’s) have their own brand-name devices, home automation hubs, and cloud subscription services.  Nothing as ambitious as Google Home (the platform, not the smart speaker they launched this year) has materialized, and because no one ecosystem has gained wide acceptance, the consumer is faced with the unfortunate choice of settling for the limitations of a single ecosystem that may be lacking in certain device modules or software features, or going down an ever more harrowing DIY path and dealing with compatibility issues as they try to integrate products from the above manufacturer’s offerings into a third-party control network, hoping that the underlying protocols are still compatible.

Left with the choice of investing an a single ecosystem that may – and likely will – become obsolete (and unsupported?) within less than a decade, I have decided to stick with the tried and true – HomeSeer and Z-Wave – for the foreseeable future.  While lacking some of the nice flourishes like well-designed mobile apps and effortless compatibility, the endless rule-based configuration and extensibility of HomeSeer offers true Automation where competing “consumer-friendly” products lean more towards glitzy remote-control.

In the past few years, I have added some additional functionality, mostly through software, that has improved the overall experience of my setup.  The mantra is simple: unseen, unheard.  Anticipate, react, but do not interfere or present features that add little value.  What does that look like?

Alexa

My glorified smart alarm clock.  Really.  While the other features are nice, and I do enjoy the occasional customized morning briefing, using the Echo as an alarm clock has made a notable improvement in the daily routine.  With IFTTT integration, Alexa can trigger events in HomeSeer, and trigger phrases can be customized.  I can say, “Alexa, trigger all lights out” to turn every (connected) light in the house out, or “Alexa, trigger air on” to turn on the AC.  Rather than fumbling with a crappy old alarm clock or relying on my phone, I can say “Alexa, set alarm for 5:25 AM” and it is done.  The time is maintained accurately via internet connection, and daylight savings is accounted for.  Better yet, IFTTT can respond to the alarm going off as a trigger.  This allows the lights in my bedroom, hallway, and living room to automatically come on when the alarm goes off, and (optionally) the coffee pot to turn on with a 10min delay for me to finish a shower,  Pretty cool.

Presence

One of the requirements for true home automation is the accurate tracking of presence.  The system must know who is home in order to respond appropriately.  This is actually very difficult to implement, and there are many ways of going about it, including motion sensors, Bluetooth beacons, pinging each household member’s phone while connected to the Wi-Fi network, or using GPS position reporting from an app.  The latter two options offer the additional granularity of knowing WHO is home (assuming they keep their phone with them) and the last option gives the ability to set multiple trigger zones on a map with the goal of anticipating one’s arrival home and thus responding BEFORE they arrive, allowing for heat/AC to already be on, alarms to be disabled, etc.  This is what I have implemented with one of my favorite iOS apps, Geofency.  It allows multiple “Geo-Fences” to be set up, with accurate cell and GPS based tracking of the entry and exit into and out of set geographical regions, with associated trigger actions.  In this case, like with Alexa, IFTTT is used as a bridge to connect with HomeSeer and set “Home” and “Away” status.

Security

ADT?  pfft.  With no additional hardware, and zero monthly subscription fees, I have an adequate security system by simply utilizing the existing presence features described above with alternative events to be triggered when either of the in-house motion sensors (entryway and stairway) detect motion.  Normally, these are used to turn lights on, but when no one is home, they send an alert text that there is activity in the home.  While I have experimented with cameras, there are just too many false positives (headlights flashing through a window, lightning, birds etc…).  Simple IR sensors are much more reliable at detecting humans and humans only.

HVAC

Here is where the cost savings comes in to save the day and pay for all the cool stuff described above.  Presence sensing and a connected thermostat (no, not a Nest, just a simple, dumb, Z-wave thermostat) allow for the heat and AC to be on only when home, and to dynamically react to changing outside weather conditions, bedtimes, and early/late mornings.  The cost savings, especially with air conditioning, is in the range of hundreds of dollars annually.

Conclusion

With the exception of voice control via Alexa, little has changed from the hardware standpoint.  Sure, a few more lights are attached via Z-Wave outlet, thanks to overall lower prices.  Several 4-button Aeon MiniMotes have been added for convenience of turning said lights on and off singly or in groups.  But the rest?  Mostly better software integration.  Better presence detection has enabled a much less distracting level of automation, where the house reacts to certain events reliably and appropriately, but is still able to be overridden manually without hassle.

While the lights don’t change colors and doors don’t lock and unlock themselves, I am happy with this fairly unobtrusive setup until something better comes along.

 

Category: Technology | Tags: , , ,

eBay Bulk Listing for Free with File Exchange

Posted on by 0 comment

eBay’s website has become a cesspool of CPU and Memory intensive Web 2.0 sludge, which makes using it to do anything which benefits from parallelization a nightmare.  Bulk listings?  Pay a third party webapp for the privilege.  Or not.  eBay has an obscure backend involving uploading CSV files to create or edit listings, and even leave feedback in bulk.  You just have to figure it out.

So, here we go:

Selling Workflow

  1. Take photos
  2. In Lightroom, rotate, crop and export <1MB preset
    1. delete originals from disk
  3. FS Viewer fullscreen: F2 Rename
  4. Excel Update Quantities, Pricing
    1. Download current listings
      1. http://k2b-bulk.ebay.com/ws/eBayISAPI.dll?SMDownloadRequest&ssPageName=STRK:ME:LNLK
      2. Active—FileExchange—Revise Price and Quantity—All
      3. Link sent to email
    2. Adjust names, prices
    3. Adjust Quantities
    4. FORMAT Item ID + Transaction ID to number (use format settings menu, change decimal places to 0)
    5. Save, confirm CSV
    6. Upload
      1. http://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUploadForm&ssPageName=STRK:ME:LNLK
    7. Verify (DL report)
      1. http://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUploadResults&ssPageName=STRK:ME:LNLK
  5. Excel New Listings:
    1. Template from “Listed.xls” containing previous listings
    2. Category
    3. Title
    4. Brand
    5. Verify
      1. Condition 1000-New
      2. Format
    6. PicURL-Boxart
      1. hardlink
        1. https://www.google.com/imghp?safe=off&source=lnms
      2. FTP
        1. Use predictable link formatting
      3. dropbox public or imgur (unreliable)
    7. Description (same for all SW)
    8. Price
    9. Quantity
    10. SAVE AS CSV, comma delim
    11. Upload
      1. http://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUploadForm&ssPageName=STRK:ME:LNLK
    12. Verify (DL report)
      1. http://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUploadResults&ssPageName=STRK:ME:LNLK
    13. Copy to Listed for templates

I can post a template for this if anyone is interested.

 

Feedback Workflow (mark as shipped, positive FB)

  1. Download “sold and not shipped”
    1. http://k2b-bulk.ebay.com/ws/eBayISAPI.dll?SMDownloadRequest&ssPageName=STRK:ME:LNLK
  2. Copy Item ID + Transaction ID columns to sold template.
    1. format Item ID + Transaction ID to number (use format settings menu, change decimal places to 0)
  3. Upload
    1. http://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUploadForm&ssPageName=STRK:ME:LNLK
  4. Verify (DL report)
    1. http://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUploadResults&ssPageName=STRK:ME:LNLK

 

Category: Technology | Tags: ,

Direct DC Power to Smartphone – No Battery

This seems like it should be simple.  Phones of all variety – Android, Apple, “smart” and “dumb” use 3.7-3.85V single cell lithium-ion batteries.  Just attach a 3.7V DC adapter to the (+) and (-) terminals of the phone and you’re good to go, right?  Wrong.  A bit more trickery is required, and some additional finesse is well worth the effort.

Two things are absolutely essential for this.  First is a DC adapter with 3.7-4.2V output rated at 1.5A or greater.  I used a DC-DC adapter for 12V input and 3A, 3.7V output, available on eBay.  If you don’t mind a bit more work, this step-down converter is fully adjustable by removing the heat shrink and turning a screw (while connected to a multimeter), allowing for 12V input and your choice of <10V output, and is actually what I ended up preferring to use.  An AC adapter may be more convenient, depending on the intended use, though I had a hard time finding an inexpensive option with sufficient output (1.2A was the best I found).  12V AC-DC adapters are cheap and plentiful, so you could always just combine one of those with either of the DC-DC step-down converters from above (which could likely power 2-3 phones in parallel).

2015-07-07_1-40-40

The second item needed is a resistor.  This bridges the ground and BSI (Battery Status Indicator) contact.  If a fourth contact is present, this is likely for NFC, and will be left alone.  For samsung phones, the BSI pin is typically found between the (+) and (-).  The purpose of the resistor is to identify the battery as compatible with the phone and may also assist in reporting the capacity / charge level / temperature.  The 68K resistor I used, plus the 3.7V output from the adapter made my Galaxy Nexus report a battery level of 14%.  I also tried a 100K resistor, which reported a similar, or slightly lower, capacity.  With further testing (using the adjustable step-down converter), it appears that the input voltage of the battery, rather than resistor size, determines the phone’s reported battery level, through a resistor is still necessary for the phone to recognize the battery and power on.  I ended settling on 4.15V, which made the phone report 100%.

FYGRTN8HVC1FEZE.LARGE

If you want a removable solution, you can construct a “faux battery” using your scrap material of choice and a microSD to SD card adapter – if you’re anything like me, you have an unused one laying around.  There’s a good example of this over on Instructables:

fauxbatt

Of course, you could just solder directly to the contacts on the phone, which may not be a bad idea if the modification will be anything approaching permanent.  The “faux battery” solution can be made quite sturdy, but nothing beats solder for peace of mind.

This solution works great for in-place installations such as home automation remotes, fixed displays and long-endurance photo / video, cellular hotspot and communication uses.  Unfortunately, for a hands-free implementation in a car or similar situation where the phone would ideally boot up when power is connected, additional work will be needed, as simply connecting power – just like inserting a new battery – does not result in the phone turning itself on.  You’d likely need to disassemble the power button and simulate a “momentary press” using capacitors / relays, which is beyond the scope of this post.  I may revisit this topic though, as I constructed such a solution back when I made a CarPC (before Android and cheap tablets were a thing).

 

Category: Technology | Tags: , , , ,

Space Heater Controlled by Z-Wave Thermostat

A Case Study in Home Automation

In lieu of actually writing a more comprehensive post about my foray into home automation, I decided to begin instead with something more simple: a problem, and its overly-complicated, but totally awesome solution.

My bot-so-smart source of warmth.

My not-so-smart source of warmth.

I currently depend on this heater to keep my basement dwelling habitable.  While the furnace that heats the upper levels sends a token amount of semi-warm air in my general direction, it doesn’t seem too concerned with my comfort.  So, like most people in this situation, I use a glorified toaster to stave off hypothermia.  Actually, “glorified” is being a bit generous – electric space heaters are basically toasters that can’t even handle the simple task of making toast.  Their sole purpose in life is to consume as many kWh as they can get away with and not trip a circuit breaker in the process.  In my experience, they often fail even at this.  In the same way that you would not expect a toaster to keep your room at a constant 70 degrees (while also browning your morning bagel), it soon became obvious that the “thermostat” knob on my space heater contained the functionally of a particularly bland toddler toy.  And so I turned to HomeSeer.

The Solution

"Smart" Thermostat - powered by Z-Wave

“Smart” Thermostat – powered by Z-Wave

How to get one’s thermostat to control not only the furnace, but also one (or more) remote space heaters?  The amature electrician might do something like this, wiring the two directly together, but I didn’t want “wiring” – I wanted wireless.  So the geek instead turned to Z-Wave (a wireless home automation protocol) and HomeSeer (automation software), attached the space heater to a GE 45604 appliance module, and set up some events to define the relationship between thermostat and heater.  Because HomeSeer constantly receives information about the status of the thermostat (current temperature, set point, operating mode etc…), it was easy enough to use these conditions to tell the heater when to turn on or off via the Z-Wave module it was plugged into:

  1. If thermostat is “heating” –> Turn space heater on.
  2. If  thermostat is “idle” –> Turn space heater off.

 

Really.  It was that simple.  The beauty of this simplicity, is that changing the set point using the buttons on the thermostat would also affect the space heater – no extra programming needed.  However, there was still the issue of occupancy.  I didn’t always want the space heater sucking its 1.5kW just because it was less than 70 degrees.  The first step to solving this issue was easy enough:

3. If time is between 11:00pm and 6:00am –> Remain off.

That solved the problem for the night hours, but what about when I was away from home?  This required a bit of trickery requiring my Android smartphone and Tasker.  I created a profile in Tasker that would detect when the phone was connected to the home’s Wi-Fi network.  As long as it remained connected, it would run a python script (using SL4A) every 5 minutes that activated a virtual device in HomeSeer.  This acted as a sort of “dead man’s switch”, as HomeSeer would only register me as being home if the aforementioned virtual device had been triggered within the last 10 minutes:

4. If “At Home” is ON –> Allow heater to be turned on

Any glitch in the process would result in the heater turning off, rather than remaining on – a measure of safety.

The Results

As you can see in the graphs below, this implementation allowed a very fine control of my room’s temperature – it fluctuates between 69 and 70 degrees just as it should with a set point of 70.

HomeSeer Interface with relevant devices displayed.

HomeSeer Interface with relevant devices displayed.

From the small amount of sensors in place – even if the 2 motion sensors are ignored – a wealth of data can be collected.  The room temperature for the past 24 hours can be displayed as a graph, as well as a comparison of outside versus inside temperatures from the past week (outside temp retrieved from online).  The total time the heater has been on during a given day or week can be logged, giving an accurate estimate of the electricity costs involved in running it.  I can also disable the bottom device, “Electric Heater TStat” if I want to temporarily unlink the two devices.

Hopefully this provides an interesting example of what can be done with even the most basic of Home Automation setups.  I’ll try to delve into this topic further in a later post; there are some really cool implementations of automation I’ve come across, as well as other “problems” of my own that I’ve managed to solve in interesting – if a bit over the top – ways.

Saving Battery with Tasker

Posted on by 1 comment

The Galaxy Nexus is notorious for its mediocre battery life, especially when operating in an area with marginal 4G coverage.  Finding that my phone would frequently attempt to maintain a cellular data connection even while not being used, I decided to remedy the issue with BattSaver, my creatively-named Tasker profile designed to minimize power usage from the phone’s radios while not in use.

Components

BattSaver comes in 4 parts, either due to necessity or my own inefficiency.  Still, it is quite simple, and the results speak for themselves.

Left: Samsung Galaxy Nexus LTE failing || Right: Running BattSaver Tasker profile

Left: Samsung Galaxy Nexus LTE failing at being a phone || Right: Improvement with BattSaver activated

There are many of these profiles out there, such as this one on XDA, but I found them to be  either too complex or overly rigid.  While one can attempt to plan for every usage scenario, it eventually becomes so burdensome and inefficient to do so that the whole point of automation is lost.  I don’t, for instance, want to manually add every Wi-Fi network I use to the profile so that it can trigger when away from home.  This is an inconvenience, but worse, it is inflexible.  What if I go on a trip, or change my routine?  I do not want to have to manually update my phone to keep the task working.

Here, as with most things, I’m a fan of the KISS (keep it simple, stupid!) principle.  My profile may not have as many functions, but it is predictable.  BattSaver requires no attention aside from enabling or disabling it, and is –  I’ll bet – at least 90% as effective.

So, back to the 4 components:

Batt Saver Trigger

This profile checks to see that the phone is not in use, as defined by the following conditions:

  • Screen is OFF
  • Charger is disconnected
  • Phone is not at home

If these are met, Batt Saver will activate.  You can also set a minimum percentage the battery must reach before the profile engages – I typically use 25%.

Batt Saver

This is the main profile, which enables airplane mode as long as the above conditions remain met, and no phone calls are ongoing.

Battery Status

This maintains a variable (%BATTLVL) to monitor the battery percentage and use it as a condition in Batt Saver Trigger.

Batt Check

Finally, we need a way to periodically check for messages and email while the battery saver is running.  This turns the radios on every 30min by interrupting Batt Saver for one minute – enough time to connect and send/receive data.

Profiles

As usual, here is a zip of the profiles and tasks if you wish to import them.  Aside from Tasker, you will also need the free version of SecureSettings installed.

The only modification you will need to make is to change or remove the condition in Batt Saver Trigger that checks if the phone is at home.  I use a variable that is set by another profile that monitors the nearby WiFi and Cell towers, so you can either create a similar profile and have it change the %AT_HOME variable (1=yes, 0=no), use a different condition, or just delete it.

Category: Technology | Tags: , , , , ,

Bluetooth Trigger for Dash-Cam

Last week, I wrote about my experience using an old Droid X as a dash-cam, Russia-style. With Tasker and DailyRoads Voyager, the implementation allowed for completely hands-off operation; recording video only when the car was on.  The only issue was that I had needed to use the power source as the trigger for letting Tasker know when the car was operating.  This was fine until Winter struck here in Michigan, spelling doom for the battery, even with Airplane mode engaged.

I had the capability to run continuous power to the phone from the car’s own battery, but then what would trigger Tasker?  I had thought about trying to make something work with the GPS, or even a relay, but each had its pitfalls or inconsistencies.  Fortunately, Slickdeals offered a solution to the problem when Best Buy held a fire-sale for the Rocketfish Bluetooth Speaker for iPad.  $5 you say?  I’ll take 3!

A bit of dis-assembly later, and I was left with this:

Disassembly required.

Disassembly required.

Now, there is nothing too special about this specific product.  I imagine any Bluetooth audio device – including headsets – would work for the task, provided that it do three things:

  1. After removing the included battery, it must still power up and attempt to connect when USB power is attached.
  2. Pairing settings must be saved when power is removed – despite the lack of battery.
  3. If you decide to leave the battery attached, it must still power down immediately after power is removed, without any button presses required.

 

I suspect many Bluetooth devices will meet these requirements, but I can only vouch for the one I tried.

bt_adapter

Bluetooth audio receiver module, Rocketfish RF-TRSPIPAD

So, once you have the board and are satisfied that it will function properly, it must be connected to a USB car adapter that powers on/off with the car.  Pair the phone up with the Bluetooth device, and create a Tasker profile to start DailyRoads Voyager when a pairing is made.  I have made my profile available below.

 

And it’s as simple as that.  No more dead batteries, and everything works just as well as before.  I noticed no lag at all in detecting the Bluetooth connection, even after days of it being powered off.  It is also worth mentioning that there has been no noticeable impact on the car’s battery, despite the phone running all the time with the radios on (but screen off).

100% hands-off operation, working flawlessly.

100% hands-off operation, working flawlessly.

My perspective on Automation

Have you ever worked or studied in a building with automated motion-sensing lights?  The kind that turn off after an absurdly short amount of time, forcing you to get up and make wild gestures, like some Native American performing a rain-dance; begging for electricity to make its return to the cold, fluorescent lights above?

indian-rain-clouds

How about using the “thermostats” in similar industrial settings – the kind that are conveniently placed in every room, yet seem to do nothing when you actually try to use them.  The ones at my school go as far as to paradoxically disobey commands, blowing a cold, air conditioned squall as soon as one dares to increase the setpoint to something above frigid.

Although I have since thwarted both of these sources of daily ire, finding the manufacturer’s  product manuals and methodically crippling the settings of the occupancy sensors that were at the root of their willful disobedience, the behavior of these “smart” appliances epitomize all that can go wrong when implementing Automation of any sort.

My Take

Automation is meant to save time and money, but should NEVER do so at the cost of convenience.  If you find yourself having to perform new or additional tasks after implementing a “smart” system, YOU’RE DOING IT WRONG.  As with most problems involving three different-but-related factors, you can pick any two to improve at the cost of the third. Want something that is both convenient and saves you time?  Expect to pay for it.

Using the automated lighting example, this solution would involve using a motion sensor to turn the lights ON only.  Thus, you would never have to use the light-switch – saving you time. The lights would never turn off when you didn’t want them to, maintaining convenience   Your electricity bill, however, would skyrocket.  It’s just not a perfect world.

Practically, the solution involves balancing the three factors, rather than pursuing just two of them and completely sacrificing the third.  Set a longer delay on the occupancy sensor before it turns off, and crank up the sensitivity to the point at which it can practically see you exhale a deep breath, or blink an eye.  It may still screw up, but not nearly as often.  The electric bill will still be higher, but only slightly.

Category: Technology | Tags: , ,
fapjunk