Posts

Home Automation with Openhab

I have recently started a new project in the area of Home Automation. My goal is to use as much opensource as possible and ofcourse do not pay more for brand names (like Philips) when it comes to buying smart products. My setup:  - Hardware: Raspberry Pi 3 (You can choose Pi 4)  - OS: Raspbian (Raspberry pi OS Lite version). Download here  - Automation Tool: Openhab  - Motion and Light Sensors: Motion and Light sensor.   - Smart Lights: IKEA  - Wireless protocol: Zigbee  - Zigbee Broker: CC2531  - MQTT Broker: Mosquitto   Why I chose what?  - Raspberry  Pi3: Because it was the only low powered computer available at my home which I can run 24/7. If you are buying new one, go for Pi4. If you already have a PC/Laptop at home which runs 24/7 then you should use that one.  - OS: The reason I am using Raspbian is that I want to run other applications on Raspberry along with openhab so I didn't want to use Openhabian. If your Pi will be used only for openhab then go with Openhabian.

SSH Tunneling or SSH Port forwarding

Image
One of the tricky topic is SSH port forwarding. There are many tutorials about this but they are quite complicated for students or junior level engineers to understand. Here I will try to explain those concepts using scenario so that it can be easily grasped.  Scenario: Your office firewall blocks access to facebook.com URL. Your laptop at home can access facebook.com easily. Your office environment/firewall allows SSH connection to your home laptop. Goal: Make office PC access facebook.com without performing any changes to office firewall. Description: In order to achieve this your home laptop needs to run SSH server. What we need to do in this case is to create a SSH tunnel from Office PC to Home Laptop and do some port forwarding.  In above figure you can see that if we can create tunnel between office and home machines. Just a SSH tunnel won’t allow us to access facebook.com from office PC. We need port forwarding here. In order to achie