Benefit of your experience? What have you learned that you wish you had known at the start?

Shouldn’t the same in-box relays some use for light switches work with sockets too.

I am just guessing here is the US. I found that with a quick Google search.

I did have a couple with shelly relays behind first but as uk double sockets only have 1x input you cannot control both sides of the socket. Plus legally the Shelly also has to be fused down as a 32Amp ring main.

Plus these are much better looking (excuse the wifey not polishing it :stuck_out_tongue_closed_eyes:) and on last contact a local api is in development now :crossed_fingers:

1 Like

Just a note on this. There often is sensitive information stored in Things like usernames, passwords, API access keys, etc. So it’s not always so easy to avoid pushing sensitive stuff. If you do use an external service like GitHub, make sure you understand where and how the sensitive stuff is stored. And double check your staged files before committing to avoid accidentally exposing a secret.

I believe there was some talk about a better way to handle secrets in OH configs but don’t know the status.

Don’t forget to test them periodically too.

Another thing you can do in OH using UI Rules is take advantage of the Scripts to store little coding examples. For example, once you figure out how to create a Timer, add that code to a Script. Next time you need to create a Timer you will have a handy reference right there to look at.

But what you describe is exactly what good comments are for. But I recommend putting them next to or immediately above the code the comment is referring to. That way you don’t have to look at the bottom of the file first. You’ll know immediately that with the next couple lines of code “there be dragons here.”

4 Likes

May sound outlandish, but is in preparation for old age and disability.

2 Likes

What’s your solution for this? Currently mine is to make it so when I turn the light off then back on again manually (not triggered by the motion sensor), the light will stay on longer (1hr)

That’s why my house is a ‘Lazy Home’ not a ‘Smart Home’.
Alexa, going out… (turns everything non essential off)
Alexa, I’m home… (turns different on depending on time of day)
The only lights I have ‘smart’ are my external ones on PIR/Camera Motion/Time of day

1 Like

I have several different solutions depending on the particular situation. From simplest to most complex:

  1. As Rich pointed out, there are places where the simple light-motion sensor pair is sufficient and the chances of running into the early light off problem are small enough to ignore.

  2. Instead of just tying the light state to the state of a single motion sensor, the light is keyed to the ON/OFF state of a group which includes a couple of different inputs. This gives several inputs equal weight in activating the light and keeping it on with the motion sensor only being one of them.

  3. For wall switches that support multiple actions, single clicks control the light directly, but different multiple clicks give different lengths of time the light stays on before returning control the motion sensor.

  4. A few places, such as the master bedroom, have quite complicated logic based on time of day, which trigger has turned the light-on, etc. The current state of whether the light is permitted to turn off with the motion sensor is then stored in a metadata value for the light that is set by various rules.

1 Like

JustinG has provided the high level descriptions of the various option. In terms of inputs, I use smart plugs and smart TV in the same manner as the motion sensors. If they are on, they indicate room occupancy. This mechanism can be generalized to other devices as well, depend on each system.

Even for single click device, you can improve the logic a bit. For example, by default the time out is 5 minutes. However if the user manually turns on the device right after it was turned off, then the time out can be doubled to 10 minutes, and so on. This is what I was about to do for my system, but the wife is happy enough with the current settings.

1 Like

I use the wasp in a box method to control the lights, tv and basically everything. Read the link to understand how it works but basically, if I’m home, everything stays on. It’s easier for me to make this work because I live alone in a third floor flat. There is only one door in or out (unless you are spiderman) In the morning, the lights roll thru a circadian cycle. At 6:30 am, they come on very low dimmer and red. As the timer runs, they slowly turn from red to golden yellow. Then they get progressively brighter. It mimics the natural light of the sunrise, but timed to make me on time for work. After 9 am, the lights are tied to a light sensor which is pointed out a window. When the outside light is bright, the interior lights dim down (or off). When its cloudy, the interior lights become brighter. This mode also has a slower circadian cycle which starts with a very cool bright white color in the morning and over the day, fades to a warm yellowish color by about 4 pm. Then astro binding kicks in and rolls thru another cycle of turning the lights to their evening settings as the sun sets.
I do use motion sensors in the bathrooms and closets and other places where they are appropreate, automatically adjusting the light level depending on the time of the day so you don’t blind yourself if you get out of bed in the middle of the night. You are not going to be in these rooms long enough to not be able to use a timer to turn the lights off. It is mostly lazyness, knowing you can walk out of the room and a few minutes later the light will shut itself off.

1 Like

I completely get this is meant to be ‘home automation’…

For me though, I use it more for the following (non exhaustive) :

‘Ease’:

  • I haven’t got to get up and turn said light on
  • Don’t need to check everything when I go out
  • I can check everything if I’m out

‘Control’:

  • Smart Trv’s - less boiler run time, accurate individual room temps
  • Dumb device conversion
  • Intrusion (doors/windows/motion) - previous alarm panel just gsm so now get notifications if no presence too (handy if WiFi but no gsm signal)

‘Information’:

  • Notifications through the app for things such as low batteries
  • Energy usage
  • Covid too now

Yes I do have some automation, probably 20 rules or so, but asking Alexa to do something from any place in my house (or even from the car as have echo auto’s) does not have the irritation of a light coming on and waking the baby up or going off when I least need it to. Plus with Alexa groups/rooms I can get her to turn all sockets off or all lights with one command.

I just think that sometimes things are automated for the sake of it being automated, and often causes more issues than it solves.

Everyone has their own view, that’s just mine :wink:

I know this is going to seem bizarre but I am the complete total opposite. I want everything to just work with no intervention at all.
I’ll give an example. I struggled at first to get the music to play automatically. I used to sit in silence when all I had to do was say ‘Alexa, play pandora’. I knew I could do that, but I wanted it to do it itself without asking. ??? I know… weird. To me, it almost felt like cheating. I have an echo and I do use Alexa for a few things. I like Alexa to tell me things I didn’t know. ‘Andy the phone is ringing’
I learned openHAB and am part of this community because I want my house to be as automated as possible. I want everything to just work. And when it does, it is like magic. I freaks visitors out!

2 Likes

So how exactly does she know…

Mostly my presence. If I’m home, I kind of like the music playing. But not first thing in the morning, I like it quiet in the morning. And not so loud during certain times. Mostly time of day type decision making. Rich’s time of day is, to me, the basis of every decision. It forms the foundation of the system. Then the wasp in box algorithm makes the next level of decision making, if I am home do xyz during this time of day however, do abc this other time of day.

With enough sensors, we can discern almost any condition. I have a motion sensor in the bathroom. It runs on a timer (actually the expire binding) Works perfect except… when I get in the shower. Steam confuses PIRs. The shower curtain makes it worse. So… how do we figure out if the shower is running? How about a esp8266 with a temperature probe connected to the hot water pipe on the water heater. The pipe goes from room temp to hot pretty quickly. Bathroom timer runs for three minutes and if no more motion is detected, turn off the light, unless… it is morning time of day and the sensor on the water heater just went up, then reset another timer for ten or 15 minutes instead.
This to me is the power of openHAB. The only limits are your own technical abilities and your ingenuity

2 Likes

So do I… but my boy ain’t gonna be happy while he’s watching power rangers, or if the baby is asleep the wifey ain’t gonna be happy :grimacing: - but I have a scene that turns my Bluetooth ceiling speakers on, sets the volume etc

How can we monitor the baby sleeping :thinking: don’t think she’ll let me put a sensor on her :stuck_out_tongue_closed_eyes:

There’s little routine to our lives which makes automation hard in that respect.

I only added the app to her phone yesterday - absolutely loves it (little bit ocd regarding appliances being on like the tumble drier or washing machine - and sockets are hidden).

And she loves her little Zwave button on her bedpost (for the bedroom lamp / on suite light / boys tv when she wakes up to feed)

I suspect @Andrew_Rowe is a single guy with much more extra time :wink:

1 Like

totally agree, one advantage that I have is being alone. As more then one person is in the house, things become infinitely more complex. Over time, people visit, people stay with me and this has helped me adapt the rules to accommodate these edge cases.

The baby sleeping sounds like a good use for a video camera, perhaps with audio or sound sensor. I have a couple IP cameras running, but rarely look at the feed. They are however (under certain situations) great presence detection devices.

I consider my use of openHAB to be a very long term experiment. To me, it is fun to try to figure out what I can do and how to automate it. As I learn, I figure out how to do more.

this made me laugh

that would be correct Bruce (hey I do date some) but anyhow, yes, this is one of my hobbies, I enjoy fiddling with stuff and I love openHAB and enjoy being part of this great community

1 Like

Me too, and the fact that openhab is so flexible it can fit everyone’s needs.

I’ll need about 50 of each, always in a different spot :joy:

1 Like

Depending on the baby weight, perhaps a weight sensor for the baby bed?

She could be on the floor on her mat, in her chair, her bedside crib, her downstairs crib, having a cuddle… the possibilities are endless.
Could just have a button on the wall ‘Press here when baby asleep’, but then I might aswell say ‘Alexa play Dave’s playlist’ :stuck_out_tongue_closed_eyes:

1 Like

I thought of that as well but…

Apparently baby does not always sleep in a crib, or the same place twice for that matter. :rofl:

Anyhow, I use openHAB for other things as well, like you mentioned Dave. To make sure if something bad happens, I’m alerted. To remind my of stuff I don’t remember to do or to monitor the house.

My suggestion is to start small. What are the aspect of life that are tedious? What do I always forget to do? Creating automation which are time savers or perform some trivial thing that I no longer have to do myself.

Sometimes it is better to invert the problem. If the music may wake the baby or disturb other members of the house, when is it safe to play the music? In other words, if you can’t figure out when to do something, it may be easier to figure when you can’t do it.

Persistence and graphs are also a really great way of seeing how things really do work, not how you think they work

Anyhow, great thread. Just want to say thanks Dave for you binding(s), great contribution especially because you’ve mentioned you run a business and are not a pro programmer. Plus a Dad and husband :+1:

3 Likes