Skip to main content

Posts

Showing posts with the label Raspberry PI

Control OpenHab using Telegram Messenger

Recently, I've been trying to discover a way to control my OpenHab instance using Google Assistant. It is rather easy to do this using  IFTTT , but only when You use OpenHab in a cloud. I prefer using private instalation of OpenHab in my LAN, so that was not an option for me. I was searching for another solution, but only app supported by IFTTT which might be usefull form me was Telegram messenger. The only problem is, that OpenHab does not support Telegram controling by default. I google'd a little and it turned out that Telegram has a great public API with good Java support, so I decided to write a simple Spring Boot application as a bridge between Telegram Bot and OpenHab instance. You can find source code of my application on my GitHub account: https://github.com/aogorek/openhabtelegrambot In order to run it there are few steps required: 1. Create Bot in Telegram Messenger First You have to create Your own bot to communicate with. You need to contact @BotFather...

Smart home with Raspberry PI

My first home automation system was based on Arduino and Raspberry PI . All the relays I wanted to control, the switches from which I received signals and temperature sensors that I used, were connected to the arduino mega with ethernet shield. Arduino was responsible for storing the states of individual devices. I had the MQTT server installed on Raspberry PI. Arduino sent all signals to the MQTT  they were downloaded by OpenHAB and made available to the user via a web GUI or a mobile application.  In addition, OpenHab could send user commands to MQTT. Arduino read messages from MQTT queue and updated the status of home appliances. The solution had one basic advantage: it worked :) However, there were a few problems that I mentioned in previous posts. These included: - complicated architecture - in case of problems there were many places to verify. - problems with power failures - arduino with ethernet shield has problems with proper boot after power outage. The...

Raspberry PI and additional GPIO pins on several mcp23017 chips and a transistor switch

Some time ago I came to the conclusion that the home automation control system I made before was too complicated. I've been using a Raspberry PI + arduino + ethernet shield + additional connector board.  Arduino together with ethernet shield sometimes causes problems, especially after power outages. It has problems with restarting and requires manual restart. So this was the element I wanted to get rid of. It seems that the raspberry PI itself should definitely be enough. The only limitation is the number of GPIO pins and current efficiency. To avoid that problem I have already started designing the PCB which, when connected to raspberry, will provide us with additional pins and the ability use more power consumng devices. The easiest way to gain additional pins is to use the mcp23017 chip. It uses I2C bus to connect to the raspberry PI. Each chip will provide us with 16 additional pins. The chips can be connected together in chain, so you can have even more pins. I calculated t...