Blog Moving

Blog is moving from WordPress to GitHub pages.

Link : https://blog.mphomphego.co.za/

 

metro-self-storage-moving-box

Apologies for the inconvenience caused.

 

Advertisements

Smart Doorbell using Raspberry Pi

About a year ago, I had to do a project titled Smart Home Automation using a Raspberry Pi and Arduino, part of the project  incorporated a doorbell but not just any doorbell but a Smart doorbell.

Why do I call it a Smart Doorbell?

A classic doorbell can be defined as a signalling device typically placed near an entry door to a building. When a visitor presses a button the bell rings inside the building, alerting the occupant to the presence of the visitor.

The smart doorbell, works in that manner however when a visitor presses the doorbell button it notifies the occupant with an images of the visitor and also sends an email, sms and push notification (to an smart device) to the occupant in case they are not able to hear the bell ringing.

If the button is pressed a pre-recorded voice notification is played for the occupant to check the door as there might be someone, this happens concurrently with an sms notification while a picture of the visitor is captured and sent to both email and push notification. Initially there was a feature to enable 2-way real-time video communication but due to network latency and high resource usage the feature was deprecated.

Click For A Demo

Comment if you need the code

See code snippets(Initial Revision): https://mmphego.wordpress.com/2015/01/11/smart-doorbell-using-rpi-with-voice-and-email-notification/

Sublime Text useful python snippets

For the past few months, I have been trying to move from using Geany to using Sublime Text as my primary text editor.

I find myself repeating some repetitive operations dozen times a day when coding in python, such as import IPython;IPython.embed() and etc.

So here are some of my Sublime Text snippets to enhance my productivity, and simplify my life.

Sublime Text 3 makes it super easy to create a snippet. You simply select Tools > Developer > New Snippet from the toolbar menu and you’re off to the races!

1. IPython debugger

Type ipyt and press tab to automatically insert IPython debugger under current pointer.

<snippet>
    <content>
        <![CDATA[import IPython;IPython.embed()]]>
    </content>
    <tabTrigger>ipython</tabTrigger>
    <scope>source.python</scope>
    <description>Interactive IPython debugger</description>
</snippet>

2. Docstring

Type docstring and press tab to automatically insert a numpy-style valid
docstring pattern right after your function definition

<snippet>
    <content><![CDATA[
"""${1:One liner description}
Parameters
----------
${2}
Returns
-------
${3}
"""
]]></content>
    <tabTrigger>docstring</tabTrigger>
    <scope>source.python</scope>
    <description>Adds a docstring skeleton to function</description>
</snippet>

and save your snippets with the .sublime-snippet file extension in /home/$USER/.config/sublime-text-3/Packages/User

Bachelor’s project demo

So after completing my diploma, and it becoming redundant in the working industry. I had to set my eyes on a Bachelor’s degree.
Trust me it was not easy, in the sense of being a part-time student, full-time employee, a father, a fiance and being stuck on some island for 15 months then when you come back you’re residing in Cape Town and the university in Pretoria.
I think I can write a book with my life’s story.

Long story short, I managed to complete my degree within 3.5 years instead of 2 – which was a bonus, And now I have set my eyes on a Master’s degree just to challenge myself one thing for sure, one doesn’t need to be stagnant in life.
I believe in continuous improvement of oneself.

Let me stop yapping and show you a demo of my Bachelor’s project

If you like give thumbs up.

Raspberry Pi – using GPIO / WiringPi without root (sudo) access

Dissection by David blog

Just needing to get this down quickly and succinctly…

The Raspberry Pi is super-fun for me as it’s a full OS (Linux, which I really like a lot) with Pins!  Current project: make a (private) website that will let me open/close and check my garage door.  Maybe more on this later.

SUPER frustrating is the inability for a web-server to control the GPIO pins on my Raspberry Pi because the web-server is not running as root.  Really?!?

View original post 336 more words