browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Tagged With: Planning

Micro-goals – Small scripts I want to run

Introduction

While developing my dsbox idea i’ve considered building on existing technologies but none of them provided exactly what i wanted. In considering what those technologies lacked, it helped shape something i hope to build, which i am calling Micro-goals

Technologies that didn’t offer what I wanted

  • Linux cronjobs
  • Yarn map reduce jobs
  • Microservices

What I intend for DsBox Micro-goals

Micro-goals will consist of the following criteria

  • when to run – the time window ( which may recur )
  • where to run – based on hw & resources
  • how many instances to run where  1 <= n

dsbox instances will be stopped and started, there will be no permanent leader/master, nodes will use consensus like protocols to agree what runs where. I hope to make this a hive setup with a shared set of goals that are small micro sized.

Categories: HomeAutomation | Tags: , , | Leave a comment

Software layers in dsbox and building a maintainable system

Introduction

The easy bit with software is writing it. Maintaining and upgrading software is hard but also the most important part .  One trick used in software design is to use layers where each layer focuses on specific functionality. Each layer has a well defined set of dependency and assumptions on the layer above/below. Well designed layers allow independent maintenance and upgrades. Different software languages and threading models suit different layers.

The Software Layers

The layers I have plan to use in dsbox are

  1. Base operating system layer. DsBox currently runs on Raspberian Jessie.
  2. The management layer is a java process called dsboxcore which
    • Uses Upnp to discover other instances and to be visible from local desktops
    • Exposes a http (jetty) web interfaces for management
    • Coordinates with its peer dsbox units to maintain a replicated file space.
    • Provide a  distributed reliable micro-goal scheduler. Think of this as a cross between lambda functions and a cron daemon.
  3. The utility layer
    • c++ io modules to wrap hardware interactions into utility scripts
  4. The logic layer
    1. Initially simple python scripts with “if this then that” logic
    2. In the distant future smarter “learning” systems to predict what i want and respond to voice requests

The natural world

In a sense this models natural world. The base layer is the physical body. The second layer is the nervous system. Complex but atomic actions like breathing and seeing are the third layer. The final layer is the brain and reasoning.

Categories: HomeAutomation | Tags: , , | Leave a comment

Smart lightswitches – Refined first goal

I have decided not to include audio  ( microphones or speakers ) in the smart lightswitches i am creating.

The lunchboxes i am using to house my first home automation project have limited space. From research it seems speakers and microphones of quality would require more space and power. Motion detectors and switches are suited to doorways but I will not be facing that way when giving voice commands. I expect to listen to music or issue voice commands when i am seated in my lounge or laying in bed.

I’m re-framing my first goal as “smart lightswitches”. I will create modular smart boxes positioned over the light switches at the entrances to various rooms.My goal is for the boxes to detect and record which room I am in. They will enable smart control of lights, to track activity and occupancy.

I hope to include in each unit

  • Fisheye NoIR Camera – to detect motion and light levels in each room – I am hoping to use a fish eye lens as wide coverage is more important than detail to me
  • IR LED (940nm)  – to send control pulses to tv and other devices , hopefully can also double as a IR light source when dark
  • Rotary switch with push switch – to provide dimmer like control and other function selection.
  • Adafruit 8×8 LED matrix (I2C) – to provide feedback of state etc

I still hope to add voice recognition and media playback to my home but I now expect to do that as a separate project as part of other units.

Categories: HomeAutomation | Tags: , | Leave a comment

Fritzing- Great tool for designing electonics

I found a tool called Fritzing,  It is a great tool which can help design and draw electronic circuits.

My initial thoughts and therefore untested plans are below. These Fritzing diagrams help give me an idea of what I need to purchase . They also provide a starting idea of how to assemble things. ( There was not a symbol for camera 🙁 )

Now I need to order some parts and stripboard…

Categories: HomeAutomation | Tags: , , | Leave a comment

Home Automation Goal

I want to create a home automation system with the following

  • Control my philips hue lights and cover the switches which now have to stay on.
  • Detect and record motion in each room
  • Control my tv
  • Respond to voice commands

And because i am a programmer be…

  • Distributed
  • Scalable
  • Flexible

I explicitly do not aim to build a personal assistant. I have a mobile phone with android for that. I want a smart home. My home doesnt need to view my emails or access my finances. My home doesnt  need to view my browsing history. My home needs to do what it is told, take care of things when i am out and make my life simpler.

Categories: HomeAutomation | Tags: , | Leave a comment