Skip to content

Commit

Permalink
Advanced the html template work a bit
Browse files Browse the repository at this point in the history
Extended specification and updated readme to include typical usage.
  • Loading branch information
stevemidgley committed Dec 22, 2013
1 parent b12953e commit 3c8188c
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 49 deletions.
20 changes: 18 additions & 2 deletions README.md
Expand Up @@ -17,13 +17,29 @@ There are several parts of this project:
* A ruby client = thermoruby.rb and thermoruby_controller and test files
* thermoserver.rb server = this is used for testing and can be used for operations. It is a distinct codebase but required for testing thermoruby.rb. It also can be used in production operations to support thermoruby.rb and its controller.

More documentation to come, and contact welcome from interested users or contributors. science@misuse.org
More documentation to come, and contact welcome from interested users or contributors. Contact science@misuse.org with subject line including "openthermo" to discuss, or send pull requests to openthermo project on github.com.

# General concepts

Typical operations are:
* ThermoClient uploads status file to server
* ThermoClient downloads config file from server
** ThermoClient loops on download config file using 'if-file/newer-date'
** ThermoClient operates on config file, adjusting heater run-state accordingly
* ThermoApp displays list of available heaters to control
* ThermoApp displays current config and status for a selected heater
* ThermoApp accepts user input to change current config
* ThermoApp activates WebApp api to register that input with server
* Server adjusts appropriate config file to current settings

Look in specification.txt file for documentation on api and other implemented and planned details.

# Installation
To install, be sure you have required libraries which can be found in thermoclient.rb file. GEMSPEC file forthcoming. Ruby 1.9.3 was used in development.
To install, be sure you have required libraries which can be found in thermoclient.rb and thermoserver.rb files. GEMSPEC file forthcoming. Ruby 1.9.3 was used in development.

To test, you must also have thermoserver project installed or an equivalent web server exposing the API specified in the docs folder of thermoserver.


# Testing
If you are using thermoserver to run tests, you must first start the webserver prior to running tests. On Windows you can run "startserver.cmd" in the test folder.
For Linux, you start the server with the command: "ruby ../../server/thermoserver.rb" from the test folder, assuming you have thermoserver installed in a folder parallel to thermoruby.
Expand Down
180 changes: 139 additions & 41 deletions openthermo.sublime-workspace
Expand Up @@ -3,6 +3,14 @@
{
"selected_items":
[
[
"time",
"time_stamp"
],
[
"temp_",
"temp_override"
],
[
"operation",
"operation_mode"
Expand Down Expand Up @@ -199,15 +207,39 @@
"file": "thermoserver/thermoserver.rb",
"settings":
{
"buffer_size": 19852,
"buffer_size": 21031,
"line_ending": "Windows"
}
},
{
"file": "thermoserver/test/test-thermoserver.rb",
"settings":
{
"buffer_size": 15324,
"buffer_size": 15678,
"line_ending": "Windows"
}
},
{
"file": "thermoserver/views/control.erb",
"settings":
{
"buffer_size": 348,
"line_ending": "Windows"
}
},
{
"file": "thermoserver/views/dashboard.erb",
"settings":
{
"buffer_size": 219,
"line_ending": "Windows"
}
},
{
"file": "thermoserver/views/layout.erb",
"settings":
{
"buffer_size": 196,
"line_ending": "Windows"
}
},
Expand All @@ -223,7 +255,7 @@
"file": "thermoserver/docs/specification.txt",
"settings":
{
"buffer_size": 3971,
"buffer_size": 4271,
"line_ending": "Windows"
}
},
Expand Down Expand Up @@ -255,7 +287,7 @@
"file": "README.md",
"settings":
{
"buffer_size": 13758,
"buffer_size": 14626,
"line_ending": "Windows"
}
}
Expand Down Expand Up @@ -466,15 +498,15 @@
"groups":
[
{
"selected": 1,
"selected": 0,
"sheets":
[
{
"buffer": 0,
"file": "thermoserver/thermoserver.rb",
"settings":
{
"buffer_size": 19852,
"buffer_size": 21031,
"regions":
{
"bookmarks":
Expand All @@ -484,12 +516,8 @@
"regions":
[
[
9767,
9767
],
[
17491,
17491
11157,
11157
]
],
"scope": "bookmarks"
Expand All @@ -498,8 +526,8 @@
"selection":
[
[
8799,
8799
12940,
12940
]
],
"settings":
Expand All @@ -509,7 +537,7 @@
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 4646.0,
"translation.y": 7135.0,
"zoom_level": 1.0
},
"type": "text"
Expand All @@ -519,7 +547,7 @@
"file": "thermoserver/test/test-thermoserver.rb",
"settings":
{
"buffer_size": 15324,
"buffer_size": 15678,
"regions":
{
"bookmarks":
Expand All @@ -528,23 +556,15 @@
"icon": "bookmark",
"regions":
[
[
2996,
2996
],
[
10448,
10448
]
],
"scope": "bookmarks"
}
},
"selection":
[
[
8430,
8430
4072,
4072
]
],
"settings":
Expand All @@ -553,14 +573,92 @@
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 233.0,
"translation.y": 3979.0,
"translation.x": 0.0,
"translation.y": 2001.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 2,
"file": "thermoserver/views/control.erb",
"settings":
{
"buffer_size": 348,
"regions":
{
},
"selection":
[
[
58,
58
]
],
"settings":
{
"syntax": "Packages/Rails/HTML (Rails).tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 3,
"file": "thermoserver/views/dashboard.erb",
"settings":
{
"buffer_size": 219,
"regions":
{
},
"selection":
[
[
120,
120
]
],
"settings":
{
"syntax": "Packages/Rails/HTML (Rails).tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 4,
"file": "thermoserver/views/layout.erb",
"settings":
{
"buffer_size": 196,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"syntax": "Packages/Rails/HTML (Rails).tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 5,
"file": "thermoserver/test/default-conf.json",
"settings":
{
Expand Down Expand Up @@ -588,19 +686,19 @@
"type": "text"
},
{
"buffer": 3,
"buffer": 6,
"file": "thermoserver/docs/specification.txt",
"settings":
{
"buffer_size": 3971,
"buffer_size": 4271,
"regions":
{
},
"selection":
[
[
3435,
3435
2211,
2211
]
],
"settings":
Expand All @@ -610,13 +708,13 @@
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 1012.0,
"translation.y": 886.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 4,
"buffer": 7,
"file": "thermoclient/thermoclient.rb",
"settings":
{
Expand Down Expand Up @@ -657,7 +755,7 @@
"type": "text"
},
{
"buffer": 5,
"buffer": 8,
"file": "thermoclient/test/test-thermoclient.rb",
"settings":
{
Expand Down Expand Up @@ -698,7 +796,7 @@
"type": "text"
},
{
"buffer": 6,
"buffer": 9,
"file": "thermoclient/test/backbedroom-override.json.orig",
"settings":
{
Expand Down Expand Up @@ -726,19 +824,19 @@
"type": "text"
},
{
"buffer": 7,
"buffer": 10,
"file": "README.md",
"settings":
{
"buffer_size": 13758,
"buffer_size": 14626,
"regions":
{
},
"selection":
[
[
9557,
9557
2188,
2188
]
],
"settings":
Expand All @@ -748,7 +846,7 @@
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 3738.0,
"translation.y": 242.0,
"zoom_level": 1.0
},
"type": "text"
Expand Down

0 comments on commit 3c8188c

Please sign in to comment.