-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Fred Larsen edited this page Apr 3, 2018
·
32 revisions
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
And 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 a good starting point for your own setup.
Some features currently on the drawing board:
- Check that Linux compatibility also covers Raspberry PI.
- 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.
- 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.