Building a WiFi enabled IOTs refrigerator temperature monitor with a Raspberry Pi | raspberry pi refrigerator temperature monitor via wifi internet of things

Refrigerator monitoring is a big thing, especially for commercial reasons. So i thought this is perfect raspberry pi territory.

A $50 raspberry pi, a $3 USB extension cable and a $10 USB temp monitor is all it takes. Commercial products that perform the same task cost $500+

So lets start off by updating the OS and installing all the applications we’ll need.

Lets check that the USB temp sensor is connected and online.

Lets download the source for the temp sensor.

The is how you get a reading.

I wrote a script which just grabs the Celsius reading and logs it in a log file, I have this running every minute. This is just for testing purposes, ultimately we’ll get Nagios to monitor the reading and alert based on their outcome.

 

 

Howto setup Raspberry Pi 3 with Mesh wireless networking using B.A.T.M.A.N. | raspberry pi 3 wifi mesh networking batman howto

For around two years I have been trying to get Mesh networking going on the raspberry pi’s. I have used different Pi’s and bought a heap of USB Wifi dongles which also did not work.

I tried again the other day using an out of the box raspberry pi 3 with the standard Jesse Lite os, this worked.

I have been testing the setup lately and I’m really impressed. I have been able to have connectivity throughout my house and into the backyard, this is around 50+ meters of connectivity through brick walls. I will continue testing of the range and application features.

Here is the howto.

FIrst, we install a few packages we might need.

We download the BATMAN source, and install it.

Here we’ll create the script which we just to establish the wifi network and mesh networking. Save it to /root/mesh.sh. Make sure you change the IP address at the last like and increment upward for each device you setup.

Make the script executable.

Add an entry into the crontab to run it at startup by typing “crontab -e” and adding the following line.

Reboot the Pi and it should be operational, to test type “ifconfig” it should look like this.

Note: the bat0 is the mesh network and the eth0 is the hardwired network connection.

Once you have all the devices online, you can ping to see if they’re online or type this to see if batman can see them

Should look like this.

In this example you can see three other Pi’s online.

 

Raspberry Pi – Xbian 1.0 – Kodi 17.0 Default username and password | default username and password for kodi 17.0 xbian 1.0

Been looking this is solution for ages! Finally got it!

Usually the default username and password for Xbian is

username: pi

password: raspberry

But in this scenario its different.

 

 

Apache Load Balancer and reverse proxy howto | Apache2 load balancer reverse proxy howto

I wasted alot of time trying to figure out how to use Apache as a reverse proxy to load balance two of my web servers.

I thought I would write a little howto on how to get this up and running quickly.

I know used this setup with docker, using two containers running a standard installation of Apache and the other running Apache with the below configuration (Load Balancer)

Lets get started

The following commands will install all the required software using apt and aptitude.

Run the following to install all the required Apache modules.

Now we need up edit the following Apache configuration file.

This is what the configuration file should look like, please change the IPs and ports of the webservers your proxying.

Restart Apache and your ready to rock and roll!

 

Howto open ports into your Docker containers | docker ubuntu how to open ports in containters

I’m playing around with docker containers, I just wanted to build a docker container and run a service on it which will be accessible externally.

Lets start by getting a fresh ubuntu image from the repos.

Lets see what images are now available, you should see the latest download in the list.

You see this. We’ll pick the newest one.

Now this is how we select the image and open the ports, see the “-p” switches? This will open SSH (22) and Web (80).

This will build the container, once your at the logon prompt you will need to install the services, ie

This will update apt and install apache and ssh

This will start the services.

This will enable the services to start at startup.

Now the container is setup we can exit out.

Once we have exited we’ll start the container.

Now we need to find out if the container is running, and if its running which random ports its assigned to our services.

That command will display the following.

Now the above output tells us the container is running and it has assigned ports to out services. So if you put up the webbrowser on your computer and put the hosts IP in like this,

Now you should see the apache test page.

or is you want to ssh into the container enter this command

Just name sure you setup a user account on the container first.

Building a 24/7 Raspberry Pi using offgrid power. Solar and battery operated outdoors. | raspberry pi 3 iot 24/7 solar panel battery charge cmtp02 wifi mesh node weather station

After doing months of research and experimentation I have finally completed my task. Building a raspberry pi with the ability to running 24/7 outdoors off grid using batteries and solar power.

Why? There are thousands of applications for this kind of setup, here are some I would like to experiment with in the future:

  • Mesh network node, over a wide area
  • Weather station
  • Outdoor wifi hotspot
  • Outdoor wireless camera node
  • Wifi bridge

Priorities. Project objectives were,

  • Cheap
  • Waterproof
  • Heatproof
  • Robust
  • Simple

Considering this was a experiment / proof of concept this was put together using things I found around the house, obviously if this was built for commercial applications the housing would need to be built using steel and this would make the costs go up. This was built using the following components and costs:

  • Raspberry Pi $49.50
  • Raspberry Pi Case $10.85
  • Micro USB Cable $1.00
  • 12v to USB Converter $5.11
  • Solar Charge Controller CMTP02 $12.00
  • Solar Panel 60Watt $59.98
  • Bucket
  • Battery AGM12-20 $65.00
  • Total: $203.44

Once I had all to components I used Styrofoam which I found in my garage to build a base which will be located at the bottom of the bucket, the objective will be to hold the battery in place and also insulate it form the suns heat. see below.

 

 

 

 

Once we have a nice tight fit, we’ll install it in the bucket. I will also use the leftover Styrofoam which I have crusted into small pieces to fill the gap between the battery and the wall of the bucket. This will stop any movement and will also provide insulation to the battery itself.

 

 

Now we need to take note, I have completed a similar experiment here where I tested the battery and Raspberry Pi alone without solar or controller. I managed to get 4 days uptime.

Next we will need to run the wires required for the solar panel, I drilled a hole at the bottom of the bucket and brought the wires up to the top. I did this because if water comes through the hole it will stay at the bottom and not harm the electronics.

 

Next we make another circle with the Styrofoam and fit it on top of the battery, this is where we will house the electronics. Its the safest place as the lid will be water and air tight.

 

Now we can connect the Solar controller CMTP02 to the battery and to the Solar panel, finally onto the 12v to USB controller.

 

Bringing it to life! Install the raspberry and have it connect to my home wifi network. Then seal the bucket and setup somewhere in the backyard where it will get the most sun,facing North (In Melbourne).

Now Im will testing this setup, it should run forever like this. During my first setup run, I had connected the solar panel the wrong way due to bad color coding on the cables. Now that its fixed its been running for three days and the battery is currently on fill charge.