NO!!! I want to print more!!!! or Offloading octoprint timelapse videos

octo

I use octoprint to manage my printer.  When I can, I batch print.  I will literally print things back to back. But I also love the timelapse and we have all seen it….warning

 

But I have more robot stuff to print!!!!

Settle down there smart guy.

Nobody asked you!

Ok, interruptions aside.  Running octoprint on an original pi is a little slow.

Did you say apple pi?

captain-picard-facepalmI don’t like this guy.

I said ORIGINAL pi.  Yes, old school slow.

So what happens if you try to print again while it’s rending a timelapse… well, you get a lot of stalls on the print, meaning the head sits over the print causing some unnecessary melting.

So how do you fix it if you are so smart?

Well, you would offload it.  I have a linux box that handles all sorts of random tasks.  It could do it.

So here is how I offload it.

  1.  setup an NFS share to a nas/other server
     192.168.X.XX:/mnt/vol/dataset1 /home/pi/fs nfs nouser,atime,auto,rw,dev,exec,suid 0   0 
  2. Configure octoprint to store the timelapse pics on this NFS share.paths
  3. All that is doing is changing the location of the timelapse, not offloading jerk.
    I KNOW!!!  I’m not done!
    Sorry
    So now we need to setup the exact same share on the other linux box.  If I had thought about it early on I would have changed the path on the pi to be something like /media/share/ instead of /home/pi/fs
    So we put the same path on the other linux box.
    (see 2.)
  4. Now the fun stuff.
    Finally!
    I created a small shell script on the PI.

    #!/bin/bash
    ssh root@192.168.X.X "ffmpeg $@"
    if [ $? -eq 0 ]
    then
    # everything was good
    exit 0
    else
    exit 1
    fi
    
  5. Set up your pi to be able to login with no password (using keys instead) so that the ssh connection will not hold anything up.
  6. Configure octoprint to use this new script as your ffmpeg path.
    2016-11-07-19_03_42-octoprint

So let me walk you though it.

Good idea.

Are you being nice all of the sudden?

No.

Anyway.  So octoprint is now setup to store your timelapse images on the network somewhere.  Linux box is setup to have the exact same path.  When your print is done octoprint executes the timelapse.sh script thinking that is ffmpeg.  So it runs it waiting for it to exit with a success or failure.  So in the script, we ssh to the linux box, tell it to run the ffmpeg with the $@ which means everything octoprint wanted to pass to ffmpeg locally we are passing to the remote ffmpeg.  The other box does all the heavy lifting and returns an exit code, we pass that exit code back to octoprint.  It’s none the wiser.

The cpu is next to nothing because we are just waiting for the ssh command to finish.  So I have started additional prints with minimal issues.

I have noticed that if you keep your filenames short and sweet it helps.

Is this a great solution or what?

No.  Buy a better pie.

Don’t you mean a “pi?”  Haha.  Jerk.

pievpi

Time lapse in new printer enclosure

surprised-rainbow-faceSo awhile back I came across an instructables article regarding using some ikea lack tables to make a 3dprinter enclosure…..

I love ikea….

So this was the project.  http://www.instructables.com/id/3d-Printer-Enclosure-from-Upcycled-Furniture/

I went to ikea.  Got 2 lack tables and put them together…. I want my printer higher up.  ELEVATE TO THE LEVEL OF THE GODS!!! no.  just high enough I can watch it cause I like to watch it go back and forth while I make printer noises.

So I ordered a 3rd table.  Put it on top.  Sweet.  Much better.  I moved the printer into the enclosure this weekend (no sides put on it yet) and decided I needed to get the lighting in place.  So I took some neopixel strips I had laying around and hooked them up to an arduino.

13694706_1455593267790887_1215760066_nOk, so that’s now how I am leaving it 🙂  but it did look cool.   Now I can set the colors.  Plain white for printing.  I am trying to figure out how in octoprint to get a hook in to detect when it’s heating up.  That way I can turn the lights orange or red to indicate heating phase.

 

 

So I did a timelapse and a vid.   The vid of the whole rig setup

Here is the timelapse test print

 

I am working more on trying to get some good photo and video in with these projects too.  If you like the videos give a thumbs up and a subscribe.

Who’s That? What’s That? CCTV setup

Hello Hello again.   Recently I was chiming in on a thread on reddit regarding CCTV.  I mentioned how my cameras/cctv is setup.  Then I thought.

light-bulb-momentHey, you know would like to know this?

EVERYONE!!!!

 

 

Really.  Conversation totally happened in my head.  Told you Doctors it’s not too crowded up there.

Let’s begin!!

This all really started because of my 3dprinter…..

“How…. Huh…. But you…..”  I hear you saying it.  It makes no sense.  But Ill fix that little red wagon.

Aerial_Vista_Security_Camera_preview_featuredI love searching around on thingiverse.com it’s actually part of my daily sites to check.   So I came across this thing.   It’s a security enclosure for a raspberry pi and pi camera… WHAT?!?!?!

I know.  I thought the same thing.  I need that…..   So I started printing the parts.

2016-03-18 07.09.022016-03-18 07.48.26

Once I had it printed, I threw in my pi camera (NOIR).  The NOIR made it even better for being a security camera.  Ok, so cool.  How about software?

I was looking for some super simple camera software as there are tons of “security” camera projects out there for the pi.  I came across this one “MotionEyeOS.”   58732063Being built off the program Motion I decided to get in and test it out.  Flash the SD card and boot it up, gets an IP.   I just checked my dhcp leases on the router to find the ip, then gave it a static IP.

 

Once you have the IP just throw that ish in the browser!!  Configure your network settings ect.  But in the expert settings there is a switch.  Turn it on.

 

No seriously.  Turn it on.

2016-06-16 15_38_25-iseeall.noip.me - Remote Desktop Connection Manager v2.7

Yes I know.  The fast network camera page on the wiki looks like it kills alot of stuff.

 

The Differences

When you have Fast Network Camera enabled, you’ll notice that:

  • your motionEyeOS-based camera can reach a significantly higher frame rate, at a higher resolution
  • you can tweak many CSI camera-specific parameters directly from the UI
  • your browser will eat up less CPU at the same frame rate/resolution (it uses a pure MJPEG stream, rather than triggering every refresh from JavaScript)

On the other hand, this doesn’t come without some disadvantages:

  • no more motion detection
  • no more motion notifications
  • no more pictures or movies
  • no more overlaid text (date/time, camera name)
  • a significantly higher network bandwidth usage
  • you’ll need to forward port 8081 as well, if you want to access your camera from the Internet

 

No motion detection!?!?!   Are you crazy that’s why I am even reading this stupid page!!!!!!

 

EcstaticTightBuckeyebutterfly-size_restrictedCalm down.   Please calm down.  Can you even use that as a weapon?!?!   

Just let me finish before you use that thing!!!

So you enable fast network camera.  This lets you get some faster higher quality out of the camera.  Now here is the fun part.

I setup a VM of ubuntu and installed MotionEye.  Not MotionEyeOS but MotionEye.

BeQZIS7CEAAemgwOnce you have it running hit your motioneye server (http://<motioneyeserverip:8765)  and you will get another nice web interface.

In here, you will add a new camera, and set it up to point to your raspberry pi camera.

camsettingNow what is really cool here is you can setup a few cameras.  When I first set it up, I had 1 camera and then I found 9 traffic cameras and marina cams and what not from places all over the world and was able to plug them in.  Truly felt like a super villain being able to see everything!

Now that you have your cameras in motioneye we can now use the motion eye server to handle our motion detection.  See, I told you I would get there.

There are some cool setting here that you can do.  For example:

settings1

settings2

 

 

 

 

 

 

  • I have my video streaming setup so I can embed individual streams if I want into a web page, maybe a security camera sitemap page in openhab?
  • I have still images setup and capture when motion is detected.
  • I have Motion Detection configured that more than 5% of the frame has to change.
  • Then the fun part in Motion Notifications

I have a script configured on motion detection.


/usr/bin/notifycam.sh %t


This script is very simple.  It has 2 lines currently.  I honestly could knock it down to one.   Or I could add some additional code to handle different items for each camera.  The %t just passes in the camera ID.
57448311Ill go over that in a minute…. I SAID IN A MINUTE!!!!!!

On my Kodi media system in my office I installed this great add in called

Security Camera Overlay

It’s a very interesting add in.  You configure it for your security camera.  Well, I have mine connected to motioneye.

2016-06-16 20_46_26-ubuntudev1In MotionEye if you click on the Streaming Video there is a link in there called “Snapshot URL”

2016-06-16 20_48_34-KodiGrab that, you will need it to configure your Kodi system.

Put that snapshot URL in the Image URL field when configuring your add on.

 

 

 

 

2016-06-16 20_48_22-KodiOn the Behaviors tab, if your camera supports 16×9 I definitely recommend changing the Window width/height.  I have it refresh every half second and auto close after 4 seconds.

 

 

2016-06-16 20_37_41-KodiSo what does this look like?  LIKE THIS FOOL!!!!

It pops up right over Bob’s Burgers!!! refreshes a few times, let’s me see what’s going on and slides right back off.

 

Back to the script


/usr/bin/curl -g "http://xx.xx.xx.xx:8080/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Addons.ExecuteAddon%22,%22params%22:{%22addonid%22:%22script.securitycam%22},%22id%22:%221%22})"
/usr/bin/curl --header "Content-Type: text/plain" --request POST --data "ON" http://xx.xx.xx.xx:8080/rest/items/PorchMotionDetected

Explanation:

Line1: sends a json packet to my Kodi install in my office telling activating the great addon Security Camera Overlay.  This makes it slide over whatever you are watching.

Line2: sends a “motion detected” packet to openhab.  In my openhab Items file there is a simple switch I can add all my rules around.

downloadIn writing this I learned something today.  I am going to make a couple modifications in the future.

The notifycam.sh file will be adjusted down to 1 line.

It will just make the call to openhab.

But it will look something like

<pre>/usr/bin/curl --header "Content-Type: text/plain" --request POST --data "ON" http://xx.xx.xx.xx:8080/rest/items/CameraMotion%1

That way I don’t have to recode the script when I add a camera. I just need to add a new item CameraMotion<ID> to openhab.

Then I can add all the camera’s to a gSecurityCam group and build some rules around state change in that group. Then openhab can send out the notifcations to pop up the stuff on my kodi and any other kodi system I wish, as well as send me notices through other openhab notifcations.

I hope this was long enough for you…

 

 

Whole Home Audio Rig

So a while back (let’s not talk about how long ago) I found the site of HazyMat

Multi-zone audio: a discussion of the options

He seemed to have found a great solution for doing some work on whole home audio.  This is something I have been trying to find a good solution for myself.

I decided to test this out myself using the XAP 800.  xap800_l

 

 

 

maxresdefaultI picked this thing up on ebay for $24 bucks.  So I did some testing and was able to do some audio routing via serial port which means I can use Openhab to control the audio matrix.  Not the same matrix.  But as I have shown before, the connectors might be a pain in the butt to try to wire everything up.

ClearOne XAP-800 Professional Audio Conferencing System Pic 4

Screw down terminals are great but not convenient if you have it mounted in a rack.  Which is what I wanted to do with mine.

So how do we make this better?  A patch panel!!!
19-inch_rackmount_Ethernet_switches_and_patch_panels

So I started looking around.  I could do a keystone jack patch panel.  But then doing rca keystone jacks were going to be way more expensive than I wanted to spend.  $24 bucks for the audio rig and Im looking at $100 bucks for the patch panel….. NOPE!

So here is what I decided to do.  Use a 2u blank rack plate.  Like this one.  72621Buddy 069of mine had one laying around.  So far $0.  I know what you are thinking.  “Hey genius you don’t have any holes…..”

 

I know.  I got it.  Relax.  I busted out the blue painters tape and made some markings for the holes.  IMG_0678

 

Now off to the drill press.  Few drillings later we have swiss cheese!!

IMG_0679Had a super cheap pack of RCA jacks show up.

81DOZmuhh9L._SL1500_
Initially I was planning on doing all my cable management through the middle, so I had red on top and black on the bottom.  But then because I had the top and IMG_0687bottom row offset from each other it didn’t make sense.  So I ended up swapping them around.  I then soldered speaker wire to the back of each jack.  It took a while, but it was worth it.  Wired up to the screw terminals I now had a nice pretty panel.

IMG_0937

 

So I wanted to get things labelled up.  But my label maker is junk.  The sticky tape just falls off.  So I could paint.  But then it looks messy.  So then it hit me.  Vinyl!!!

I was able to pick up a craft cutter for super cheap (<$35) and designed up some labels, ordered some white vinyl.

CUT!!!

IMG_0939A little transfer paper and a crooked eye and I now have some much nicer labels.

IMG_0943

 

Now it’s all mounted up in my rack nice and pretty.  I have my main computer in my office routed through the device as an input source, and then my main speakers as an output.  Then a media center raspberry pi routed as another input.  It’s now mixed with the audio from my main computer.  Both computers using the same speakers.

 

New Firewall Status!

So a couple weeks ago I wrote about the new firewall setup.

Quick update on the status of that.  I built it out.  Got it working.  yay!

294989But I want more cool stuff.  So I have a business class fiber line run to the house with 5 static IP’s.  So I decided to see if I could get pfsense to do failover router.  You know, because why not.  I tried to get pfsense to install on this old thin client I had.  No go.  WAY TOO OLD!!!

So I moved on.  I too my esxi box and with the second nic ran it to another small unused switch of mine.  I then configured esxi with a second virtual switch that uses that NIC on the new physical switch.  I know, I could do that with vlans.  Duh!  But I am waiting for a cable for my switch so I can configure said vlans.

vSphere ClientSo with this new physical port I was able to build a pfsense box in my virtual environment.  I configured it with dual nics, 1 in each switch.  As you can see here.   My routers are named voot1 and voot2.  Named after the voot runner from the show Invader Zim.   My main network scheme is based on characters and vehicles from this show.

So now I have a physical router configured with one of my public ip’s   x.x.x.253.  Internal its configure as x.x.x.2.  I then configured my CARP ips.  You create a virtual IP for both lan and wan.   External is x.x.x.250, internal is x.x.x.1.

pfsense - New Page (1)

Set the outbound nat to use the .250 address and we are golden.  Setup all the carp sync settings to push the settings to the backup pfsense.  This works BEAUTIFULLY.   I was so amazed as how easy it is.  I just make a change pretty much anywhere in the main router and its automatically sync’d to the backup.

Once the backup is sync’d it’s time to test.   Reboot the primary.  Network dropped and didn’t come back up until the primary fully booted…

stewiegriffin-familyguy

Ok.  I got it.  The arp change caused some problems with the esxi side.  There is a switch security feature that blocked it.  You have to set the switch to accept promiscuous mode….. $%^& I think my switch is a slut.samantha_jones_promiscuitypromiscuous

 

Ok.  So now that my switch is acknowledged as a slut, it works.  Reboot primary router and the backup comes online, takes over the gateway x.x.x.1 and the external x.x.x.250.  This is awesome for various servers that I have in different datacenters that have ip security configured.

So this all went great, but the original reason for the upgrade was my old hardware choked itself out with my ipsec tunnel to AJ doing the encryption/decryption.  So we need to get the tunnel back up.   We got some time over this weekend to get the tunnel working.  We now copy back and forth at 30mbps.  30!!!!!   Fully maxing my fiber line over a secured tunnel and my cpu was only at 25%.  WIN!!!

 

BUT!!!!!! We have this awesome failover working…. will the tunnel come up on the backup too?   *checks the backup router* well the ipsec tunnel config was sync’d.  So what happens if I reboot the primary now….

NO EFFING WAY!!!!!  My tunnel re-establishes to AJ on the backup router too!!! HAHAHAHA this is awesome.

So Aj had asked me about a raspberry pi project on friday called pi-hole.  From the website..

“The Pi-hole is an advertising-aware DNS server that prevents ads from being downloaded. Once installed, configure your router to have DHCP clients use the Pi as their DNS server and then any device that connects to your network will have ads blocked without any further configuration. Alternatively, you can manually set each device to use the Raspberry Pi as its DNS server.”

But it seems like something that screams virtual machine.  I didn’t want to tie up a raspberry pi just for dns.  Turns out pi-hole doesn’t require pi hardware.  So it is possible to put in a vm.  So I configure a tiny ubuntu server and install pi-hole.

curl -L install.pi-hole.net | bash

Very simple.  But it works.  So I build out the vm.  Export it as an ovf and ship it off to AJ over the new tunnel.  He brings it up in his virtual environment and gets it working on his end.  Now to update our respective DHCP servers to tell our networks to use the new adblocking dns.   But… what if it’s down.  Ads/banners coub-1137363

There is a tunnel…. use each others as a backup!!!  Beautiful.

No my pi-hole is the primary on my network, AJ’s is secondary, and if both are down for some reason the network defaults to google.  services_ DHCP server

How well does pi-hole work?  Why do I keep saying pi-hole?  It sounds dirty.

pi-hole pi-hole pi-hole pi-hole pi-hole pi-hole pi-hole pi-hole

Yep.  Still sounds dirty.  But I got distracted.

Pi-hole Admin Console

That is insane…. 1726 ad’s blocked today.  We were gone for 4 hours and it’s still that high.  Crazy.  But you should see some sites without their ad’s.   Interesting.

This week/weekend has been pretty cool for getting some network stuff done.

 

Some projects and upgrades

So I have a few things on order coming from china for some various projects.

I figured since I haven’t posted much lately I will post some pre-project dribble.

Phoenix Connectors – Aliexpress

phoenix connectors I have these coming to be able to connect audio up to my ClearOne XAP800.   ClearOne XAP-800 Professional Audio Conferencing System Pic 4 xap800_l

The XAP800 is going to be added to my Home Automation system to be able to control/mix/route audio from various sources to various destinations.  If you want to read more about what this can do check out my buddy here.

http://hazymat.co.uk/2015/04/multi-room-audio-options/

 

3d Printer Upgrades

Its funny.   The whole time I have had my printer I have been constantly wanting to upgrade.  Maybe because I built my printer from a kit and know each piece.  I look at upgrades thinking, this will help just a tiny bit more.  This will make it a tiny bit better.  But also, I enjoy these projects.  So I have what I can only hope are my last big round of updates.  Nevermind.  I just thought of one more.  Bowden extruder…. but that’s for another post.

Motor Coupler – Aliexpress
The motor coupler is going be to used to connect my 5mm drive shaft to my below 8mm threaded rods.

Lead Screws w/ Copper Nut – Aliexpress
Replacing my current threaded rods and nuts with some nice thick Lead screws and longer copper nuts should add some additional stability and durability in that I won’t have to replace the nuts regularly like I do now.

Aluminum Build Plate – Aliexpress
The aluminum build plate will replace my glass bed.   I have hard it does well for heat distribution but also I need it for the below proximity switch.

Induction Proximity Switch – Amazon
I am going to get rid of current auto level setup.   I am going to the inductive sensor so there is no longer going to be a swinging arm.  This will hopefully improve start up time, and keep better accuracy.

shoppingUT82quJXalbXXagOFbXSReprap-Prusa-i3-3D-printer-parts-Anodized-Aluminum-BUILD-PLATE-for-Heated-Bed-3D-Printer-RepRap.jpg_640x64061fxf9nPCFL._SL1100_

 

Random

20 555 Timers – Aliexpress
ne555I have these 555 timers coming because I plan to use them on a small solar charge controller project I need for my Green Sprinkler system Project.

 

100 Optocouplers – Aliexpress
111781498246_1A couple weeks back I designed and tested a small circuit that will detect when the 12v accessory line in my car is turned on and off.  Using these optocouplers I will be able to use this signal to either power on my raspberry pi in my car, or to tell it to turn off.  This is going to be useful so that the pi doesn’t turn off as soon as I get home, but will be signaled to turn off in about an hour.  This will give enough time for sync jobs to run, backups and any config changes I want to do.

So there it is.  Some of my up coming projects

  • Big Printer upgrade
  • Solar Charge Controller
  • CarPi Power circuit deally (i need a better name)
  • Green Sprinkler System
  • Home Automation Audio Router

juggling-businessman-image

This guys has his shit way more together than I do.  Look at him!  He’s wearing a suit….  I barely wear pants!!!!

 

 

 

 

 

 

Raspberry pi 3 give away

I am sure most of you know but earlier this week the Raspberry Pi 3 came out.  In addition to that you know I am a big fan the pi.   Not that pie. Ok I like pumpkin pie too.  Sue me.
mccormick-signature-pumpkin-pie-14800001rca-ss

 

Lucky for us there is a give away of this lovely new device.

Want to get your entries in?

Raspberry Pi 3 Giveaway!!!
IMG_4090-500x334

This lovely little device is now 64bit, faster 1.2g, built in wifi and built in Bluetooth.

Those last two features are a big plus for me.  Since I have raspberry pi’s all over the house. Now I don’t have to add a usb wifi.  The Bluetooth excites me for my car project to talk to my obd-II connection.

Home Automation Move (part 2)

So, with a friday and a saturday worth of work on my home automation move here is what is complete.

  1. install server os on vm
  2. install openhab and all bindings currently in use
  3. move openhab configs over to new vm
  4. shutdown old openhab-pi
  5. configure raspberry pi with virtualhere server to share usb
  6. configure new vm server to connect to raspberry pi to communicate with z-wave stick
  7. install keepalived on new server
  8. configure virtual ip as my new primary ip for openhab access
  9. configure scripts to run to start openhab and connect to shared usb
  10. clone server to secondary vm for failover
  11. reconfigure keepalived to make second box slave
  12. test failover

So let me show you my keepalived settings and my scripts.

/etc/keepalived/keepalived.conf

vrrp_instance VI_1 {
     state MASTER
     interface eth0
     virtual_router_id 220
     priority 150
     notify /usr/local/sbin/notify-keepalived.sh
     advert_int 1
     authentication {
           auth_type PASS
           auth_pass fakepass
     }
     virtual_ipaddress {
         192.168.2.90
     }
}

 

See the “notify” line?    That script is pretty simple.

#!/bin/bash
TYPE=$1
NAME=$2
STATE=$3
case $STATE in
        "MASTER") sleep 30
                  /usr/local/sbin/usb-connect.sh
                  /usr/sbin/service openhab start;;
        "BACKUP") /usr/sbin/service openhab stop
                  /usr/local/sbin/usb-disconnect.sh;;
        "FAULT")  /usr/sbin/service openhab stop
                  /usr/local/sbin/usb-disconnect.sh
                  exit 0
                  ;;
        *)        /sbin/logger "unknown state"
                  exit 1
                  ;;
esac

 

So what that does it every time there is a keepalived state change it notifies that script.   That script then runs additional scripts based on the state.   So when it goes to “MASTER” or at boot time (which is why i have to put that sleep statement in there) it runs usb-connect.sh.  Which just has a couple commands

/sbin/vhclient &
sleep 10
/sbin/vhclient -t "USE,4294967409"

I’ll walk you through this one.

  1. runs the virtualhere usb client.
  2. waits a few seconds so the client can detect shared usb on the network
  3. sends a command to the running client “-t = command” specifying to “USE” the device with the id “4294967409”

The usb-disconnect.sh is a single line!

pkill vhclient

Thats it.  Just shutdown the client.   So now when the box boots up openhab1 becomes “MASTER” for openhab.  It then executes the scripts to connect to the shared USB.  Then starts openhab.

Once the second box is in place, all the same scripts and all will be put in place with 1 single change.

 

vrrp_instance VI_1 {
     state MASTER
     interface eth0
     virtual_router_id 220
     priority 200
     notify /usr/local/sbin/notify-keepalived.sh
     advert_int 1
     authentication {
           auth_type PASS
           auth_pass fakepass
     }
     virtual_ipaddress {
         192.168.2.90
     }
}

Notice line 5, the priority is a higher number than in openhab1.  This means that when the boxes communicate they will negotiate who gets to be master.   Then either box can start openhab and whoever is running openhab gets the USB z-wave stick.

Home Automation Move (part 1)

I have been running openhab for over a year now on a raspberry pi. I also run mosquitto mqtt broker with a great piece of software called mqttwarn.   On my phone I run owntracks.

FullSizeRender

So lets do a brief summary of what these pieces of software do for me and what I currently have configured.

Openhab – “a vendor and technology agnostic open source automation software for your home.”   That is what the site says openhab is and they are right.   Openhab is a core home automation system that has been designed to work with MANY different vendors and systems to make your home smart.   I have friends that got stuck with z-wave because they spent a bunch of money on z-wave and don’t want to replace it.  But there is also belkin stuff, wifi modules, home built devices (this is a BIG problem for third party controllers.)   Later on in this post you will see that I have used this agnostic approach to home automation to my benefit.

Mosquitto – “is an open source (BSD licensed) message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1.”  Okay, not quite as cut and dry as openhab.  So I’ll see if I can help.   MQTT (MQ Telemetry Transport) is a system in which devices and services can connect to a central system and communicate via very small, very efficient messages back and forth.  This efficiency helps in speed and bandwidth.  A device can connect and just wait for commands, a service can send a message to the mqtt server which in turn immediately passes it to the device connected.  MQTT is EXTREMELY more robust, but that is a simple paraphrase description of it.

MQTTWarn – “a pluggable MQTT notifier.”   Hmm, not as helpful, but now that you know what mqtt is you probably understand this a little better.   Jan-Piet Mens, the creator of mqttwarn and a very nice guy (I have personally had experience working with him in trying to accomplish various things) created this wonderful middleman piece of software.  Its almost like grand central station, or your telephone switch board, or the traffic cop.   Its a beautiful thing, I use this personally to do the following.

  • update dashboards in my office with current battery power on a couple devices using owntracks to get the battery data and pushing info to dashing dashboard. 2015-11-13 16_53_22-My super sweet dashboard
  • Show current bandwidth usage from my router (python service I wrote to query snmp data from my router and publish via mqtt and then pushing info to dashing)
    bandwidth
  • Pushing various alerts to prowl/growl
  • Push notices of events to my kodi installations

OwnTracks – “Your location companion.”   OwnTracks is an application that can run on android and IOS devices that uses the internal GPS info and reports back to your mqtt server.  This allows for a little better sense of privacy about our tracking info, but lets be honest if you have your phone on you, you are probably being tracked.  But it doesn’t mean we have to give our info to everyone, so we use our own systems to track us.  This also reports battery info with the location data it sends back to the system.  Why would you want this?  Well I use it to detect when I am home for presence detection.  I also use it to have my home automation system know when I am leaving the office each day.

 

For devices I have integrated, I have..

  • a couple z-wave devices
  • 2 phillips hue lights
  • 2 belkin wemo switches
  • Logitech Media Server (squeezebox server) for media
  • 2 Max2Play raspberry pi setups.
  • 3 Kodi installs
  • 2 mobile devices via owntracks

 

So what am I doing moving this?!?!   Well, this is a good question.  The system does work in its current setup.  However, as every project must, there has to be a very high WAF (Wife Acceptance Factor) if the project should ever be allowed to leave your workspace…  Since I am pushing very hard to start putting some bigger pieces in the rest of the house (home built IR blasters, wall panels, in-ceiling speakers for voice notifications) I needed to increase the WAF.  So, I have found that there are 2 things that make this much easier.

  1. Must be easy to use.  UI is key here, if others in the house can’t use it, its junk.
  2. Must work.   If the wife can’t turn on a light because something is down, its junk.

Those 2 key pieces of info really fit and help.  So UI I believe I already have covered with a nice easy touch interface available on EVERY device in this house including some tangible remotes.   So number 2 is the obstacle to tackle.  It must work.  So redundancy/fault tolerant is key.  I have 2 seperate esxi environments in my setup here at home so I am going to place 2 openhab systems in virtual environment with heartbeat, failover and a virtual IP.  To share the physical z-wave stick I am taking the raspberry pi and using virtualhere to share the 1 USB device with both controllers.  This does still present a single point of failure for z-wave stuff.  But it is not all the system so its better.  If anyone has any thoughts on how to add redundancy to that Im all ears.

So here is what my goal is for my controller setup.

Openhab Layout - New Page (1)