Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


davidcole

6099 posts

Uber Geek
+1 received by user: 1465

Trusted

#223098 12-Sep-2017 15:55
Send private message

Since I've been playing with OpenHAB I've mostly been collecting data, as that's easy.    But recently been adding some funkier items.  So less about the technology, but some of the interesting things you've done - unless an integration is the interesting thing.

 

Paradox Alarm

 

I have two methods of accessing this, one is a python script, but recently been changing this to a windows service which not only gives me states of PIR devices, but I can control an Output (PGM) or the arm/disarm state.

 

Lighting rules.

 

I have a few zwave relays on various outside lights.  I also have a weather item for sunrise/sunset which sets a day/night switch.

 

Using the alarm - ie has house been disarmed/armed, and is it night time - two sets of outside lights come on as it means: a I'm leaving for work at 6:20am (in winter it was dark), or b, we're just getting home at night.  These two lights are turned on for 15 mins.

 

Another one for some carport lights, accessible via a spare room (that has a reed switch on the door), say if night time, and door opened, turn on these lights for 5 mins.

 

That 2nd rule for the car port, while great for at home, and the alarm great if we're all out, doesn't work if the house is not armed, and say my wife is out.  So using the unifi binding (which detects if a device is online/offline depending if it's attached to an AP), then if the user comes online (from off) and it's night time, then turn on the same sets of lights.

 

Fan control

 

A bit of cool stuff (I think) and a rule, a mosfet switch attached to a raspberry pi, then turns on two 12v 120mm computer fans - something a raspberry pi couldn't do off it's 5v or 3v GPIO ports.  Coupled to a MQTT topic then a temperature sensor (on the same pi) updates the temperature, and if above a threshold turns on the fan.

 

Battery devices check

 

Battery devices annoy me, but I've got some.  So I added a check on the batter level, it then sends a message via an item - coupled to mqtt wich is picked up my mqttwarn (hat tip @sumnerboy for the item configuration)

 

Kid Youbtube monitor

 

We're not too keen on the 8yo having unrestricted access to youtube.  So in the weekend when his cousin was around, and they were mucking about in it despite my request not to, I figured out the Roku API calls to get the current roku channel.  When I see it's youtube, I can hit the home button via another API call (bwhahahahahaah TEH POWER!!!!).  I need to figure out the same with the apple tv...but I actually have all the parts to do this.

 

 

 

I think that'll do.  If nothing else, someone may find these useful and want to duplicate.  Happy to post how I did any of them, or someone can mention their own which may tickle my fancy.

 

 





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 


View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2 | 3
SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1862947 12-Sep-2017 16:34
Send private message

I have literally hundreds of rules, built up over a number of years, but a few that spring to mind;

 

1. Our Skoda keeps the car computer on if you leave the key in the ignition (even if turned off) and will drain the battery. The car has WiFi and I have configured it to connect to my IOT VLAN. I run dnsmasq for DHCP and have a python script which publishes an MQTT message whenever a DHCP lease is issued. I monitor this topic in OH and when the Skoda connects fire off a warning if it doesn't disconnect within 15 mins - therefore warning me if the key is left in the ignition.

 

2. I have a reed switch on our front gate and an IP camera above the front door pointing at the gate. Whenever the gate opens the camera is armed by OH (via 'motion' which is running on a linux box). I have a python script on my 'motion' server which is fired whenever motion is detected and publishes a snapshot to my private Slack channel. Therefore whenever the front gate opens I get a picture on my Slack channel and a notification via Pushover.

 

3. If someone turns on Sky between 5.50pm and 7pm OH will automatically switch to TVONE to watch the news (via an IR blaster).

 

4. I have cheap Xiaomi sensors on a few windows. If my weather station detects rain and there is an open window I get a notification on my phone, and the house will announce the alert over my Squeezebox players (in rooms when OH has detected presence in the last 5 mins).

 

5. If the garage door is opened and not closed with 10 mins I get a notification and an announcement that it is still open. Same with any external door or window, with different timeouts.

 

6. If the phone rings (VOIP server running Freeswitch) and we are watching Kodi or Sky, playback is paused until the call ends. If watching Kodi the calling number/name is displayed as an on-screen notification.

 

Many many more...




linw
2893 posts

Uber Geek
+1 received by user: 1205


  #1864661 13-Sep-2017 18:15
Send private message

Very clever guys but, doesn't it drive your wives mad? 


davidcole

6099 posts

Uber Geek
+1 received by user: 1465

Trusted

  #1864759 13-Sep-2017 20:52
Send private message

linw:

 

Very clever guys but, doesn't it drive your wives mad? 

 

 

No I've been fairly limited in what i do, and it's stuff that doesn't require any interaction with a device.  I haven't worked out a way of doing that.  So would rather they're natural interactions (ie open a door)





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 




SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1864776 13-Sep-2017 21:19
Send private message

TBH the wife loves 90% of it. When it goes wrong there are sometimes a few choice words, but generally speaking there are quite a few things she has requested or couldn't live without anymore (at least that is what I tell myself...).


paulchinnz
Circumspice
796 posts

Ultimate Geek
+1 received by user: 223

Trusted
Lifetime subscriber

  #1864799 13-Sep-2017 22:06
Send private message

@sumnerboy interested in the open garage door notification. I've a garage without internal access, often leave it open by accident overnight.

 

I'm a novice in this area, but what's your garage door solution?


SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1864806 13-Sep-2017 22:26
Send private message

I have a Wemos D1 Mini sitting up on the garage roof, which monitors a magnetic reed switch. The magnet is zip-tied to the door opener chain so I can tell when the door is closed, or not. Then I have a relay shield on the Wemos and have that wired up to the door opener terminals. Everything is done over MQTT which is how I interface back to openHAB. 

 

The rule in openHAB is pretty simple;

 

 

 

var Timer garageTimer = null

 

rule "Garage door opened"
when
  Item GF_Garage_Door changed
then 

 

  if (garageTimer != null)
    garageTimer.cancel()

 

  if (GF_Garage_Door.state == OPEN) {

 

    // create a timer to announce an alert if we are still OPEN after '10' minutes
    garageTimer = createTimer(now.plusMinutes(10)) [|
      VT_Announce_Alert.postUpdate("The garage door is still open!")
    ])
  } else {
    VT_Notify_Trace.postUpdate("The garage door closed")
  }

 

end


 
 
 
 

Shop now for Lego sets and other gifts (affiliate link).
chimera
563 posts

Ultimate Geek
+1 received by user: 199

ID Verified

  #1864891 14-Sep-2017 07:59
Send private message

linw:

 

Very clever guys but, doesn't it drive your wives mad? 

 

 

Haha! My wife (and friends) mocked me when I started doing all this as well, especially when it was hooked up to the Amazon Echo for voice control of various devices.  I don't think my wife has picked up a remote since... laughing  It is funny when I hear her talking to Alexa though to say, turn on the TV and Alexa doesn't hear her correctly, she gets mad. If Alexa got it right 100% of the time, it wouldn't be as amusing!

 

My favourite (but very simple) rule, because it makes life so much easier (which is what home automation is really about) is basically "Alexa, turn on bed time" - which triggers a rule in OpenHAB to basically turn every light off, turn the TV off, lock the front door, close the garage door (if not locked/shut already), close the hall blinds (if they're not closed already), turn the hallway sensor light on which leads to our bedroom (via a timer for 1 minute, to allow us to see when walking to the bedroom) and then turn the ensuite light on (to obviously get ready for bed)

 

 

 

 


SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1864898 14-Sep-2017 08:17
Send private message

Yes - we have Alexa as well and the wife uses that more than anything else. Mainly for kitchen/cooking timers and the shopping list, but also for playing nursery rhymes and turning the tv on/off etc. She is convinced that sometimes Alexa is defying her when she doesn't respond as requested and it is hilarious to hear her tone change as she starts demanding action!

 

It is quite amazing to see tech like that almost take on a personality in our own eyes.


reven
3748 posts

Uber Geek
+1 received by user: 874

Trusted

  #1864910 14-Sep-2017 08:36
Send private message

i dont use too many rules these days.  I have wemo switches everywhere and amazon echo (dots) everywhere, so control most things via voice.  I have an entrance way zwave motion sensor that turns that on until motion is stopped, but thats about it.

 

my morepork alarm warns me if doors are left open, or when locks are unlocked.  

 

i have "hacked" morepork to auto arm/disarm at certain times of the day (auto sets to arm home mode).  and the morepork system knows when a pin is entered in the front door or garage door locks and turns that off.

 

 

 

i find "alexa, turn off downstairs lights" more useful than rules that dont work that well and turns lights off when your still in the room (kitchen use to do this, when youre cooking over the stove, you dont move much).  plus if my hands are full, alexa is there to turn things on/off.


davidcole

6099 posts

Uber Geek
+1 received by user: 1465

Trusted

  #1864917 14-Sep-2017 08:49
Send private message

SumnerBoy:

 

I have a Wemos D1 Mini sitting up on the garage roof, which monitors a magnetic reed switch. The magnet is zip-tied to the door opener chain so I can tell when the door is closed, or not. Then I have a relay shield on the Wemos and have that wired up to the door opener terminals. Everything is done over MQTT which is how I interface back to openHAB. 

 

 

I already had two wemos D1s coming, now just added a reed switch as well.  Hoping make my own garage door sensor.  So I may come at you for pointers/wiring diagrams.





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 


linw
2893 posts

Uber Geek
+1 received by user: 1205


  #1864920 14-Sep-2017 08:51
Send private message

Enjoyed your responses! Thanks, guys.


 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Free setup code: R587125ERQ6VE. Note that to use Quic Broadband you must be comfortable with configuring your own router.
SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1864921 14-Sep-2017 08:51
Send private message

There was a thread a while ago with some more details on my setup - think it was started by @chimera. Feel free to fire away with questions tho. Happy to share my Wemos sketch etc.


davidcole

6099 posts

Uber Geek
+1 received by user: 1465

Trusted

  #1864936 14-Sep-2017 08:56
Send private message

SumnerBoy:

 

There was a thread a while ago with some more details on my setup - think it was started by @chimera. Feel free to fire away with questions tho. Happy to share my Wemos sketch etc.

 

 

I think I've found it: https://www.geekzone.co.nz/forums.asp?ForumId=141&TopicId=192198





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 


SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1864941 14-Sep-2017 08:58
Send private message

There was another one somewhere, with some pictures of the setup itself.


SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1864957 14-Sep-2017 09:06
Send private message

This one... https://www.geekzone.co.nz/forums.asp?forumid=141&topicid=198633


 1 | 2 | 3
View this topic in a long page with up to 500 replies per page Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.