Skip to content
Fred Larsen edited this page Aug 6, 2019 · 32 revisions

Status

The ModuleInterface library currently transfers:

  • Measurements between modules on a subscription basis
  • Measurements to database via web server
  • Settings from web server to modules
  • Locally modified settings from modules to web server (reverse direction)
  • Event-triggered immediate measurement(s) between modules in addition to at regular intervals
  • Rough clock synchronization from web server to master to modules

It has a SQL database schema and php scripts to transfer values between database and modules and between database and a web page that uses JavaScript. All lined up to let a user create hardware modules and web pages for configuring and inspecting them.

It also includes a whole working setup as an example:

  • A couple of basic modules with settings, inputs and outputs
  • A master transferring values between the modules and talking to a web server
  • A MariaDb/MySQL database
  • An Apache web server
  • A dynamic and responsive web page showing live values in plots and tables, letting the user configure the modules in a table. This can be a good starting point for your own setup.

Plans

Some features currently on the drawing board:

  • Check that Linux compatibility also covers Raspberry PI (most likely it does).
  • Create a multi-threaded master to be run more efficiently on multithreaded platforms.
  • "Broadcast" events so that modules can subscribe to a topic instead of specific outputs from other modules.
  • Add support for InfluxDb (MIT license) as an alternative for storage of historical values.
  • Add Linux/Windows program module that can run along the master to send eMail notifications and control devices that are controllable via the LAN (Kasa smart switches, Shelly switches, etc)
  • Add connection to other home automation systems

Recently completed features

  • Made the GenericModuleMasterHttp (DUDP) more dynamic by letting it pick up changes to the module list without having to be restarted. This means that after adding a new module physically, it is activated by adding it to the module list setting in the database (can be exposed in the web page as well).
  • Added a collection of predefined metrics from master and modules to analyze/verify the data flow.
  • Added a list of examples, with descriptions.
  • Added a protocol description document.
  • Added a ModuleInterface based PJON switch (router / media converter) that reports status and traffic statistics.
  • ESP32 support added, examples using the PJON DualUDP strategy over WiFi.
  • A generic master for Windows/Linux, using UDP to communicate with groups of devices. All configuration is retrieved from the web server at startup, meaning that the master will not have to be recompiled when adding/removing devices from the setup.
  • Support for PJON network mode, having devices on multiple buses with different bus ids.
  • Support for Linux and Windows. Master can now be run on the web server computer itself if needed.
  • Support for two-way synchronization of settings for modules that have a local user interface like a LCD display and buttons, joystick or rotary encoder. In this way, configuration changes performed on a physical module will show up in the web pages and vica versa.
  • WebPage example with instructions, Arduino sketches, database schema, web page files.
  • New database schema with a current-value table and transfer from this to the time-series table. This will allow only a subset of measurements to be logged versus time, while the current value for all will always be available in the first table. It will also make it smoother with larger setups where multiple ModuleInterface masters use the same database.
  • Avoid keeping variable names (settings, inputs, outputs) in RAM, and also support having the contracts in program memory only to save more RAM.

Clone this wiki locally