Loading...

Set up Blue Iris Surveillance software with IFTTT

I have two cameras in which I’d like to always have a notification for if I’m not home. Initially I set this up to always send me an alert but I’m sure as you can imagine, my phone blew up with me walking around. Blue Iris has a neat feature which is simply a traffic light. If red, it will disable various things including recording (not desired for me in this case), but it can also disable alerts. I selected to only disable alerts if the traffic light is red. In the past, I had never used this feature. So here’s a brief how-to.

Click settings button and modify the settings as illustrated.

Set User Account that will perform this action.

Set Traffic Signal to Alerts Only

Verify web server port & disable Secure only for the web server

  1. On your server computer (Blue Iris Windows machine), install something like WAMP or XAMPP to handle web requests.
  2. After install set up a script similar to this one in PHP (create a php file with the name of your choice and .php extension):
    1. After you’ve created the script, drop it in your HTDOCs directory in WAMP or XAMPP
      1. For example, my directory is here: C:\Bitnami\wampstack-7.1.19-0\apache2\htdocs
<?php
$home = $_GET['home']; //get and set variable for the home status.
$my_file = 'log.txt'; //store logs so we know if our server is being used improperly and by whom

if($home == 'true')
{
	$handle = fopen($my_file, 'a') or die('Cannot open file:  '.$my_file);
	$data = date("Y.m.d.h.i.s") . ' on requesting ip: ' . $_SERVER['REMOTE_ADDR'] . ' Request to set RED.' . "\r\n";
	fwrite($handle, $data);
	fclose($handle);
	file_get_contents("http://10.1.1.99:8080/admin?user=admin&pw=password&signal=1");
	echo "home";
}
elseif($home == 'false')
{
	$handle = fopen($my_file, 'a') or die('Cannot open file:  '.$my_file);
	$data = date("Y.m.d.h.i.s") . ' on requesting ip: ' . $_SERVER['REMOTE_ADDR'] . ' Request to set GREEN.' . "\r\n";
	fwrite($handle, $data);
	fclose($handle);

	file_get_contents("http://10.1.1.99:8080/admin?user=admin&pw=password&signal=1");
	echo "away";
}
else
{
		
	$handle = fopen($my_file, 'a') or die('Cannot open file:  '.$my_file);
	$data = date("Y.m.d.h.i.s") . ' on requesting ip: ' . $_SERVER['REMOTE_ADDR'] . ' FAILED REQUEST!!! Request: ' . $home . "\r\n";
	fwrite($handle, $data);
	fclose($handle);
	echo "invalid";
	//donothing
}
?>
  1. Now let’s explain the URL in there so you can get an idea of what is happening and how Blue Iris is interpreting it. http://10.1.1.99:8080/admin?user=admin&pw=password&signal=1
    1. Where 8080 is the port you’ve set blue iris to
    2. User is the user account you create in Blue Iris
    3. PW is the password for said account (recommended to restrict this account down to admin tasks only not viewing rights or anything else).
    4. Signal is the traffic symbol where 1 is active (green) and 0 is inactive (red).
  2. Now if you browse to your local host URL 127.0.0.1/myphpfile.php?home=false you should have a value returned. In this case, you should see “away” in your web browser. If you see this, that means your PHP script is working. Blue Iris at this point should also change the animation in the traffic symbol.

  3. Let’s take a moment to understand all of what just happened and why. You set up a web server with a script to change the alert status on the local Blue Iris machine. Now you’ll need to expose the web server to the internet (or if your security aware, you may also set it to only work with IFTTT IP addresses). This step I will not outline as there are too many router combinations, but you need to port forward to your web server.
  4. IFTTT is super easy! Just log in, select Location for the “this” (set up an enter an area and set it appropriately for your home) and a “that” with a webhook in which you will put in your IP/ domain so something like x.x.x.x:PORT/myphpfile.php?home=true for enter and home=false for exit. You will create 2 webhook applets, one for enter and one for exit, each with the appropriate URL.

This guide is somewhat advanced as it assumes you know/ can port forward and you have a static IP or a domain set to change with your IP.

InvoiceNinja Install CentOS with Apache

This application is quite useful for tracking payments. This quick tip is going to only go over the app installation for self-hosted versions (not setting up a server from scratch).

What you need to have:

  1. A CentOS server and Apache with PHP updated to version 7 or greater. (By default you usually get PHP 5.6. You may need to manually update this to 7. There are tutorials online for this)
  2. Knowledge or Google-Fu on Virtual Hosts with Apache
  3. Basic knowledge on moving files/ editing files within a Linux system.

What you need to do:

  1. Download the files. You can do this through commands like wget on the box or download it from www.invoiceninja.com on a Windows box and upload it to your web server.
  2. Extract the files either on your linux box or before uploading them through a utility like Filezilla
  3. Move (mv) the files to your web directory (IE: /var/www/html)
  4. I tend to put the application under a folder called ninja and modify permissions/ owner appropriately. Modify/ create a Virtual host for 80 and 443 pointed to the directory /var/www/html/ninja/public.
  5. cd /var/www/html/ninja
  6. composer install
  7. composer update
  8. Now when you navigate to your URL (IE: website.com or web.site.com), you’ll get the setup prompts.

Remember & Note

  • The .env is your settings file. It’s required to connect to any existing database if you are doing an update. If you update, please move this file to the new folder you upload.
  • Composer is a utility that will download necessary dependencies that Ninja will need to run. I tend to run these two commands every time I update the software to get the latest and greatest versions of all the dependencies.

 

Customer Ticket Tracking

I have found one of the best open source ticket tracking systems so far to be OSTICKET. I have been using it since 1.6 (still use 1.6 daily to keep track of customer tickets), but it works great, it’s easy and open source. They offer a hosted solution as well. I’ve already customized my 1.6 version to be the way I want it so I’m still stuck on that version, but 1.8.1 looks great and seems to do a good job. Maybe one day I’ll move to the new version, but they got a bit advanced in their PHP and it’s more complicated for a basic user like me. I strongly suggest the use of OSTicket.
OsTicket

error: