Skip to content

Developers

Code layout

The code is managed and developed using Visual Studio Code Multi-root Workspaces and platform.io This combination allows to develop the server side (and sync updates using ssh extension called sftp) and the arduino station, including the bootloader code, compilation and flashing, all in one place. It also offers tasks to compile and flash the bootloader and even a predefined theme. platform.io also allowed my to have a common networking code for all Arduino stations in one common directory which all Arduino projects (stations) can reference, keeping the protocol updates and changes easy and safe.

Tasks & Bugs

This Project is managed with trello

For issues and bugs please open on Github

System layout

Controlling you home is done via a web application from your phone browser or any other browser. The web application is hosted on a Raspberry Pi station, running Nodejs. Nodejs 'talks' to a serial bluetooth attached to the Raspberry Pi GPIOs the Serial Bluetooth sends the data to an arduino station gateway which dispatches the messages to the relevant Arduino endPoint station using RF24 module. each endpoint station has a unique address and a set of command it knows to handle.

Flashing remote station from 'Visual Studio Code' script (task) TBD

  • `Connect Flasher to computer
  • `Ctrl+P and select Set remote Address this will set remote address to the Flasher.
  • `Upload sketch (this will forward the sketch to the remote station with the specified address)

IR

PI Server with node and serial commands sent using bt to bt to rf24 gateway/dispatch station

PI_STATION GPIO

Gateway: BT to rf24 dispatch system

BT_To_RF24

Bootloader with OTA Capabilities

  • `ctrl+p Compile Bootloader with OTA Capabilities
  • You have to bootloader option: with auto reset option and without auto reset option - to learn more read [Here] about Arduino watchdog timer.
  • `ctrl+p Burn the compiled bootloader using the AVR flasher to learn more read [Here].

  • My YouTube video to get more info.

  • Also read here to get a better understanding

Bootloader modifications for OTA

Arduino OTA

How to install

  • Download and install Visual Studio code
  • git clone https://github.com/benchuk/SmartHomeDIY.git - clone project.
  • mkdocs build - Build the documentation site.
  • mkdocs help - Print this help message.