YO8RXP radio shack -- Smart home controller

For the love of coding... Xiaomi BLE temperature sensors, Raspberry Pi, Python, HTML , PHP, MariaDB and the cherry on top... the mighty BASH ! ..... work in progress !

Raspberry Pi, Official 7 inch Touch screen and Kivy framework

In March 2022 I start building my own radio shack as a house, a small one but with all necessary needs . This house will respect country traditions, but some hidden high tech also,  like my smart home controller. Will provide basic electric floor heating , A/C , remote control/ supervisory  and will also be capable of remotely control all my hamradio devices.

  • Xiaomi BLE interogated via pure BASH gattool  within bluetooth tools.
  • Values stored in MariaDB database.
  • Python-vlc in charge of headless media player.
  • Python multiprocessing to avoid  touch screen lag.
  • Kivy framework driving all kaboodle.
  • Custom CRUD API to get mobile phone remote access.
  • A lot of new programming skills yet to be learned.
  • New front plate will be CNC build, to be  inserted into wall at a comfortable height.
  • A small custom UPS is yet to be built, to ensure a minimum 3 hours of normal  operation if main power fails. It will assist 4G mobile router also.
  • Half of the roof will be filled with 12×500 W solar panels connected to national main grid, about 50 KWh/day will be produced during summer days, about 5 months of power production per year.
  • This Green energy production will allow my to get electricity zero cost for main city home and what goes extra  will be pumped into electric boiler cascaded into gas heating in order to lower the gas cost there. Is a long project but hopefully I will get it done !

Electric floor heating

Xiaomi BLE temperature sensors will provide inside climate feedback towards Raspberry PI, which via power relays and contactors will start / stop about 20 square meters of Magnum heating foil underneath laminate flooring. Also, hardwired Dallas temperature sensors will be placed beneath heating foil to measure and prevent overheating. Entire shack area will be covered by 5 x Magnum heating foils, thus 5 Dallas sensors will be needed in Daisy Chain configuration, of course with alert and stop if abnormal function detected. Entire radio shack will draw about 2.5 KW/h just for heating, so will have in mind a future photovoltaic system .

A/C room cooling

Same sensors will be used for A/C cooling, also via power relays + contactors. While my A/C unit does not have wifi capabilities, I will try to bitbang the A/C remote control and LED display in order to get A/C feedback towards Raspberry Pi, something like a pseudo CAN bus.


"Create, read, update, or delete entries " . Will aproach CRUD instead of REST, just to learn something new.

Kivy framework + official 7 inch touch display

Raspberry pi will be running in server mode, no GUI enabled. Also many other packages stripped away just to be as light as possible without being bloated. Max refresh rate at clock schedule 0 will be just about 30 fps, more than enough to playback videostream also, not sure yet if necesary .

Sonoff 4CH R3 as failsafe secondary mechanism.

Even if I do not fancy Chinese EweLink app, this device is needed to cut off entire house electricity if for some reason, Raspberry pi fails and that could lead to fire hazard.
For example, If I remotely power ON the heating 4 hours before arriving at country house in winter time and suddenly there is not ping back or response for 5 minutes, I want to have the ability to shut down the entire house, using a different system than Raspberry Pi.

System ready for radio remote operations

Sonoff 4CH R3 having 4 distinct relays, it is as simple as pie (raspberry pi) to remote power ON / OFF just for radio equipement without powering other home appliances.





Shack construction



Me and my father been working on this project just about 3 weeks cumulated work time. For 2 days, my younger brother helped us with the roofing. For a first time in my life, I’d say 2 cm total deviation  for entire construction is not bad at all. Metal roofing instalation went just great since all sheets were custom cut for roof width, horizontal overlapping alignment was the only thing I had to take care of. This weekend will fence it  up using OSB sheets in order to prevent snow getting inside and I will call  the day off for this year and continue in spring 2023. 

Once solar panels  will be put in place. about 7.2 Megawatt hour will be produced each year, enough to get zero cost for main city home and about 3.2 Megawatts/ year will be fed into gas heating system in order to trick it not starting the burner.


Click here for live DEMO

  • Until this project is finished and password protected, here is the link. It actually changes values into Raspberry Pi !
  • Web page still looks bad but right now I focus on functionality !
  • Apache proxy is serving data from Rpi via OpenVPN network and exposing it to public yo8rxp.com server. At the end will  have its own SSL certificate !
  • Data is sent as $_GET method to self page and redirecting to self also after MariaDB update in order to prevent F5(refresh) to send same data over and over.
					        def db_read(self,dummy):
            mydb = mysql.connector.connect(host="localhost", user="******", password="**********", database="home" )
            mycursor = mydb.cursor()
            mycursor.execute("SELECT img FROM openweather WHERE id = 0")  
            self.myresult2 = str(mycursor.fetchone()[0])
class MyApp(App):
    def build(self):
        # Set up the layout:
        layout = FloatLayout()
        #Instantiate  UI objects ):
        main_screen = Main_Screen()
        # Add the UI elements to the layout:
        Clock.schedule_interval(main_screen.update ,1)