rmiles7721

How to Control the Xiaomi Mi Vacuum from HomeSeer

Back about a decade ago we had a Roomba I had received while doing the payperpost . The wife and I liked it and it did a pretty good job. It eventually died as electronics do and I wasn’t able to resurrect it. Eventually it went to the dump. Rather than replace it we just got a normal vacuum. The price of iRobot’s stuff is prohibitive and very much a luxury. A few weeks back I received an email from Gearbest and went to check it out. One of the things on sales was a Xiaomi Mi Vacuum. An extremely good deal so I went ahead and picked it up.

I finally received the vacuum a few days ago. Everything in Chinese, instructions, the voice (it has a built-in speaker), everything. It didn’t take me very long to figure out how to get it working though. The app lets you choose the language you are going to use so that made it a bit easier. I had not planned on doing a write-up of it so if I leave out steps or get something out of order, tough shit.

Since this thing could be controlled via Android remotely I knew that in theory I should be able to control it from Homeseer (my home automation software) with some work. I came across some python scripts and saw that you could control it via Home Assistant (another, free HA software). This “tutorial” is not the only way to do this and there are probably simpler ways to do it in less steps but you have to remember, I am not a coder at all and some of that shit just blows my mind when I look at it.

Anyway, here are the steps I took as best I can remember.

    1. First thing I did was to download the Mi Home app from the play store and set it up. I originally picked the U.S. server during set up but it really didn’t provide a lot of options. After a bit of reading I changed that to the mainland China server which gave me complete control over the vacuum.
    2. Set up Home Assistant. There are only a few things I can’t already control from Homeseer and I also wanted a way to integrate them all so HASS seemed to be the best way to do that. I already have a Raspberry Pi running NodeRED and MQTT for location tracking so figured I would be able to communicate between Homeseer and HASS that way.
    3. Follow the directions here to get control of the vacuum  from HASS. The hardest part is retrieving the access token for the vacuum. You need to be comfortable using the commandline and ADB in order to do so. If you have something other than an Android phone I don’t know any other way to do it. If you have a rooted phone (I don’t) the instructions seem to be even easier. Read through the entire page first before you start following their directions.
    4. The vacuum shows up as a switch on the main HASS page as below. 
    5. In Home Assistant’s configuration.yaml uncomment and set the http api password (near the top of the file).
    6. I seem to be having issues with MQTT and being able to control things back and forth from Homeseer to HASS without using eventghost so I chose to go with a more direct route. It doesn’t offer status updates back to Homeseer unfortunately but it does give me control and uses the HASS api which is why I set the password in step 5 and uses Curl. If you are running HS on a linux PC or raspberry pi Curl is already there. If you run under Windows then download it.  Here is my commandline:  c:\apps\curl.exe -X POST -H “x-ha-access: PASSWORD” http://192.168.86.65:8123/api/services/vacuum/turn_on or /turn_off
    7. In Homeseer create a virtual device called “vacuum” or whatever you want. I made sure to leave the voice control box checked on this.
    8. Create two events. One that triggers when the virtual device turns on and another when it turns off. For the action, choose Run Another Program or Process, browse to Curl and enter the command line parameters above. The turn_on parameter starts the vacuum in cleaning mode and turn_off directs it to go back to the dock.
    9. If you use Alexa, run discovery. Since I left the Voice Control box checked during my virtual device setup Alexa found it and now I can say “Alexa, turn on the vacuum” to start it!

 

I still have several things to do. During my initial setup of the app I set up a schedule for the floor to be cleaned twice a day. I need to remove that and create a scheduled event in Homeseer. This allows for local control and doesn’t depend on control from a server in mainland China. As a matter of fact it’s probably a good idea to block any IPs from China at your router if you have any sort of IOT devices.

I also need to figure out why I can’t just control my Homeseer devices via MQTT. I can send commands from Homeseer to Eventghost and NodeRED but don’t yet know how to trigger HASS switches and other devices via MQTT. Also any MQTT commands that Homeseer receives don’t seem to trigger devices. I have to intercept them in Eventghost and use a Homeseer event to get them working.

Short downtime

My BBS and corresponding internal web site will be down for a while this afternoon as I change my network over. Should be back up in the next couple of hours.

Updated – The BBS itself should be available now as well as the Fidonet mailer. If there’s any issues please let me know. Best way is to shoot me an email.

BBS Guest Access

For the time being I have disabled the Guest account on the BBS. In order to access it from here (or via Telnet) you’ll need to spend the extra 30 seconds and set up an account. Bear in mind that accounts without a valid email address will be deleted. I don’t spam folks with crap but I need a way to get in touch for password resets, etc.

 

BBS Back Online

For some reason the port forwarding stopped working on my router recently. I’ve temporarily fixed the problem so you should be able to get back in.  Sorry about that.

Also, I haven’t been on myself in several weeks so if you have attempted to contact me and I haven’t answered that is why. I’ll log in tonight and respond to everyone. As always, the easiest way to contact me is through email or Hangouts.

BBS Down

My BBS and a few other internal services will be down until  tomorrow evening. My router (or at least it’s settings) has gone tits up and reset everything to default including all of my port forwarding settings. I don’t have the time or patience to mess with it tonight but will fix it as soon as I get home tomorrow afternoon.

Looking through the logs this was apparently the result of a pretty heavy DoS attack.

Wizards of the Coast to Release Digital Toolset

Growing up I played Dungeons and Dragons extensively. The original D&D, Advanced D&D, 3rd Edition, you name it. Really from about 1976 up until the early 90s I was a big fan. Still have most of the books, boxed sets, modules, dice and a crapload of full notebooks where I created my own stuff.

Anyway, that’s what it was all about. Pen & Pencil. Even just getting ready to set up a new campaign took a lot of preparation before you could even begin.

While I haven’t played in years I still occasionally follow news of the game. RPGs are using new technology to help improve game play and make it a little easier and Wizards of the Coast is attempting to join the club by creating D&D Beyond, a new digital toolset to be used with Dungeons and Dragons 5th Edition.

D&D Beyond is being built in partnership with Curse and provides players and DMs with a rules compendium, character builder, character sheets, item listings and more.

Back in 2014 they attempted to release a tool called Dungeonscape and that ended up falling through.

D&D Beyond isn’t ready for a full release yet but if you want to sign up to beta test it once they are ready you can check it out here.

Five Free Home Automation Tools

So you’ve spent all your money on a crapload of smarthome devices and don’t have anything else to spend on software, or you just like tinkering with stuff and discovering how and why they work, or maybe you’re just a fan of not supporting developers for their hard work and want something for free. Actually that was sort of snide. There are plenty of people that support developers but also like open source software, myself included. Any way you look at it we’ve got you covered.

Here’s a short list of free and/or open source home automation software.

First off is Eventghost. Eventghost is not actually strictly HA software and was not designed for that. What is it then? EG is a Windows based automation tool. It can use different input controls such as infrared, wireless remotes, game controllers, keyboards or input from remote devices to trigger macros. It could be used to control a media center computer but it’s also possible to use for a hell of a lot more than that.

My personal use is sort of as a middle man. There is an Eventghost plugin for HomeSeer that I use for the two to communicate. I also use the MQTT protocol for the same thing. I set up some of the cheap Chinese miLight LED light strips in my kitchen. For some reason the app I use with it won’t communicate with the Wifi hub so I set it up on my personal PC and let EG make sure it’s constantly running. I also have an old Snapstream Firefly remote set up and Eventghost intercepts those commands and forwards them to my FireTV as well as to Homeseer. I also use it with Tasker and Autoremote so that I can control my PC remotely if needed. That’s currently about it. I used to use a convoluted system of macros so that Homeseer would know exactly which HDMI input was on and turn on/off the correct virtual devices via my Globalcache IR devices. Currently that is disabled until I have time to really work out how I want it set up.

Anyway, it supports just about any type of PC connected remote receiver you can think of, tons of built-in program controls as well as hardware via serial port, over Ethernet and USB. For a semi-complete listing you can check out this list.

 

Domoticz is an HA system with support for quite a few devices and additional support for 3rd party integrations. It was designed with an HTML5 front end so can be accessed via desktop and mobile. It’s pretty lightweight as well and can run on the Raspberry Pi  as well as OSX, Windows and Linux. The source code is available on GitHub and is released under the GPLv3.

Home Assistant is available on GitHub and is released under an MIT license. It can be run on anything that will handle Python 3. It supports quite a few commercial and open source devices and hubs and also allows you to integrate with Alexa and IFTTT. I’ve been toying with the idea of running HomeAssistant as another secondary (tertiary I suppose) controller in addition to HomeSeer just because of the amount of stuff it supports and will control. I’m only really familiar with Python 2 but I do know that 2 and 3 can run concurrently from what I understand.

OpenHAB is popular among open source folks that are into HA. There is a large support community and it’s written in Java so will run on just about anything, including the Pi. It supports hundreds of devices and software and also has Android and iOS apps. OpenHAB’s source is on GitHub and is released under the Eclipse Public License.

Open Source Automation is the last one we’re looking at today. I’m not very familiar with OSA yet but it looks promising. It runs on Windows only and doesn’t appear to be open source, only free. There seems to be a wide range of plugins and more in development.

Do you use any of these or something else? There several other free programs available, some of which have been around for a long time as well.

Today’s Home Automation Deals

Funny that I wrote about these earlier but Homecontrols is currently having a sale on a few items including Vera. You can pick up the VeraEdge for $69.95 and the VeraPlus for $119.95. That’s a $30 savings over Amazon’s price for the plus. The Zipato Z-Wave RGBW LED Light Bulb is on sale for $39 (that’s $20 off) and there are a couple of other items as well.

HomeSeer also has some items on sale as well, mainly open box and refurbished items. I shop there and have purchased several open box items without any issues. Looks like they currently have about 20 items on clearance including a couple of Global Cache products that I really want. Just not the right time to be spending money considering my upcoming trip.

Smarthome  also has some decent deals as well. I’ve used them in the past but not in the last few years. Never had any problems with them either. The carry quite a bit of Insteon products, which makes sense as the parent company for both is Smartlabs. The Smarthome store isn’t limited to their own products however, and they usually have a pretty large inventory.

Home Automation Hubs and How to Pick One

As far as home automation hubs go, the sky is the limit… as far as cost anyway. There’s a pretty large range in what they can do and it all depends on what you want to do and how technical you are as well.

If all you want to do is control a few items and don’t mind having to open different apps then you are probably good to go just buying those items and possibly even a Google Home or Amazon Echo in order to control them via your voice. Neither of those are true hubs as some web sites claim but for simplicity I’ll include them in the list as well.

Since I brought it up, lets start with Amazon’s offerings first. They range in cost from the original Amazon Echo priced at 179.99, the portable Amazon Tap for $129.99 down to the Echo Dot for $49.99. Each of them has it’s own slightly different characteristics but they all allow you to play music from Amazon Music, Spotify, Pandora, iHeartRadio and TuneIn (sadly Google Play Music is not included.) They can answer questions (using Bing), read audiobooks, give you the news and weather and for our purposes here, control smart devices including devices from Wemo, Phillips Hue, Nest and Ecobee and allow you to connect to hubs such as SmartThings, HomeSeer, Wink and more.

The service also allows you to access “skills”, over 10,000 at last count, most of which are useless junk but there are a few gems there.

I don’t want to fail to mention that if you own a FireTV or FireTV stick you can also access Alexa that way as well with one of Amazon’s voice remotes.

 

Next up is Google Home. Like Alexa, Home is not an actual hub but does allow you to control home automation hubs as well as individual devices. Currently the list of compatible items is shorter than Alexa but Amazon had a two year head start in the area and is currently firmly entrenched in the market. I’m a pretty big Google fanboy and have a Google Home sitting in my kitchen but thus far the Echo and it’s usefulness blows away Home for my family.

Home allows you to play music on Spotify, YouTube Music, Pandora and more. Not Amazon Music of course lol.

While Alexa uses Bing for it’s search engine, Home naturally uses Google. While there are some strange things you can find using Google search I have found that it’s more accurate and inclusive than Bing (fake news aside…)

Home allows you to connect to the Honeywell and Nest thermostats, Wemo, Phillips Hue and Samsung SmartThings. Using IFTTT (Alexa also supports IFTTT as well) you can control ANY other hub or software that has IF support as well. That’s how I have my Home set up to connect to HomeSeer currently.

If you are a Chromecast fan Home will also allow you to control those as well.

 

Next up is the Samsung SmartThings Hub for about $99. A true HA hub, SmartThings is compatible with Alexa voice control as well as Google Home, Leviton Z-Wave switches and modules (as well as those from other manufacturers), Phillips Hue devices, Sylvania smart bulbs, Netgear Arlo and Ring Doorbell, Schlage and Yale smartlocks, thermostats from Honeywell and Ecobee, Bose soundsystems, Keen Home Smart Vents and a ton of other connected Samsung appliances and devices just to mention a few.

There is a dedicated mobile app to access SmartThings as well. I can’t say how well it works as SmartThings is one item I haven’t tested yet.

You can set rules for what you want your devices to do based on time, other device activity (such as motion sensors, etc) and can monitor cameras and other security items.

The SmartThings Hub contains ZigBee and Z-Wave radios and also allows you to control IP based devices. There is also a pretty active community of SmartThings users as well.

I wouldn’t mind hearing from satisfied SmartThings users as to what all it can do as the only ones I know have ditched the platform looking for more robustness in HomeSeer.

 

A hub I am familiar with is the Wink Hub and Wink Hub 2. I own the original Wink Hub and while I had a lot of problems with it early on I think that had more to do with my Wifi network than anything. Since I upgraded to Google mesh networking my hub has been rock solid. While I do use HomeSeer as my main software, it’s mobile interface is crap. I have Wink set up as a secondary Z-Wave controller and use the Wink mobile interface to operate my lights. The app is very simple and elegant and just what the family needs. While setting up a complicated home automation network can be confusingly intertwined it should be simple to operate for it’s main users. If it’s faster to just get up off the couch and do something, why bother to automate it?

The original Wink hub is compatible with devices from GoControl, Nest, Quirky (now defunct), Kidde, Honeywell, Cree, GE, Dropcam, Kwikset, Lutron, Rachio, Philips, TCP, Schlage, Chamberlain and Leviton as well as more.

Wink Hub can control devices that use protocols such as Z-wave, ZigBee, Lutron ClearConnect, Bluetooth Low Energy, Wifi and Kidde.

Currently my Wink Hub is controlling most of my Z-Wave devices, some GE Link lightbulbs and a Pivot Power Genius power strip.

Wink and the Wink Hub 2 are also Alexa and IFTTT compatible as well. I use both to make sure that HomeSeer and Wink are in sync with each other. The original Wink Hub can be found on Amazon for about $60 (you can find it at Home Depot for $50 or less occasionally although they may have run through their stock by now) and the Wink Hub 2 is $96.

The Wink Hub 2 has a faster processor and more memory (512 mb vs 64 mb) so will run faster. The Wifi radio is apparently more powerful as well. A couple of things it has that the original hub does not is auto-discovery of devices and an Ethernet port.

Out of the few hubs I have tested I have to say that I am very pleased with Wink’s products.  While it does not offer quite the level of control and automation I am used to, for an entry level system (and about 95% of the users out there) I would definitely recommend Wink.

 

Next in line is the set of Vera Hubs. My experience with the Vera a couple of years ago was less than pleasant. The software was buggy as hell and I had a very hard time pairing Z-Wave devices with it. X-10 support was less than stellar and the tech support was crap. I guess “less than pleasant” was an understatement.

Anyway, it appears that they have upgraded their hubs and you now have three selections to choose from, each going up in cost based on how many devices you want to control. The VeraEdge lets you control up to 75 devices and supports Z-Wave, the VeraPlus 125 and has Z-Wave, ZigBee and Bluetooth support and the VeraSecure up to 200 and supports the same protocols as the others as well as includes a backup battery. If you have more than 200 devices I guess you’re shit out of luck. Including Virtual Devices and Times, etc I currently have 565 devices in my system.

Vera does have a pretty active community and there are quite a few plugin authors as well allowing for supporting more products than those listed above.

 

Last but not least comes the ones I am much more familiar with… HomeSeer. (yes, that is an affiliate link lol)

HomeSeer started out strictly as software but over the last 20 years has branched into their own line of hubs, switches and sensors. They also sell many other quality products over at their online store. Unlike Samsung and possibly other companies as well, HomeSeer is based in the United States.

Since we are talking about Hubs today let’s take a look at their offerings. As far as all of the hubs I have gone through these are by far the most expensive. You get what you pay for.

The lowest priced hub is the HomeTroller Zee S2. It runs on a Raspberry Pi3 and allows for the use of five plugins, or drivers (Linux based.). technologies it supports includes Z-Wave, Insteon, X10, UPB, PLC-BUS and Modbus. Specifically it support all brands of Z-Wave lighting, Philips Hue and LiFX, Thermostats including all Z-Wave,  Ecobee, Nest and HAI Omnistat, all brands of Z-Wave door locks, Audio solutions from Sonos, Russound, Denon,  Onkyo , Security systems from DSC, Ademco Vista and Elk M1G, Media from iTunes, Windows Media Player, DirectTV, Kodi, Pool/Spa devices from Goldline, Pentair and Autelis. It has 4 USB ports, Ethernet, wifi, a line out Audio port and HDMI. It runs for $199.

All their controllers offer Alexa and IFTTT support

The HomeTroller-SEL and SEL-PRO range from $399-$699. They are built on Linux and support all Linux plugins including all of those listed above. They offer 2 and 4 times the amount of memory and a 32GB SSD instead of the 8GB SD card that comes with the Zee S2. They also have VGA in addition to the HDMI port.

The two top of the line models that HomeSeer offers are the HomeTroller S6 for $899 and the S6 PRO for $1199. Both of these are Windows embedded systems and in addition to the plugins and controllers listed above also add the ability to control items from Lutron Caseta, Lutron Radio RA2, Marantz, Pioneer, GE Concord 4. They have a mic in (for voice recognition) and line out and instead of a VGA port it includes a DVI port in addition to the HDMI that all of them offer.

A more complete listing of plugins and technologies Homeseer supports can be found here.

Aside from the different technologies available HomeSeer has a very robust events system as well as scripting. Some of my events include:

  • if the temp (from my weather station) is less than 46 degrees, turn on the heat lamp in the chicken house
  • if the wattage from my washing machine is above 2.5 watts and drops below that it sends us a message and flashes some lights letting us know the cycle is complete. It also tells me via the speaker client running on the PC in my bedroom and in the living room. Once Amazon allows for push notifications that’ll be one of the first things I add to Alexa here.
  • If I tell Alexa to turn on FireTV it runs on the television, changes the HDMI input to the correct one (in my bedroom.) If the TV in the living room turns on, the JVC receiver also turns on (or off)
  • If there is motion in my yard and it’s after sunset the outside lights come one and then turn off five minutes after no more motion is detected. Which ones come on depend on where the motion was. When I open the door in the morning my foyer light, porch light and driveway lights all turn on for 15 minutes.
  • My air conditioner is old and sometimes will kick the breaker during the summer in high usage. If the temperature goes above a certain setting it sends all of us and email and text so we can reset it.
  • If the doorbell is run and we are at home, lights flash and the speaker client lets us know someone is there. If we aren’t at home it just kicks on a few lights and sends us a text.
  • Overall I have a couple hundred scripts running. Most are pretty simple but some are fairly involved.

One thing I almost failed to mention is the mobile interface. Homeseer does have their HSTouch plugin, included in Pro versions and available for purchase as an addon as well. There are clients for iOS, Android and Windows. There are a lot of people that swear by it. My own experience with HSTouch is less than stellar. I found it buggy, unresponsive and a pain in the ass to use. The designer is also difficult to use and non-intuitive. It all seems like beta software that was never finished and anything you say to the developers falls on deaf ears. I keep hoping that they will eventually move to an HTML5 model and update their mobile apps to be on par with other hubs. Until then I’ll keep using Wink or one of the several 3rd party solutions. That having been said, HS is still the strongest HA software packages I’ve used and mobile access aside it’s still the best.

These are not the only hubs available but they seem to be the most popular. Do you have one that isn’t listed that you prefer? Let me know.

 

 

How to get into Home Automation on the Cheap

Unless you’re like me and spend the next 17 years picking up odd bits of equipment here and there and slowly build up your Home Automation system, one of the biggest barriers to getting introduced to Home Automation is the cost. It’s most definitely not a cheap hobby. If all you want to do is pick up a few lights to amaze your friends (home control, not automation) then it isn’t too bad. If you truly want to make your home smart it can be quite prohibitive.

In that vein of thought here are a few ways to get introduced to home automation (HA) that won’t break the bank.

 

Cree  Connected Dimmable LED Light Bulb At just under $15 per bulb these are one of the more affordable controllable light bulbs. No color changing and no extra bells or whistles. They require some type of external hub in order to control (which we’ll get into on a later post)

 

Philips Hue White A19 Starter Kit An excellent purchase and good way to get introduced to HA. It’s also compatible with most, if not all, hubs and software (some via plugins) if you want to integrate your system later. These are the basic white LED bulbs but they also include the Hue bridge meaning you can control them via an app on your phone, through the meethue.com website and with Alexa (or Google Home.) Just under $70.

 

INSTEON Home Control Starter Kit An older home automation protocol, Insteon is more reliable than the old X10 stuff but still pretty relevant. At $49 this is a good way to get starter. This beginner’s kit includes the Insteon hub and two dimmer modules. Just plug your lights in and set up the hub and you are good to go. I went straight from X10 to Z-wave and never had much experience with Insteon but know quite a few people who did and they are very happy with it. This hub allows you to set up automation scheduling and expands to let you add both Insteon and Nest thermostats, light bulbs, switches, ceiling fans, etc. It is also compatible with the Amazon Echo and can be controlled via your phone.

 

Echo Dot (2nd Generation) While not a true HA device the Echo and it’s smaller cousin the Echo Dot allow you to control connected HA devices via voice as well as a ton of other things, some pretty neat and others….that are quite useless. $49.99

I have the original Echo as well as four Echo Dots scattered through the house and while I like to talk a lot about not counting on the “cloud” for your HA system, Alexa is probable the most important and useful piece of equipment I have added to my set up in the last decade. Most HA hubs and software are compatible with Alexa as are most of the connected devices. If you just want voice control of a myriad of devices and apps but want to tie them together without true automation the Echo Dot is the way to go. Over $100 cheaper than the original echo makes it a great purchase.

If you only want to use it for voice (and speech responses) it can be used as is. If you also want to be able to play music I recommend connecting it to a set of speakers via Bluetooth or the 3.5mm jack.

Controls lights, fans, switches, thermostats, garage doors, sprinklers, locks, and more with compatible connected devices from WeMo, Philips Hue, Samsung SmartThings, Nest, ecobee, and others.

There are also several other cheap ways to get into the hobby including Wemo switches, TP-Link plugs and others but these are a good start. Next time we’ll talk about Hubs and a quick intro into actually automating all of the devices you’ve managed to pick up.