Vodden's HA Poject-From Start to Finish

Take a look at RexBeckett’s blinds controller. He did a nice job of documenting this kind of project with a multi button remote.

There are hardly any HA problems that cannot be solved with more money!

I did look at that. An extra Hampton Bay remote is only $10 on eBay, so after exhausting all other routes, it may be the one I end up taking.

Cool. If it has dip switches for different fans, you may be able to control multiple fans with the same electronics, if you have more than one.

These fans are occupancy dependent, so I’d save the effort and and expense of the Current sensor until after you get the remote working. You may be happy turning it on with motion and off with lack if motion.

Yes, they do have the dip switches so the same commands can be used for both fans.

EDIT: I could also control different fans independently if I so wish :wink:

Yup ;). You got it.

Looks like I’m starting to get the hang of this PLEG thing. It’s an excellent tool and @RexBeckett’s manual makes it super-easy to use. I thought I would be tearing my hair out trying to figure this out, but thus far, it has been a breeze! Worth every penny!

I figured that I would start my scripting off by getting occupancy based triggers working first. After looking into/discussing this with others, I decided that I would use a multi-switch to toggle thru the four states of occupancy based on a few logical arguments; both home, both away, me home, missus home. I used the iPhone locator for my home/away trigger, but the missus has a bit of ‘bigbrotherphobia’ so I have not yet convinced her to let me use her iPhone for location information (this would require her to turn on location services for the iPhone Locator app, to which she’s slightly apprehensive), so instead I am using her schedule as her home/away trigger with the Google Calendar Plug-in. Not that either matters, since besides the grocery store, we’re very much home-bodies so it will be minimally inaccurate. I’m hoping that once she sees that I can arrive home without unlocking a door or disarming the alarm, and having lights turn on for me, etc., she will change her mind.

I created a few other instances of the Google Calendar, One that follows my Day Shift schedule, Night Shift Schedule, and Statutory Holiday schedule. This is in addition to my missus’ Work Schedule. The latter were used to determine her occupancy, and my schedules will be used to determine lighting scenes in the future. I think. They are there if I need them, and can disappear if I don’t.

I managed to get the multi-switch firing correctly after a few minor hiccups, but it took a little bit of referencing and tweaking. Once again, every issue I encountered was addressed somewhere in the forums.

I tweaked the polling settings iPhone locator to take it easy on my battery as well. It was using default settings which polls every minute while at home, so if it was unmuted, it would kill my phone in very short order. I have distance polling set up which is working much better. I have also created another Locator device that uses my work as home, so I can create multiple polling schedules and mute/unmute based on if I’m at home or at work. Heading to work tonight, so I will give it a trial run. I’m guessing a bit of tweaking will be required, but I will have it tuned in by the weekend. This will further alleviate battery drain on my iPhone.

I created a test scene to see if I could get the front door to lock and unlock with a scene based on the multi-switch settings and it worked! Initially the multi-switch wasn’t toggling off, so it created some issues, but once that was sorted, the lock/unlock works perfect!

I’m also expecting some lighting devices this week, so hopefully I can get a few more devices on my controller and start working on some lighting scenes. Most of these are intended to be motion activated, but I have all the devices already set up on the Vera even tho my panel is yet to be installed, so I should be able to do it. I can also put the panel back on the test bench and test triggers to be sure everything is working once the lighting controls are in place.

My first Arduino project parcel arrived today as well. Now I get why they are called Pro Mini. These things are [sub]tiny[/sub]!

Every picture makes them look twice as big as they really are, so my soldering skills are going to be put to the test!

Yeah. Then you’ll get sensors that make that Pro Mini look like a Mega!

I really appreciate what you’re doing here, I’m finding it all very interesting.
Is there any way you could go into more detail about how you’re configuring things like your multiswitch etc.? I think even if it doesn’t help me, having that stuff here on the forum as a reference would likely help someone.

[quote=“prim8, post:29, topic:180819”]I really appreciate what you’re doing here, I’m finding it all very interesting.
Is there any way you could go into more detail about how you’re configuring things like your multiswitch etc.? I think even if it doesn’t help me, having that stuff here on the forum as a reference would likely help someone.[/quote]

@prim8

I would be glad to elaborate a bit on the multi-switch functions. After re-reading my post I realized that I kind of skipped over the multi-switch programming, probably due in part to my awe and amazement of how small my Arduino’s were when I picked them up lol.

Making the multi-switch function was the easy part of the process, the challenge was writing the PLEG arguments correctly.

I used 4 buttons on the multi-switch to reflect the 4 states of occupancy at my home regarding my missus and I.

They are:

Both Home
Both Away
Vodden Home
Missus Home

I do have a son at home as well, but at this point he’s with one of us all the time and never alone, so he doesn’t factor into the occupancy logic.

I named the switch and the buttons on the control tab.

I then defined these buttons as Radio Buttons, meaning that when one button gets activated, the others in the group will turn off. This was a stumbling block for me as I ‘thought’ that in order to define the Radio Button feature, you simply entered the button numbers in the ‘Radio Button’ box you wanted as such, but this is not the case. I did a little reading and found that you had to group the buttons in the text box via brackets, so (1234) would make buttons 1-4 radio buttons. I also discovered you can make multiple groups, (1234)(56) etc. I grouped them all together, 1-8 even though I know I’m only using 4, but they are all being used for occupancy, so if things change in the future and more arguments are introduced, they area already grouped correctly. I found this information here:

http://forum.micasaverde.com/index.php/topic,14453.msg110172.html#msg110172

I also attached my PLEG conditions and PLEG actions screen captures to the post where I talk about programming the buttons previously.

Yeah. MulitSwitch is pretty great. I currently have a couple of them filled up. Like you Vodden, most of them are place holders but I do have two that I need to activate manually because I haven’t found a way to automate them yet. That is for when I’m sitting in the yard I have one that keeps the music from turning off and I have one to signify that motion shouldn’t turn the lights on in the kid’s playroom for when they’re watching a movie at night. The rest reflect occupancy. for example; the Mrs. phone like to disconnect from WiFi occasionally so all logic which is dependent on her being home relies on the state of the switch, which doesn’t turn off until she’s not been connected for 10 minutes or something like that.

If you think the pro mini is tiny to solder with, wait until you have to solder surface mount chips! Just had my hand in soldering over 75 surface mount diodes for the first time. Steady hands, tweezers and Flux are your friend!

  • Garrett

[quote=“garrettwp, post:32, topic:180819”]If you think the pro mini is tiny to solder with, wait until you have to solder surface mount chips! Just had my hand in soldering over 75 surface mount diodes for the first time. Steady hands, tweezers and Flux are your friend!

  • Garrett[/quote]

Funny you mention that…Watched a tutorial on YouTube about SM yesterday

Verdict:

NOT READY

:o

Lots to report:

PLEG is amazing! After getting the occupancy multi-switch functioning correctly and creating the second iPhone locator for when I am at work, I moved on to getting the locators working correctly by turning off the home locator while at work and vice-versa. It took some trial and error and a few days of going back and forth to work, but today I finally managed to get it to behave correctly using PLEG. One aspect of PLEG I found very useful was the ‘Status’ button on the ‘Control’ tab. This opens a separate window (see attached) with a list of all triggers, schedules, device properties, conditions, and actions. It also lists the last True and False time stamp as well as present state. This has proven itself to be a very valuable tool when troubleshooting logic issues and has saved me a lot of time and frustration.

With PLEG controlling my iPhone locators correctly, I barely notice a difference in my battery consumption. I have polling set to once every 10 min when I’m at home or work, so that doesn’t consume a lot of power. I set up custom polling maps on both locators to make it work with my set of circumstances. Besides the locator function itself, I find the custom polling maps to be the most valuable feature of the plug-in, due to the fact that continuous polling can and will take a toll on your battery life. Once I get my driveway sensor installed, I’m going to tweak the PLEG to do a poll every time it is triggered, for instant occupancy based automation scenarios. The driveway sensor will be positioned at the edge of my home/away boundary so if done correctly, it could almost eliminate time/distance based polling.

I also received 9 Linear switches/dimmers/controllers this week from HAWorld. I won’t be able to install any of them until next week, but I’m looking forward to getting my lights on HA. This isn’t all of the lighting controls required, but it’s a healthy start. I also plan on using Aeon Labs micro dimmer/switches for different applications, as well as some Arduino LED dimmers for my 12V lighting.

Parts for my Arduino project are slowly arriving. I have received all my Arduino boards and my radio receiver, LED’s, MOSFET heat sinks, and a few other bits and pieces. Part of the project was using a transmitter/receiver to control my ceiling fans, but if you have been following this thread, you would be in-the-know about how those plans have changed. Now the plan is to work with @RexBeckett and take a similar approach as he did with his WifiRTSM Somfy remote. You can find that project here. All of the other aspects of the Arduino project have stayed the same, and I will be relying on it heavily for my 12V lighting control.

After doing some experiments, I’m thinking that just a simple ping to the smartphone on the home net is the way to do home/away. I’ll be interested when you get your system installed if you find more complicated approaches adds value or just confusion.
You mentioned pulling cat 6. I’m not aware of any advantage of cat 6 over 5e. Looking very long term there might be an argument for adding expensive 6a in a few locations. But if you live rural you may never get fiber, so even that may be overkill.
If I had my walls open today I would pull some cable for one or two POE access points. 5ghz doesn’t have much range.
I’m surprised you picked an android tablet as a controller when you have iphones. You will want to use similar UI UI designs on both. I have both homewave and roomie on smartphone and tablet. I’m not making an argument for Apple, just standardization. If you’re using Arduino you will have more need for smartphone/tablet use for everyone.
Thanks for sharing your project.

I don’t have land based internet, instead use 3G, soon to be upgraded to 4G tower based technology. I have been using this for years, and it steadily gets better. Funny how the term ‘we will never need…’ gets used, but lets face it, we have no idea what tomorrow’s technology has is in store for us. I would rather be one step ahead than one behind, and the small difference in price from cat 5e to cat 6 isn’t worth losing sleep over. It isn’t cat 6a, but I figure my cat 6 won’t be sent into the shadows of inadequacy for a while.

This is more a pricing decision than anything. I am a big fan of Apple products, but if I plan on sticking it to the wall to run one app, I choose the device that carries the best value and that has a hardware/software profile tailored to the application, eliminating Apple. It would simply be overkill and a waste of a perfectly good Apple device!

The Arduino/Hampton Bay/Ethernet/RexBeckett RF Ceiling fan project PART 1

I have all the pieces that I require ordered for the ceiling fan rework I collaborated with (more like relied on) @RexBeckett and should hopefully see them by the end of the week. I splurged and purchased thru Sparkfun instead of Ebay so I could receive the components faster. The end result is going to be temperature controlled/universal remote control fans via Vera.

The gist of the project is this:

After unsuccessfully sourcing a compatible transmitter to operate my livingroom RF ceiling fans thru @hek’s Arduino gateway, I decided to explore other control options. I came across a remote hack that RexBeckett performed for his remote blinds, and after linking it in a post, he replied with his ‘new and improved’ version. His setup uses an Arduino and a USR-WIFI232 unit to commicate with Vera via wifi. Then he performed his programming wizardry and built all the necessary files to send to the Vera unit and a sketch for the Arduino so they can communicate. Of course, in true RexBeckett style, he fully documented the process and shared all the necessary files for everyone to use.

I looked everything over and had tons of questions, which he answered, and then HE proceeded to rewrite his arduino, xml, json files etc. and made me a custom fan control plug in!

I did make one component change, swapping the Wifi unit with a Wiznet Ethernet unit and will transfer data via good ol’ cat6. I chose this approach because I plan on mounting this in-wall in a plastic 2 gang box with a cover on it and will use PoE to power the unit. that way there’s no wall warts and no external project boxes.

As soon as I get all the parts and get this functional, I will share everything with the community. It might be a few weeks but I am making the commitment to do it. I will also post the BOM.

Here are links to the ‘pieces’ of the project:

Wiring Diagram

Software package including arduino sketch and vera files. The plug in supports 3 fan speeds and the off command, but doesn’t support reverse.

The full thread where it was discussed

I plan on taking the lights off the remote control as discussed in the thread and controlling them separately. I also plan on having an in wall scene controller programmed to run the fans as well. As soon as I figure out how to do that, (I have an idea) I will post it as well.

Lighting Controls

I found the time to install 5 of my 9 Linear switches and controllers. My kitchen lights are now Z wave controlled via a 3-way circuit, and I have installed the controllers for my living room, exterior lighting, and livingroom fan. These reside in an existing 4 gang box at the entrance of my house and 3 of them don’t currently control anything until I get my reno’s done. I wanted to put them in place and get them wired in to supply power so when the micro-switches and dimmers get installed, its a matter of setting them up via Vera. I use black faces on all my receptacles, with stainless steel cover plates. I did notice that with 4 controllers in one box, the plate does get a little warm, but nothing to get alarmed about. AFAIK I’m the only house around with heated light switches! ;D I also like the little green night light LED’s. Simple things amuse simple minds :slight_smile:

This was my first kick at setting up lighting controls in Vera, and it wasn’t too much of a challenge. I had read up a considerable amount on the association functions of the controllers, and successfully associated the controller to the light switch. I tried it out and even with the Vera unplugged, the ‘slave’ controller still works. As described in this post by @haworld, it is important to note that you need to perform the association on the controller (WT00Z-1) in order for it to work properly. This did take a few tries to get it right, but I managed. I even excluded them and re-included them and did it from scratch to ensure that the method that I used is correct and didn’t take a bunch of unnecessary steps. I took a few screen captures of how this is done. On the last screen capture you will see the 2 numbers beside ‘Set to’ which will correspond to the device numbers that you associated.

I did notice that if you rapid fire switch the light on/off with the slave, there is a delay (I had to try). With the main switch it is nearly instant. I don’t expect to be using the kitchen lights in a disco show using the slave, so I don’t think it’s a big deal.

I have also ordered a bunch of micro-controllers and dimmers which will be controlling livingroom and outside lighting. These should be here next week but won’t be installed until the reno’s happen.

Vera Reception

After installing my first z-wave device (Kwikset Lock), I had to move my Vera closer to the lock in order to maintain reliable communication. I hoped after I installed the lighting controls that I would have better communication between my Vera (where it is supposed to be) and my front door lock. After getting all the lighting controls set up, I put the Vera in its intended spot and waited for it to do a heal over night. It did improve the communication, but not to a reliable level.

I have been reading this thread about installing an external antenna on the Vera, and it seems that the results are consistently favorable, so I have decided to purchase an antenna and cable and try this out for myself. Total cost was under $5 and a soon-to-be-voided Vera warranty for a +5dB compatible antenna and cable.

Antenna

Cable

Stay tuned for the results. In July. When they show up. :stuck_out_tongue:

Arduino Project

There is still a considerable amount of components I am waiting for to get a good start on my Arduino Project, but I received my breadboard the other day, so I figured that I would try my hand at soldering the pins onto the Pro Mini’s. I have never soldered on PCB’s before so after checking out a few tutorials on YouTube, I figured I had enough confidence to give this a shot. I purchased a $40 soldering iron and had some electronics solder lying around (no idea why or where it came from) so commenced to getting the boards pieced together.

I must admit I expected to write off a board or two while learning to do this properly, but to my surprise I got the knack of it very quickly. I do have a bit of experience soldering plumbing, which I didn’t think would have any impact on my quality of work on PCB’s, but to a certain degree it did. PCB’s are a totally different animal, however.

On the first board I probably cleaned excess solder off the tip 5 or 6 times, but was still getting a good connection on the board and not burning anything. It got better after a few boards, but I then realized that the problem was that I was placing the iron tip on the top of the pin, instead of against the board and the pin. Once I figured that out, I wasted much less solder, and began to solder joints much quicker. Place the tip, touch the flux core solder to the tip, letting it flow into the joint, then put the solder directly onto the joint for maybe half a second. Done. Next.

I’m guessing my first board probably took me 20-25 minutes. (30 connections) My last board (#10) took me less than 5. :slight_smile: I fear PCB soldering no-more, but I’m still in no hurry to tackle surface mount components.

I also downloaded the Arduino IDE to my computer and put all of @hek and company’s sketches in my Sketchbook from www.mysensors.org, as well as @RexBeckett’s NetFan sketch I will be using for the ceiling fan project. I received the Nano a few days ago so I thought I would also try to load the gateway sketch onto the board.

This is how it all went down:

-Downloaded IDE from http://arduino.cc/en/main/software#toc1 and let it install.
-Downloaded all the necessary sketches for the Arduino Project from https://github.com/mysensors/Arduino/archive/master.zip
-Unzipped them in a known location in a file folder
-Opened up the Arduino IDE
-Went to File>Preferences
-Browsed the Sketchbook location to where I unzipped the sketches, and selected the file.
-Went to File>Sketchbook>and selected SerialGateway, which opened the sketch in the window.
-Went to Tools>Board>Arduino Nano w/ATMega 328 (my board)
-Plugged my Nano into my computer USB port and let Windows find the drivers for the board (took a few minutes). I opened the window to watch it install, which told me the Com port it installed, and where I would have to connect to find my Adruino, which was Com 3 in my case.
-Went to Tools>Serial Port>Com 3
-Clicked the ‘Verify’ button (Check Mark) and no big surprise, the sketch was fine
-Clicked the ‘Upload’ button (Arrow) and watched the sketch load onto the board.

Done!

I have yet to receive the USB FTDI module for the Pro-Mini’s so I cannot put any sketches on them. So far I will be using Mini’s for the @RexBeckett NetFan project, 12V LED dimming project by @blacey, and a natural gas sensor for my kitchen and furnace area. The missus also spied the soil moisture sensor, so I would assume that will be attempted as well. That will probably use up all 10 of my Mini’s since the LED dimmers will be in 6 different places.

As soon as I get a few more components and can actually complete a build, I will let you all know!