Security Cameras

As we’ve now got a cat hole in the garage wall to allow free entry to Mephistopheles and Celobra – giving them a bolthole in advance of builders coming in to do the kitchen – we decided to set up a CatCam so we could monitor them when they go in and out. So I bought one of these:

Unfortunately the stream from this is only visible using the Tapo app on iPhone. What I really wanted was for Sam to be able to view a live stream of it on the internet from Canterbury.

Investigations led to iSpy – a freely available web-based agent that, in theory, should be able to take a direct stream from the IP address of the camera.

https://www.ispyconnect.com/

It took an age to get this set up correctly. But I managed it. There are a thousand different protocols. In the end I picked an IP camera fed in an IP address with username and password and it seemed to work.

Then I got ambitious and decided to add the security camera we have on the house. Different make, differnt model, different protocol. But this was surprisingly easier.

Then, the big challenge: How to get both of these viewable on the internet at large? Opened up port forwarding, grabbed the IP address of our home network, and….

http://86.23.239.235:8090

which doesn’t seem to work for people outside the home network. So this…

http://ispyconnect.com/app

Published
Categorized as Hardware

iSpindel

As part of my venture into home brewing I need* to monitor progress of fermentation. Typically this is done using a hydrometer – a weighted glass bulb thing that floats in the brew to a certain depth. The idea is that the more sugar there is in the brew, the denser the liquid is, and the higher the hydrometer floats. As the sugar is converted to alcohol by the yeast, the liquid gradually becomes less dense and the specific gravity – alcohol strength – can be read off.

Two problems with this with the closed cask Pinter system I have on order:

  • The cask isn’t tall enough to accomodate a classic glass hydrometer
  • I couldn’t read it anyway as it is sealed in.

The solution is(n’t) simple! I bought an iSpindel. This is an electronic hydrometer comprised of a waterproof plastic cylinder containing a couple of circuit boards and a rechargeable battery. Basically it monitors temperature and tilt of the device. The more the device tilts in the liquid, the more dense the liquid is, and the more sugar there is and the less alcohol there is.

The third circuit connects to the wifi in the house and sends data.

To access the data you need to connect to a ubidots account which is a generic dashboard system designed for monitoring measures and triggering events based on values.

What I really wanted was to link this with IFTTT but there doesn;t appear to be an easy channel on either ubidots or IFTTT to enable that. The perfect scenario for me would be to collect the data over time and be able to plot specific gravity by temperature by time butthere is no way to readily access this data without paying a huge subscription fee.

So I’m building my own, using the cURL function in PHP to access the latest JSON data deom ubidots. It’s early days but I’m learning as I go.

<?php

$headers = array();
$headers[] = "x-auth-token: REMOVED";
$headers[] = 'Content-Type: application/json';
echo 'Headers set up in array...</p>';

$ch = curl_init();
echo 'CURL initiated empty...</p>';


curl_setopt($ch, CURLOPT_URL,"https://things.ubidots.com/api/v1.6/devices/ispindel000/temperature/values/?page_size=1");
echo 'URL set...</p>';

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo 'Returntransfer set...</p>';

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
echo 'Headers set...</p>';

$fp = fopen("brew.txt", "a");
echo 'File initiated for writing...</p>';

//fwrite($fp, "Go...");
//echo 'First line written...</p>';

curl_setopt($ch, CURLOPT_FILE, $fp);
echo 'File for CURL to write to set...</p>';

curl_exec($ch);
echo 'CURL executed...</p>';
if(curl_error($ch)) {
    fwrite($fp, curl_error($ch));
}
curl_close($ch);
fwrite($fp,"\r\n");
fclose($fp);
//    $state_result = json_decode($state_result); 
?>

Switch Tags

Sam and I wanted to get all of the benefit of the Nintendo Switch Amiibo system without (very much of) the associated cost. So instead of investing our money into the plastic figurines we purchased:

  • an Adruino board (~£20)
  • a RFID board (~£15)
  • Some blank RFID programmable cards (~£7) but be sure to buy the correct ones. Earlier standards don’t work, as we discovered.

And then we did a bit of online research.

The first thing is how to wire the whole lot up. This is how we did it:

Wiring up the hardware

The next task is to program the Arduino. We used libraries that are linked to from

Worth a read

You need the latest RFID cards:

RFID

These are one-time-only writeable so it’s good that they are relatively cheap. Bottom line is – it all works and we were able to download the codes for the Amiibos, create our own cards with the relevant information, and use fruitfully. What a great system.

Fun for meetings

I read the other day of somebody who had cunningly put a large QR code on their background when attending Zoom/Teams meetings as we all need to do nowadays. When this code was scanned by anyone in the meeting then it made the lights in their office turn on or off.

There’s something that I immediately needed to do. So I did. I already have a Philips Hue bulb installed in my office so things were relatively straightforward but nevertheless it took some doing:

  • Had to install new Philips Hue hub. We’ve been running with version 1 for years but the lates software and app only work with the newer model. Fortunately I had one of these ready to install as I hadn’t got aroud to doing it yet.
  • Link Philips Hue account with IFTTT account
  • Create a Maker Webhooks trigger that triggers an event when a URL is POSTed or GETted.
  • The trigger triggers a toggle event on IFTTT on the hue bulb in the office
  • Created a QR code pointing to the wekhook URL. Printed out the code and stuck to the wall behind me.
Turn light on and off

Then I decided to do the same for Claire. She hasn’t got a Hue bulb in her ceiling spotlights so instead I added a spare Teckin smart socket to her floor lamp. This was more complicated as I had to set up an event via the IFTTT app on phone, connected to the Smart Life app. But it seems to work.

Claire’s light
Published
Categorized as Hardware

Photon drives ePaper

One thing I’ve wanted to do for ages now is to use a Particle Photon board to place information onto an ePaper electronic ink display.

The problem has been that it is impossible to find code libraries for any specific ePaper device you might own. I bought the one below at reasonable cost and thus far have only managed to drive one third of the display. I’ll keep at it.