This was bothering me for some time. In the hallway we have a wardrobe closet but that part of the hallway is kind of dark. I was already planning to change the dimmers (2 way) for z-wave ones, but I want to have something smart here as well. Whenever I open the closet I want to lights to go to 100% but when I close the closet they should return to the original value (either it off, or dimmed etc).
You need a little smart app. When a contact opens it turns the dimmers to 100%, remembers the original value first and subscribes to the close event of the contact, when the contact closes again the original value is restored.
Sounds what I need is possible, so ordered the contact sensor from Amazon (click click )
In the recent blog posts I described how I setup the different sensors and connected my Nest thermostat. But the real automation or getting things convenient is by tying everything together. I have been struggling to get everything to work. One time 1 part was working but it didn’t go to another state automatically and suddenly the lights went out when I didn’t want it to happen etc.
What helped me was drawing the following diagram and after that go through the app to define/configure all the different states (in the end, SmartThings is nothing else than a state machine)
The states, Home, Night and Away are already defined in ST. If you go to the activities (those are in bold at the lines) you can configure them 1 by 1. For example you go to ‘I’m Back’. I have configured to turn on some lights and change the mode to ‘home’. At additional settings you can configure ‘automatically perform ‘I’m Back!’ when.. I have configured ‘Someone arrives’ (connected to Sandra’s and my presence sensor) and ‘Things start happening’ which is the motion sensor, so when I come home through the front door or garage and the presence sensor isn’t detected yet the lights turn on anyway.
The 1 thing left to do is connect all this to sunset/sunrise. If I return home during the day I don’t want the lights to turn on. So I want to add another state which is ‘Home sunrise’ or something like that which is a different state than home. That state doesn’t need the lights to come on. Creating a chart with that state added and the different transitions will help me configure the SmartThings hub the way I want.
I am updating my rubber duck app and I want to store the amount of ‘squeeck’s per device in roaming settings. So you can see the total but also how much you squeezed the duck on every device.
I am storing this as key value pair and the key is the device name.
So how do you get the device name? You can’t. There is (as far as I know) no API to get the device name.
So when searching around I found this trick which I am documenting for myself here in this post.
Windows.Networking.Proximity.PeerFinder.DisplayName will give you the name a user gave his device.
Not sure how robust it is yet. It seemed to work on my phone, but when I check the name in internet sharing in my emulators they say something like ‘Microsoft Virtual_6262’ but the API returns ‘Windows Phone’ so apparently these 2 aren’t the same. That’s ok since you can change the broadcast name for internet sharing in the UI and renaming your phone needs to be done when it’s connected to your PC.
I tried to add another z-wave switch to my SmartThings network. I bought a on/off switch at Lowes (all the ‘works with Iris’ stuff you can use in your z-wave network), this is just a GE 1-way on/off z-wave switch, to connect to my outdoor lights so I can switch them on/off automatically with sunset/sunrise.
When I connected it to the 2 black wires which were used to the existing switch the lights didn’t come on. Although the led on the switch itself lighted up.
After some searching and reading the manual a little better I found out I needed to connect the neutral wire. Fortunately there is a neutral wire in this wall mount. I checked my study and that doesn’t have one. The weird thing is the z-wave dimmer works without the neutral wire.
So after wiring up the neutral wire the outdoor lights started working.
So I found some information on the SmartThings forum to explain what was going on.
No neutrals is a bad thing, unfortunately. You can use once of the switch types that don’t need a neutral, but they do have limitations.
First question: If these are three-way switches, there should be at least three wires. In the first box there should be a hot line (from the breaker/fuse box) and two wires (called traveler wires) going to the next box. At the second box there should also be three wires. The two traveler wires from the first box, and then one load wire leading to the light.
If this is what you have then you can look at Levitron which appears to have both switches and aux switches that do NO require neutrals. See this page: In particular, look at the setup in part 4B. This is what your setup should look like.
Second question: Why only Incandescent bulbs? The important thing to remember is that old “dumb” switches are simple mechanical devices. By flipping the switch you are mechanically connecting or disconnecting a circuit. The switch is nothing more than a path for power to move through.
However, a z-wave “smart” switch is an electronic device in and of itself. Yes it opens and closes the electrical circuit for your lights, but it also has a small radio built in as well as various other electronic components that control dimming, current state, etc. Because this is an electrical device it requires power all the time. This is whymost switches of this type need a neutral. The power used to “run the switch” comes from the hot, then goes out the neutral.
But some switches obviously don’t require a neutral… how do they operate then? They operate by allowing a small trickle of energy to move through the circuit. Enough to operate the switch, but not enough to make an incandescent bulb light up. These switches take advantage of the fact that incandescent’s need a (relatively speaking) high level of power before responding with light.
CFLs, on the other hand, take less juice and this constant trickle is enough to occasionally make them flicker or blink. Having a constant small level of juice probably isn’t very helpful to the ballast and other parts of the CFL either, potentially shortening their life considerably.
Similarly LEDs require a lot less juice too. Meaning that small trickle might be enough to make them come on at a dim level even when the switch is “off.” Theoretically if you have enough of a load of LED lights you might be able to get by without this switch lighting up your LEDs. For example, in one room of my house I have 4 LED lights each taking like 16 or so watts. That just might be enough to prevent them from lighting up (I don’t know for sure as I’ve got a switch with a neutral… just same it might be enough).
Okay… so this explanation ended up going long. Sorry ’bout that. Also, I hopefully I didn’t sound like I was talking down to you. Not sure how much you know or don’t know so thought I’d start with the basics.
In other words. if you don’t have a neutral wire, on/off could work with specific switches and regular light bulbs.
A couple of months ago I bought a Nissan LEAF. It comes with a trickle charger you can connect to your 110V outlet but it takes a bit of time to completely charge your car (over 12 hours). I leased the car with a fast charger pack which makes it possible to charge the car in a couple of hours if you have a 240V charger.
I decided I wanted to install this myself. I bought a Bosch EL-51253 Power Max 30 Amp charging station with 18’ cord. I also bought a NEMA 14-50R outlet I wanted to put in the wall. And I bought a Electric WX9X35 4-wire Range cord to connect to the charger so I could plug it in the wall.
Connecting the range cord to the charger is easy. Open it up on the back and connect 3 wires (you only need 3, the white wire isn’t used because only 3 wires go from the breaker to the NEMA outlet).
The 240v connection wasn’t that hard. Most of the time I used to figure out what the exact rules are here in the US. It’s a bit different compared to the Netherlands (Yes I read the NEN1010 in NL when I was in school). I did a lot of research online to figure out what is allowed or not. I requested a permit (this is different per area, even Redmond and Bothell are different, some areas you go to the power company, some you go to the city. For Bothell I needed to go to the city and pay around $60) and after everything was hooked up, somebody from the city came by and approved the installation. (You don’t want to fight with your insurance when your house burns down because you made a mistake )
First I needed an extra breaker in the outlet panel. This house is a new build so the panel is new. I could just add an extra 40A breaker. Here in the US they use 110V outlets although 240V comes into the house. The breaker for your dryer is also 240V.
After I switched of the main breaker I added the new breaker. (btw, although the main breaker is switched off there is still current on the main thick feeder line at the top of your breaker box!). Just make sure you use a breaker which fits on the panels connectors.
Adding the breaker in the panel is easy, just click it in.
That was the easy part
I was lucky I wanted the outlet really close to the breaker panel. I bought some materials at Home Depot and started working. I used this wire which allows 55A and in the wall usage. First I needed to cut out the hole in the wall.
Opened up one of the holes in the panel to feed the wire
Make sure you put in this plastic ring before you feed the wire (you need this if you want to get the permit approved afterwards)
Strip the wire and feed it to your breaker and attach the ground to the ground block
Feed the wire to the outlet (only 2 wires and 1 ground)
Connect the NEMA connector, I connected the ground and the 2 L wires.
Et voila, done
I am happy with the result
Update: Although my charger doesn’t use it, I would recommend adding the extra wire from the breaker to the NEMA plug and just connect it (neutral wire goes into the neutral bar). So for future use the NEMA connector is wired completely and would save some frustration of you use it in the future but forgot 1 wire was missing 🙂
There are still a couple of things I would like to automate in my house. For one when everybody leaves the home the home should switch to ‘away’ mode. The other one which would be nice is if I get home with the car the garage door opens automatically or closes when you leave the house.
First thing I tried was setting up the Windows Phone from me and Sandra to use as a presence sensor. You can do this through the SmartThings app. But after some experimenting this isn’t a reliable way to detect if you are at home or not. Not sure what the exact problem is but I don’t think this is a Windows Phone 8.1 app using geo-fences. One of my friends uses his iPhone and that is pretty accurate.
So I bought to SmartSense presence sensors on Amazon (they ship in days, when I order at the SmartThings website it takes much longer for the same price!?)
First experiment was putting these things in the glove compartment of the cars. I added the 2 devices to the network (just follow the instructions it’s easy)
When driving away from the house it takes around 5 minutes before it detects I left the house. (little over 1 mile away). That’s not good enough to close the garage door automatically since it will be open without me being there for some time. It looks like it polls only so many minutes (when I check the log). Not sure if that’s true or not.
Detecting when I am home is a bit spotty too. When I drive to my house it detects me or Sandra is home when we park the car in the garage. So it’s not good enough to open the garage door automatically. You can set an amount of minutes you are not present before an action triggers. This is a good setting because you sometimes get a false message about one of the sensors not being present.
I found out the sensor is usable for setting the house to ‘away’ automatically. I connected the sensors to our keys (which we bring with us all the time). So when Sandra leaves the house on her bike or walks Lisa to school it also works. It’s not bound to just the cars.
I programmed the ‘away’ mode in the app to automatically go to away when everybody leaves the house. I also changed the ‘I’m back!’ to automatically when ‘somebody arrives’, together with the motion sensor this works really well.
The scenario for the garage door might work together with your iPhone or Android phone. My friend had a problem with this the garage door also opened automatically when he returned from walking the dog. If you combine this with 2 sensors in both cars you could program the ST hub to automatically open the garage door when arriving (with your phone) and your car is not present. That would be accurate enough to make it really convenient. I hope ST updates the Windows Phone app some day to make this scenario workable. At that time I will buy a automatic garage door opener and sensor to detect if the door is open or closed.
Last week I ordered this motion detector for my home. I want to use it to automatically switch some lights etc in my SmartThings network.
Connecting the motion detector to the network is easy. Just follow the instructions. I use this for 2 different scenarios. 1st scenario is when I go downstairs in the morning, the sensor detects me coming down the stairs and tells the house ‘Goodmorning!’, that turns the lights on, turns the Nest to 69, if it isn’t already and turns on the Sonos on my favorite radio channel. The 2nd scenario is when the house is in ‘away’ mode. I want the motion detector to tell the house ‘I’m back!’ this makes the lights turn on and put the Nest in ‘home or present’ mode. I will write another post how I programmed these 2 scenarios in SmartThings.
So does the motion detector work? Yes it does, there are some caveats to be honest. When it detects motion it stays in this mode for at least 4 minutes. When it doesn’t detect motion it ‘turns off’ for at least a minute before it detects motion again. I did not figure out how I could change these timings, I guess it’s done to save battery. For my scenarios that’s ok but if you would like to use it to automatically switch on and off the bathroom lights for example I wouldn’t use this sensor. The price is pretty good. $28 for this sensor isn’t that expensive I think.
The sensor comes with a wallplate and some double sided tape. I positioned it in a spot where it can detect us coming down the stairs, enter the frontdoor or enter the kitchen through the pantry. So these 3 areas and my 2 scenarios cover everything I currently want.
I wanted to make it even easier for myself when I leave and enter the house. What we do now when we leave the house we set the Nest to away and when we return we set it to Home. That’s something we can automate with SmartThings.
So when I set my home to goodbye the Nest goes in ‘away’ mode and when ‘I am back’ the nest goes in to ‘home’ mode. That’s all.
I don’t need to connect the motion sensor since that’s already hooked up to the different modes in SmartThings, I only need the nest to respond to those mode changes. So I might change the script a little in the future to adjust it to just this scenario.
So go the web IDE and create a new smartApp. Select From code and paste the code, save, and publish to me.
Go to your phone and use the app to add the custom app, hit the + swipe to My Apps and select the Thermostat Away mode app.
As I described in my previous post I want to create a couple of scenarios in my house.
The first one is a simple one. I want my lights at the front of my house automatically turn on and off when the sun sets and rises. I replaced my outlet switch with a z-wave switch and connected it to my SmartThings hub.
After that it’s easy. Go to your SmartThings apps. Click on the + sign on the bottom of the page. Swipe to Actions. Select Lighting. Choose ‘Turn lights on using a schedule’, ‘Add new light/switch’, give it a name, in my case ‘entrée’, Next, choose devices for ‘entrée’, select what you want to switch on at the entrée so I selected my switch. Check the ‘turn on at Sunset’, you can specify the level of the dimmer as well. Next and Done.
Now repeat this step to turn lights off using a schedule to turn the lights of in the morning at sunrise.
There is probably a smartapp which can do the same, but this way you don’t have to go the webpage and add the apps through the IDE.
Since I bought the SmartThings hub and several switches and sensors I was thinking which scenarios I exactly want to work. So far I have been fooling around and I found out if you want a complete working set of scenarios without me using the app all the time to set my house in a state I want, I need to think it through and build all the scenarios from the beginning. So step 1 is writing the scenarios down and determine what the conditions are.
So I am listing the scenarios and will give them a number and can work from that list.
Outdoor lights at the front door need to turn on at sunset and turn off at sunrise.
In the morning when I come downstairs the lights in the kitchen and living need to turn on. The Sonos need to turn on in the Kitchen. Temperature set to 69. I want to use a motion sensor to detect when I come down in the morning. Conditions: Lights turn on when it’s still dark outside (before sunrise). When somebody comes down before 5:00 in the morning the Sonos does not have to turn on. When I come down in the morning I want to switch to ‘good morning status’ When I come downstairs before 5:00 the lights need to turn off automatically when no motion is detected after 5 minutes.
When the status is ‘away’ and motion is detected switch to ‘I’m back’ and turn on the lights when it’s after sunset. The Nest needs to be set to ‘home’ when it’s in ‘away’ mode. This is when we come back through the garage or the front door (after work, or shopping or taking a walk for example)
When I switch the house to ‘good night’ everything needs to switch off automatically after 5 minutes, which gives me some time to connect my phone to the charger, put the empty cup in the kitchen etc and head upstairs. Temperature is set to 60.
When leaving the house I will set the status manually to ‘goodbye’. Lights will turn of after a few minutes, and Nest is switched to ‘away’ immediately. When I return home scenario 3 needs to kick in.
When I leave to work I want to set the mode to ‘goodbye to work’ which means only the lights and Sonos is switched off but the Nest is left as it is. So when Sandra comes downstairs the temperature is still as we want it to be.
All these scenarios need to work without me needing to use the app. I am ok switching the lights off in the morning when it’s getting lighter outside. I might add a light sensor in the future to do this automatically as well.
When this works I want to add a sensor to our cars so the garage door can automatically open and close when we arrive and leave with the cars too.
I decided not to mess around with the ‘auto’ away settings etc from the Nest in combination with the SmartThings hub. That’s way to complicated and doesn’t add any value I think.