Jacek wrote: 19 Feb 2017, 18:28
The programmer has been developed for over 10 years and its code is unbelievable messy. This is the only reason why it is not published. One day it will be recoded probably to C# and published.
I've worked on a custom independent programmer for a while (working title for lack of a better term: hapcanmonitor). It now is working.
I'm opensourcing it, at the moment working out details on how.
The architecture basically is like this:
a. REST-based API (using JSON/HTML), which allows:
- Sending all hapcan commands.
- Querying status on all devices.
- Acting on events.
- Flashing devices.
- Random reading/writing memory.
b. The REST-based API is implemented in the SPike webserver. The architecture uses multithreading and promises.
c. The SPike webserver is written in Pike (
http://pike.roxen.com).
d. Pike is written in C and runs on Linux, UNIX, Windows and MacOS.
It's running my house, as we speak.
P.S. I understand why the original programmer code is convoluted. Without using promises it would have been insanely complicated to get it right.