Compare commits
19 Commits
node-appro
...
branchOne
Author | SHA1 | Date | |
---|---|---|---|
990ac05bba
|
|||
69b2c58240
|
|||
f71211fe55
|
|||
194dc8da13 | |||
0a031e562d | |||
cd3cce51ff | |||
cedc1a96ef | |||
3d2d441fed | |||
4f9352c2ee | |||
27d3fd02a5 | |||
bc516fa417 | |||
82a4bfab86 | |||
8c5574c054 | |||
afbedcf7d3 | |||
9821d412ec
|
|||
984174a44e
|
|||
c574383eec
|
|||
85d5d2c2fc
|
|||
35e30abd69
|
12
dist/main.js
vendored
@ -6,18 +6,14 @@ const logger = require("./log");
|
||||
const express = require("express");
|
||||
function getPageOptions(contentStr) {
|
||||
let pageOptions = {};
|
||||
// logger.info(`contentStr: ${contentStr}`)
|
||||
try {
|
||||
let lines = contentStr.split("\n");
|
||||
let firstLine = lines[0];
|
||||
// logger.info(`firstLine: ${firstLine}`)
|
||||
let pageOptionsStr = firstLine.replace(/^\s*<!-- (\{.+\}) -->[\s\S]*$/, "\$1");
|
||||
// logger.info(`pageOptionsStr: ${pageOptionsStr}`)
|
||||
pageOptions = JSON.parse(pageOptionsStr);
|
||||
// logger.info(JSON.stringify(pageOptions))
|
||||
}
|
||||
catch (_a) {
|
||||
// logger.info("No pageOptions found")
|
||||
logger.info("No pageOptions found");
|
||||
}
|
||||
return pageOptions;
|
||||
}
|
||||
@ -25,7 +21,7 @@ function getToc() {
|
||||
logger.info("building toc");
|
||||
let toc = "";
|
||||
let posts = fs.readdirSync('./docroot/posts');
|
||||
posts.forEach((v) => {
|
||||
posts.sort().reverse().forEach((v) => {
|
||||
let content = fs.readFileSync(`./docroot/posts/${v}/article.pag`);
|
||||
let contentStr = content.toString();
|
||||
let pageOptions = getPageOptions(contentStr);
|
||||
@ -39,6 +35,7 @@ let masterTmpl;
|
||||
let toc;
|
||||
let cache = {};
|
||||
app.engine('pag', (filePath, options, callback) => {
|
||||
// logger.info(JSON.stringify(options))
|
||||
if (!(filePath in cache)) {
|
||||
logger.info(`${filePath} not yet in cache`);
|
||||
fs.readFile(filePath, (err, content) => {
|
||||
@ -89,7 +86,8 @@ app.get('/reload', (req, res) => {
|
||||
cache = {};
|
||||
toc = getToc();
|
||||
masterTmpl = fs.readFileSync('./docroot/master.tmpl').toString();
|
||||
res.send('reload triggered');
|
||||
let base = req.headers['x-proxy-original-url'] || "/";
|
||||
res.redirect(`${base}index`);
|
||||
});
|
||||
app.use('/files', express.static('files'));
|
||||
masterTmpl = fs.readFileSync('./docroot/master.tmpl').toString();
|
||||
|
2
dist/main.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAExB,mCAAkC;AAClC,gCAA+B;AAE/B,mCAAkC;AAGlC,wBAAwB,UAAkB;IACtC,IAAI,WAAW,GAAS,EAAE,CAAA;IAC1B,2CAA2C;IAC3C,IAAI;QACA,IAAI,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QACxB,yCAAyC;QACzC,IAAI,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAA;QAC9E,mDAAmD;QACnD,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QACxC,2CAA2C;KAC9C;IAAC,WAAM;QACJ,sCAAsC;KACzC;IACD,OAAO,WAAW,CAAA;AACtB,CAAC;AAED;IACI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IAC3B,IAAI,GAAG,GAAY,EAAE,CAAA;IACrB,IAAI,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAA;IAC7C,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAChB,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAA;Q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
I shut down my homepage at wordpress.com since it wasn't absolutely unclear to me which data was collected there. I decided to run the homepage on my own server again, since I know exactly which data is collected here: There is the Apache log with the requesters IP stripped away:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
CustomLog "logs/access_log" common
|
||||
#LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%l %u %t \"%r\" %>s %b" common
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Nothing else. And since I'm quite bad in CSS, it currently looks so ugly.
|
||||
</p>
|
||||
|
||||
|
||||
<h1>My Blog</h1>
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
<div class="topnav">
|
||||
<a href="index">Home</a>
|
||||
<a href="pages/impressum">Impressum</a>
|
||||
<a href="pages/about">About</a>
|
||||
<a href="pages/pubkey">PubKey</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@ -25,7 +26,7 @@
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<a href="pages/impressum">Impressum</a>
|
||||
<a href="reload">Reload</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
99
docroot/pages/about.pag
Normal file
@ -0,0 +1,99 @@
|
||||
<!-- { "title": "About" } -->
|
||||
|
||||
|
||||
|
||||
<img class="floatright" src="files/IMG_6875_2-very-small.jpg"/>
|
||||
|
||||
<h1>About</h1>
|
||||
|
||||
Wolfgang Hottgenroth<br/>
|
||||
Eupenstr. 20<br/>
|
||||
45259 Essen<br/>
|
||||
<address>woho@hottis.de</address><br/>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
This is a hobby-only homepage without any advertising or other commercial interests.
|
||||
</p>
|
||||
|
||||
|
||||
<h1>My Profiles</h1>
|
||||
<ul>
|
||||
<li><a href="https://gitlab.com/wolutator">GitLab</a></li>
|
||||
<li><a href="https://twitter.com/wollud1969">Twitter</a></li>
|
||||
<li><a href="https://keybase.io/wolutator/">Keybase</a></li>
|
||||
<li><a href="https://github.com/wollud1969">GitHub</a></li>
|
||||
<li><a href="https://www.xing.com/profile/Wolfgang_Hottgenroth/cv">XING</a></li>
|
||||
</ul>
|
||||
|
||||
<h1>So ugly ... why not Wordpress?</h1>
|
||||
<p>
|
||||
I shut down my homepage at wordpress.com since it was absolutely unclear to me which data was collected there. I decided to run the homepage on my own server again.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Although according to Art. 2 (2) c of DSGVO that regulation is completely irrelevant for me, since this is a hobby-only blog without any advertising or commercial interests, it appeared to me, that limiting the number of collected data could be a good idea.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For this system I know exactly which data is collected here: There is the Apache httpd running on an old PowerPC MacMini with OpenBSD bastion host, which proxies requests to the homepage engine. For the Apache log the requesters IP has been stripped away:
|
||||
<p>
|
||||
<pre>
|
||||
<code language="Apache">
|
||||
CustomLog "logs/access_log" common
|
||||
#LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%l %u %t \"%r\" %>s %b" common
|
||||
</pre>
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The logfile looks like this now:
|
||||
</p>
|
||||
<p>
|
||||
<pre>
|
||||
- - [25/May/2018:12:43:58 +0200] "GET /wolutator HTTP/1.1" 302 76
|
||||
- - [25/May/2018:12:43:58 +0200] "GET /wolutator/index HTTP/1.1" 304 -
|
||||
- - [25/May/2018:12:43:58 +0200] "GET /wolutator/files/default.css HTTP/1.1" 304 -
|
||||
- - [25/May/2018:12:43:58 +0200] "GET /wolutator/files/highlight/styles/default.css HTTP/1.1" 304 -
|
||||
- - [25/May/2018:12:43:58 +0200] "GET /wolutator/files/highlight/highlight.pack.js HTTP/1.1" 304 -
|
||||
- - [25/May/2018:12:43:58 +0200] "GET /wolutator/files/cropped-img_2723.jpg HTTP/1.1" 304 -
|
||||
- - [25/May/2018:12:43:59 +0200] "GET /favicon.ico HTTP/1.1" 404 209
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The homepage engine is running on an old Intel MacMini with Debian. It just logs which post or page is accessed and served, nothing more. If you like to have a look: <a href="https://gitlab.com/wolutator/homepage" target="_blank">https://gitlab.com/wolutator/homepage</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The logging of the homepage engine looks like this:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
wn@mac:/opt/services/homepage$ npm start -- -c homepage.conf
|
||||
|
||||
> homepage@1.0.0 start /opt/services/homepage
|
||||
> node dist/main.js "-c" "homepage.conf"
|
||||
|
||||
12:57:59.910 [ II ] Homepage starting
|
||||
12:57:59.922 [ II ] building toc
|
||||
12:57:59.937 [ II ] Homepage running
|
||||
12:57:59.938 [ II ] Homepage is listening
|
||||
12:58:19.008 [ II ] redirecting / to /index
|
||||
12:58:19.142 [ II ] /opt/services/homepage/docroot/index.pag not yet in cache
|
||||
12:58:24.178 [ II ] /opt/services/homepage/docroot/posts/2018-04-30.01/article.pag not yet in cache
|
||||
12:58:25.550 [ II ] /opt/services/homepage/docroot/index.pag served from cache
|
||||
12:58:26.985 [ II ] /opt/services/homepage/docroot/pages/impressum.pag not yet in cache
|
||||
12:58:29.647 [ II ] /opt/services/homepage/docroot/index.pag served from cache
|
||||
12:58:31.060 [ II ] /opt/services/homepage/docroot/posts/2018-02-22.01/article.pag not yet in cache
|
||||
12:58:35.230 [ II ] /opt/services/homepage/docroot/index.pag served from cache
|
||||
12:58:37.717 [ II ] /opt/services/homepage/docroot/index.pag served from cache
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
And since I'm quite bad in CSS, it currently looks so ugly.
|
||||
</p>
|
@ -1,5 +0,0 @@
|
||||
<!-- { "title": "Impressum" } -->
|
||||
<h1>Impressum</h1>
|
||||
|
||||
Wolfgang Hottgenroth<br/>
|
||||
<address>woho@hottis.de</address><br/>
|
131
docroot/pages/pubkey.pag
Normal file
@ -0,0 +1,131 @@
|
||||
<!-- { "title": "My Public PGP Key" } -->
|
||||
|
||||
|
||||
<h1>#title#</h1>
|
||||
<p>
|
||||
<a href="files/75217C088B3EF6AE55F4D4C7B586EAFCDF2F65F4.key">for download</a><br/>
|
||||
<pre>
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFq3+eMBEACdt7FaTWEqeu69EucMHAXLJoG3uFWWysXkzzwOc8MHTwbN4Lsi
|
||||
FHPSFWnhs4jRhiNhGYCKaCrN26EdjKNJ+14arl/0rZ6EJByctqgLQtbMfX19ciIe
|
||||
FEzN6pmYHxpUrwGVh6h9QSS9kkTIE8UEb2p/9d/ZBEh/E0Gdt4Pb36Zsn4uYqatd
|
||||
Oa+92l2LDVl9OTU95CNWWwS4MYYMKU7w6DQDc4DuTSbkHYirXq0Cj0bnoXmXDo5C
|
||||
E8n+F6TWDpPTwfjODzgEDLCMJJpQnViOnQTfqt/6jeY1JkOIEMRkQipqNbp+by++
|
||||
dyGNIQUbvEbjPX21bc/drg4PFidOBTQ2U0ZLXIbCqdYqEFhIWIC5MvdMwi3Fk4aP
|
||||
Dl/tATYI6nbFMU9YnliHyMPqxN4NH9QCn360e7X+NfxriAR8A96HDhjO9JwAogE5
|
||||
gvymI8cgIhyLACcziHvQoNsz0qRf9GOl81vhwSmQu2CNdZZDyGNl7R1yKrBrmHQf
|
||||
DBN2m+VMdWe9lTH7KRZ3U+8KPBasXVCLWc5XVsAdWYKoGBu+p66886pWWs92A/o4
|
||||
1QH4No8n77Cad7GJwizHCy8HuBi2ZgOVELw3is/12qNjD76DgNu421kGY3EaSpT3
|
||||
T9CFSXz+CQB8gBkSl3KcrlW9B5putu3IKC11qBkqCkSg8/ylGBCvug5EXQARAQAB
|
||||
tCVXb2xmZ2FuZyBIb3R0Z2Vucm90aCA8d29ob0Bob3R0aXMuZGU+iQJOBBMBCAA4
|
||||
FiEEdSF8CIs+9q5V9NTHtYbq/N8vZfQFAlq4CM4CGwMFCwkIBwIGFQgJCgsCBBYC
|
||||
AwECHgECF4AACgkQtYbq/N8vZfTL8BAAj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YTG3dpfxXhAbsaWbtFWUv5s6S6bAsXmNjNgTisLB0yDw
|
||||
z/cptrEVodeAdR59muyAtG09ZIG6bBMw3FWJj0pSWW9p2G2UqiFbsvlIqR4itzLL
|
||||
e1AMFjbNqE/LFya9ttKR8lwVEXhW0QpIuoFN8+JfmvtN932We7aQO02LYkQc8dPT
|
||||
ZWhb/lYr2u9YkftJOYxBuluBNxqAdJg6/NoU/mcztZ/hahgSx4u6EGnJa163PF9X
|
||||
+RQYxNo9TGAnzyZxu6I9MUqT0GR/09Q0weZrP8vNjR2Dxp7jXHlNXzt6F7tA/1sm
|
||||
ij1WJ0qTIKQRgsnJoULNFEVSSWzI9dyAHqnVsQGwf0xhcugVwMw0dxS7q/aVErkA
|
||||
UzZbs54AnA==
|
||||
=GSFz
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<h3>Fingerprint</h3>
|
||||
<p>
|
||||
<pre>
|
||||
7521 7C08 8B3E F6AE 55F4 D4C7 B586 EAFC DF2F 65F4
|
||||
</pre>
|
||||
</p>
|
19
docroot/posts/2016-03-03.01/article.pag
Normal file
@ -0,0 +1,19 @@
|
||||
define(`TITLE', `Why always SPI CS on pin 10?')
|
||||
define(`DATE', `2016-03-03')
|
||||
define(`CONTENT', `
|
||||
Thank you, Ladyada, for <a href="https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2">this great display</a>.
|
||||
|
||||
But why is TFT CS on pin 10?
|
||||
|
||||
<a href="http://a385e5.files.wordpress.com/2016/03/bildschirmfoto-2016-03-03-um-21-48-49.png" rel="attachment wp-att-711"><img src="http://a385e5.files.wordpress.com/2016/03/bildschirmfoto-2016-03-03-um-21-48-49.png" alt="Bildschirmfoto 2016-03-03 um 21.48.49" width="722" height="449" class="alignnone size-full wp-image-711" /></a>
|
||||
|
||||
Pin 10 is also the SPI CS for the Ethernet shield. Why not, for instance, pin 6:
|
||||
|
||||
<a href="http://a385e5.files.wordpress.com/2016/03/img_1211-e1457038834523.jpg" rel="attachment wp-att-712"><img src="http://a385e-5.de/wp-content/uploads/IMG_1211-e1457038834523-1024x768.jpg" alt="IMG_1211" width="474" height="356" class="alignnone size-large wp-image-712" /></a>
|
||||
|
||||
Carefully lift pin 9 of the level shifter and connect it using a thin wire with pin 6 of the Arduino connector.
|
||||
|
||||
And voila, both the display and the ethernet shield is working:
|
||||
|
||||
<a href="http://a385e5.files.wordpress.com/2016/03/img_1212-e1457039094609.jpg" rel="attachment wp-att-713"><img src="http://a385e-5.de/wp-content/uploads/IMG_1212-e1457039094609-1024x768.jpg" alt="IMG_1212" width="474" height="356" class="alignnone size-large wp-image-713" /></a>
|
||||
')
|
39
docroot/posts/2016-09-09.01/article.pag
Normal file
@ -0,0 +1,39 @@
|
||||
<!-- { "title": "Integrated Thermometer and Timer" } -->
|
||||
<h1>#title#</h1>
|
||||
<p>
|
||||
To brew green tea you need water of about 75°C. To know that your water has 100°C is easy, you can see that it is boiling. For 75°C you need a thermometer. Then you also need to take care about the brewing time. It should be usually two minutes.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are such integrated thermometer and timer things on Amazon, but that's not me cup of tea, I decided to build one on my own. It should run on batteries, it should be small and it should make no noise (for office use).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In between I was reading "Patterns for Time-Triggered Embedded Systems" from Michael Pont. And afterwards I was curious to use such a simple cooperative scheduler instead of the super-loop, as it is common in the Arduino domain.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
I used a MSP430G2553 with 10bit-ADCs, a PT1000 sensor and two seven-segment LED displays.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The code is available at <s><a href="https://bitbucket.org/wollud1969/teathermotimer" target="_blank">https://bitbucket.org/wollud1969/teathermotimer</a></s> <a href="https://gitlab.com/wolutator/TeaThermoTimer">https://gitlab.com/wolutator/TeaThermoTimer</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0813-e1473432862286.jpg"><img src="files/img_0813-e1473432862286_small.jpg"/></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0814.jpg"><img src="files/img_0814_small.jpg" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Schematics:<br/>
|
||||
<a href="files/201609091558_0001.pdf">201609091558_0001</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Calculation for measurement:<br/>
|
||||
<a href="files/201609091558_0002.pdf">201609091558_0002</a>
|
||||
</p>
|
29
docroot/posts/2016-09-12.01/article.pag
Normal file
@ -0,0 +1,29 @@
|
||||
<!-- { "title": "Integrated Tea Timer and Thermometer, Second Edition" } -->
|
||||
|
||||
<h1>#title#</h1>
|
||||
<p>
|
||||
I've two offices, so I'm requiring two of this timers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The second one I built with a three-digit display and auto-power-down and start with a push-button.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This thing consumes in operation about 20mA, which is a real lot for so few functionality, but most of the power goes into the display. I was looking for a simple LCD on ebay, but it seems that most of the LCD 7-segment display have only one common and one pin for every single segment instead of one common per digit. These are too many pins for the 2553 and I didn't want to put an additional LCD controller on the board.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
However, when the thing goes in LPM4, it only consumes about 0,1uA, as it is written in the datasheet. Very important to achieve this low power consumption: an input pin requires more power than an output pin put into the right level. And of course the reference generator of the ADC needs to be shutdown.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The sources are still available here <s>https://bitbucket.org/wollud1969/teathermotimer</s> <a href="https://gitlab.com/wolutator/TeaThermoTimer/tree/SecondEdition">https://gitlab.com/wolutator/TeaThermoTimer/tree/SecondEdition</a>, look for the branch <code>SecondEdition</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The schematic is more or less the same, just on digit display more and a reset push-button.
|
||||
</p>
|
||||
|
||||
<a href="files/img_0818-e1473677307841.jpg"><img src="files/img_0818-e1473677307841_small.jpg"/></a>
|
||||
<a href="files/img_0821-e1473677332189.jpg"><img src="files/img_0821-e1473677332189_small.jpg"/></a>
|
83
docroot/posts/2016-10-14.01/article.pag
Normal file
@ -0,0 +1,83 @@
|
||||
<!-- { "title": "Three Phase Inverter" } -->
|
||||
<h1>#title#</h1>
|
||||
|
||||
<p>
|
||||
Already when I was still in school, about 30 years ago, I was curious to make an inverter using some MOSFETs. I actually was able to build a simple one phase inverter with rectangular signal shape (I used a NE555). Using this thing I drove a transformer to light a blub. However, all of these inverters I built passed by in fire.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Now, I tried it again, not longer using MOSFETs but IGBTs with free-wheeling diode. Moreover, I used some microcontrollers and sine values to feed a PWM to get a sine-alike signal shape. And this time I was able with three phases to drive an asynchronous motor.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0053.jpg"><img src="files/img_0053.jpg" alt="img_0053" width="730" height="973"/></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The signal shaping is done with four MSP430 controllers, three as PWMs to drive the bridge and one to coordinate and control the three PWMs. The PWM controller is decoupled from the IGBT driver (IR2184) using optic couplers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0054-e1476437702547.jpg"><img src="files/img_0054-e1476437702547.jpg" alt="img_0054" width="730" height="548"/></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The bridge is a three phase IGBT module is a 6MB120F-060 I got for a few euros at ebay.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0055-e1476437685461.jpg"><img src="files/img_0055-e1476437685461.jpg" alt="img_0055" width="730" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To avoid high voltages in my setup I got a 24V async motor, also from ebay.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0056.jpg"><img src="files/img_0056.jpg" alt="img_0056" width="730" height="548" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The PWMs generate the signal from a sine table generated using Excel. Those I got this signal:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/inverter0_2016-09-23-4.png"><img src="files/inverter0_2016-09-23-4.png" alt="inverter0_2016-09-23-4" width="640" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The main task of the coordinator is the start the PWMs with a phase shift of 120° (digital line 1, 2 and 3):
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/10/2016-10-13_1.png"><img src="files/2016-10-13_1.png" alt="2016-10-13_1" width="640" height="520" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Currently the PWMs start with random polarity. The interesting signals are the digital lines 4, 5 and 6.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Sometimes the motor runs:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/2016-10-13_works.png"><img src="files/2016-10-13_works.png" alt="2016-10-13_works" width="640" height="520" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
But sometimes not:
|
||||
</p>
|
||||
<p>
|
||||
<a href="files/2016-10-13_works_not.png"><img src="files/2016-10-13_works_not.png" alt="2016-10-13_works_not" width="640" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<s>
|
||||
The firmware is available on bitbucket, for the PWM controllers <a href="https://bitbucket.org/wollud1969/inverter0.git" target="_blank">here</a> and for the coordinator <a href="https://bitbucket.org/wollud1969/inverter0ctrl.git" target="_blank">here</a>.
|
||||
</s>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The firmware is available on Gitlab, for the PWM controllers <a href="https://gitlab.com/wolutator/inverter0" target="_blank">here</a> and for the coordinator <a href="https://gitlab.com/wolutator/inverter0ctrl" target="_blank">here</a>.
|
||||
</p>
|
67
docroot/posts/2016-11-02.01/article.pag
Normal file
@ -0,0 +1,67 @@
|
||||
<!-- { "title": "Something really useful: 433MHz Power-Outlet Control" } -->
|
||||
|
||||
<h1>#title#</h1>
|
||||
<p>
|
||||
We've lots of more or less cheap 433MHz Switchable Power-Outlets in the house, mostly for decorative lights. You get them for under 15€ in the Building Center, three at once with a remote control. Usually, you can control four switches with one remote, period. (A promising exceptions are the device from Intertechno.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Now I was looking for a way to
|
||||
<ol>
|
||||
<li>Control the switches from different manufacturers with one remote.</li>
|
||||
<li>Control them from really remote - from the office or from holiday.</li>
|
||||
<li>Control them programmatically.</li>
|
||||
</ol>
|
||||
|
||||
There are a couple of Arduino libraries out there which are working with this cheap 433MHz senders and receivers from China:
|
||||
<img src="files/sender_receiver.png" alt="sender_receiver" width="406" height="386" /><br/>
|
||||
|
||||
I tried several ones, not all a really working, but finally I stopped at <a href="https://github.com/sui77/rc-switch" target="_blank">https://github.com/sui77/rc-switch</a>, which works really good.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
First challenge now is to get the codes out of the remotes. For this purposes the rc-switch library provides an example sketch for the Arduino. I extended it a bit and got this:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_01012-e1478087121580.jpg"><img src="files/img_01012-e1478087121580.jpg?w=730" alt="img_0101" width="730" height="548" /></a><
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0105.jpg"><img src="files/img_0105.jpg?w=730" alt="img_0105" width="730" height="548"/></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Software for this thing can be found here <a href="https://gitlab.com/wolutator/433Receiver.git" target="_blank">https://gitlab.com/wolutator/433Receiver.git</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This is how it works:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0111-e1478087101747.jpg"><img src="files/img_0111-e1478087101747.jpg?w=730" alt="img_0111" width="730" height="548"/></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The second challenge is to send the codes out into air and let the power switches receive them. This is done with this thing:
|
||||
</p>
|
||||
<p>
|
||||
<a href="files/img_0100-e1478087375824.jpg"><img src="files/img_0100-e1478087375824.jpg?w=730" alt="img_0100" width="730" height="548" /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
It is a Arduino Ethernet Board with a PoE-adapter and the 433MHz sender directly attached to it. I glued it under a table in the living room.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This thing received messages via MQTT and send them out via 433MHz.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The software is <a href="https://gitlab.com/wolutator/Mqtt433Gateway.git" target="_blank">here at Gitlab</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
BTW: do not expect beautiful software, this has been made on Halloween evening and night when waiting for the kids to come home.
|
||||
</p>
|
48
docroot/posts/2016-12-19.01/article.pag
Normal file
@ -0,0 +1,48 @@
|
||||
<!-- { "title": "Three Phase Inverter, Second Service" } -->
|
||||
|
||||
<h1>#title#</h1>
|
||||
<p>
|
||||
I wrote in October about my first try to build a simple three phase inverter, see <a href="posts/2016-10-14.01" target="_blank">here</a>. In the first try I used four MSP430 microcontroller, one for the PWM of each phase and one to coordinate the phase shift of the three phases.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In this experiment I put everything on one STM32 microcontroller. Here I used the DMA feature to feed data into the PWM counter and I calculated the sine values at start-up time on the microcontroller. Additionally I put in the driver for a CAN interface, however, it is not yet supported in the firmware.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0140.jpg">
|
||||
<img src="files/img_0140_small.jpg"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From top to bottom you see the CAN driver, the STM32 board, opto coupler to separate logic and power part and then from right to left in the bottom half the low-side/high-side MOSFET drivers and the MOSFETs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0144.jpg">
|
||||
<img src="files/img_0144__small.jpg"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The power supply consists of a traditional transformer and (top right) the rectifier and condensers for the power part, together with the 12V regulator for the drivers and (top left) the regulators for 3.3V and 5V for the logic part.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0146.jpg">
|
||||
<img src="files/img_0146_small.jpg"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The motor is the same as in the earlier experiment - I don't have too much of them. And everything is put onto one board:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="files/img_0143-e1482141676335.jpg"><img src="files/img_0143-e1482141676335_small.jpg"/></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
(Some space reserved for a HMI unit to be connected via CAN ...)
|
||||
</p>
|
@ -1,4 +1,6 @@
|
||||
<!-- { "title": "Configuration-Webserver for ESP8266 Projects" } -->
|
||||
|
||||
<h1>#title#</h1>
|
||||
<p>
|
||||
In my previous ESP8266 based weekend projects I always hardcoded configuration data. For the ESP8266 these are at least the WiFi credentials SSID and WPA key. Moving it into a different WiFi network requires re-flashing it. There must be a better way I thought and found that's a single line of code to run the ESP8266 as an accesspoint, which opens its own WiFi network.
|
||||
</p>
|
||||
@ -41,270 +43,14 @@ open('configuration.cpp','w').write(str(c_file))
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The two templates are:
|
||||
Using the both templates for a <a href="https://gitlab.com/wolutator/EspThermometer2/blob/master/ConfigGenerator/configuration_c.tmpl" target="_blank">C-</a> and a <a href="https://gitlab.com/wolutator/EspThermometer2/blob/master/ConfigGenerator/configuration_h.tmpl" target="_blank">H-</a>file all the code for the configuration web page, the EEPROM handling code and the code to access the configuration variables is generated.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
<code "language"="C">
|
||||
typedef struct {
|
||||
#for $configItem in $configItems
|
||||
#if $configItem.type == 'C'
|
||||
char ${configItem.key}[$configItem.length];
|
||||
#else if $configItem.type == 'I'
|
||||
uint32_t $configItem.key;
|
||||
#end if
|
||||
#end for
|
||||
} tConfigBlock;
|
||||
|
||||
extern const uint32_t MAGIC;
|
||||
extern tConfigBlock configBlock;
|
||||
|
||||
void configServeIndex();
|
||||
void configServeGetConfiguration();
|
||||
void showConfiguration();
|
||||
|
||||
</code>
|
||||
</pre>
|
||||
The functions provided using these templates in turn a call from a rather simple <a href="https://gitlab.com/wolutator/EspThermometer2/blob/master/configurationMode.cpp" target="_blank">configuration mode</a>. In pure configuration mode (when the device is unconfigured or the configuration mode is requested using a pulled-down pin) a new WLAN will be opened using the accesspoint functionality of the ESP8266. In production mode, the configuration accesspoint is not started, however, the configuration mode webserver is started nevertheless.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
And:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
<code language="C">
|
||||
#raw
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <EEPROM.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "configuration.h"
|
||||
#end raw
|
||||
|
||||
|
||||
tConfigBlock configBlock;
|
||||
const uint32_t MAGIC = 0xC0DE0001;
|
||||
extern ESP8266WebServer webServer;
|
||||
|
||||
bool configSaved = false;
|
||||
|
||||
void configServeIndex() {
|
||||
bool configValid = (configBlock.magic == MAGIC);
|
||||
|
||||
if (! configValid) {
|
||||
#for $configItem in $configItems
|
||||
#if $configItem.label != "_"
|
||||
#if $configItem.type == "C"
|
||||
strcpy(configBlock.$configItem.key, "$configItem.default");
|
||||
#else if $configItem.type == "I"
|
||||
configBlock.$configItem.key = $configItem.default;
|
||||
#end if
|
||||
#end if
|
||||
#end for
|
||||
}
|
||||
|
||||
String buffer =
|
||||
"<!doctype html"
|
||||
"<html lang=\"en\">"
|
||||
" <head>"
|
||||
" <title>ESP8266 Thermometer Configuration Page</title>"
|
||||
" </head>"
|
||||
" <body>"
|
||||
" <h1>ESP8266 Configuration Page</h1>";
|
||||
|
||||
if (configSaved) {
|
||||
configSaved = false;
|
||||
buffer += "<h2>Configuration saved</h2>";
|
||||
}
|
||||
|
||||
buffer +=
|
||||
" <form action=\"/config\" method=\"GET\">"
|
||||
" <table>"
|
||||
#for $configItem in $configItems
|
||||
#if $configItem.label != "_"
|
||||
" <tr>"
|
||||
" <td>"
|
||||
" <label for\"$configItem.key\">$configItem.label</label>"
|
||||
" </td><td>"
|
||||
" <input type=\"text\" name=\"$configItem.key\" id=\"$configItem.key\" ";
|
||||
|
||||
#if $configItem.type == "C"
|
||||
buffer += " size=\"$configItem.length\" ";
|
||||
buffer += " value=\"";
|
||||
buffer += configBlock.$configItem.key;
|
||||
buffer += "\"";
|
||||
#else if $configItem.type == "I"
|
||||
buffer += " value=\"";
|
||||
buffer += configBlock.$configItem.key;
|
||||
buffer += "\"";
|
||||
#end if
|
||||
|
||||
buffer +=
|
||||
" />"
|
||||
" </td>"
|
||||
" </tr>"
|
||||
#end if
|
||||
#end for
|
||||
" <tr>"
|
||||
" <td colspan=\"2\">"
|
||||
" <button type=\"submit\">Save</button>"
|
||||
" </td>"
|
||||
" </tr>"
|
||||
" </table>"
|
||||
" </form>"
|
||||
" </body>"
|
||||
"</html>";
|
||||
|
||||
webServer.send(200, "text/html", buffer);
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.println("indexHtml request served");
|
||||
#endif
|
||||
}
|
||||
|
||||
void configServeGetConfiguration() {
|
||||
String arg;
|
||||
|
||||
#for $configItem in $configItems
|
||||
#if $configItem.label != "_"
|
||||
arg = webServer.arg("$configItem.key");
|
||||
#if $configItem.type == "C"
|
||||
strcpy(configBlock.$configItem.key, arg.c_str());
|
||||
#else if $configItem.type == "I"
|
||||
configBlock.$configItem.key = atoi(arg.c_str());
|
||||
#end if
|
||||
#end if
|
||||
#end for
|
||||
|
||||
configBlock.magic = MAGIC;
|
||||
|
||||
showConfiguration();
|
||||
|
||||
EEPROM.begin(512);
|
||||
EEPROM.put(EEPROM_ADDR, configBlock);
|
||||
EEPROM.commit();
|
||||
|
||||
Serial.println("EEPROM saved");
|
||||
|
||||
configSaved = true;
|
||||
webServer.sendHeader("Location", String("/"), true);
|
||||
webServer.send(302, "text/plain", "");
|
||||
//webServer.send(200, "text/html", "configuration saved");
|
||||
}
|
||||
|
||||
void showConfiguration() {
|
||||
Serial.println("Configuration is");
|
||||
|
||||
#for $configItem in $configItems
|
||||
Serial.print("$configItem.key = ");
|
||||
Serial.println(configBlock.$configItem.key);
|
||||
|
||||
#end for
|
||||
|
||||
Serial.println("---");
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Besides these generated files I also needed a framework to distinguish between "configuration mode" and "production mode" and in configuration mode to start the WiFi accesspoint.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Since I'm programming the ESP8266 in an Eclipse-based Arduino-environment, this is all done in the <code>setup()</code> and <code>loop()</code> function:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
<code language="C">
|
||||
// Do not remove the include below
|
||||
#include "EspThermometer2.h"
|
||||
#include "defines.h"
|
||||
|
||||
// #define ESP8266
|
||||
|
||||
|
||||
#include <EEPROM.h>
|
||||
|
||||
#include "configuration.h"
|
||||
#include "productionMode.h"
|
||||
#include "configurationMode.h"
|
||||
|
||||
|
||||
|
||||
ADC_MODE(ADC_VCC);
|
||||
|
||||
|
||||
|
||||
bool configMode = false;
|
||||
|
||||
uint32_t startTime = 0;
|
||||
|
||||
|
||||
void setup() {
|
||||
startTime = millis();
|
||||
#ifdef DEBUG
|
||||
Serial.begin(115200);
|
||||
Serial.println("Starting ...");
|
||||
#endif
|
||||
|
||||
pinMode(CONFIG_SWITCH, INPUT_PULLUP);
|
||||
pinMode(LED_PIN, OUTPUT);
|
||||
|
||||
|
||||
EEPROM.begin(512);
|
||||
EEPROM.get(EEPROM_ADDR, configBlock);
|
||||
|
||||
|
||||
Serial.print("Magic: ");
|
||||
Serial.println(configBlock.magic);
|
||||
|
||||
configMode = ((LOW == digitalRead(CONFIG_SWITCH)) || (configBlock.magic != MAGIC));
|
||||
|
||||
if (configMode) {
|
||||
#ifdef DEBUG
|
||||
Serial.println("Configuration mode");
|
||||
#endif
|
||||
digitalWrite(LED_PIN, LOW);
|
||||
setupConfigurationNetwork();
|
||||
setupConfigurationServer();
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
Serial.println("Production mode");
|
||||
Serial.println();
|
||||
Serial.println();
|
||||
showConfiguration();
|
||||
#endif
|
||||
|
||||
digitalWrite(LED_PIN, HIGH);
|
||||
setupProduction();
|
||||
setupConfigurationServer();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.println("Started.");
|
||||
#endif
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (configMode) {
|
||||
loopConfiguration();
|
||||
} else {
|
||||
loopProduction();
|
||||
}
|
||||
}
|
||||
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This code can be also found embedded into two of my projects. Find them at <a href="https://gitlab.com/wolutator/EspThermometer2" target="_blank">https://gitlab.com/wolutator/EspThermometer2</a> and <a href="https://gitlab.com/wolutator/TouchSwitch" target="_blank">https://gitlab.com/wolutator/TouchSwitch</a>.
|
||||
This code can be also found embedded in several of my projects. Find them at <a href="https://gitlab.com/wolutator/EspThermometer2" target="_blank">https://gitlab.com/wolutator/EspThermometer2</a>, <a href="https://gitlab.com/wolutator/TouchSwitch" target="_blank">https://gitlab.com/wolutator/TouchSwitch</a>, <a href="https://gitlab.com/wolutator/MySwitch" target="_blank">https://gitlab.com/wolutator/MySwitch</a>, <a href="https://gitlab.com/wolutator/RainSensor" target="_blank">https://gitlab.com/wolutator/RainSensor</a> and <a href="https://gitlab.com/wolutator/TwoLedSignal" target="_blank">https://gitlab.com/wolutator/TwoLedSignal</a>.
|
||||
</p>
|
||||
|
BIN
files/2016-10-13_1.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
files/2016-10-13_works.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
files/2016-10-13_works_not.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
files/201609091558_0001.pdf
Normal file
BIN
files/201609091558_0002.pdf
Normal file
115
files/75217C088B3EF6AE55F4D4C7B586EAFCDF2F65F4.key
Normal file
@ -0,0 +1,115 @@
|
||||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WW9p2G2UqiFbsvlIqR4itzLL
|
||||
e1AMFjbNqE/LFya9ttKR8lwVEXhW0QpIuoFN8+JfmvtN932We7aQO02LYkQc8dPT
|
||||
ZWhb/lYr2u9YkftJOYxBuluBNxqAdJg6/NoU/mcztZ/hahgSx4u6EGnJa163PF9X
|
||||
+RQYxNo9TGAnzyZxu6I9MUqT0GR/09Q0weZrP8vNjR2Dxp7jXHlNXzt6F7tA/1sm
|
||||
ij1WJ0qTIKQRgsnJoULNFEVSSWzI9dyAHqnVsQGwf0xhcugVwMw0dxS7q/aVErkA
|
||||
UzZbs54AnA==
|
||||
=GSFz
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
BIN
files/IMG_0536.JPG
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
files/IMG_6875_2-very-small.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
files/IMG_6875_2.jpg
Normal file
After Width: | Height: | Size: 4.6 MiB |
@ -1,8 +1,9 @@
|
||||
body {
|
||||
font-family: "verdana", sans-serif;
|
||||
font-family: "Optima", sans-serif;
|
||||
font-size: 16px;
|
||||
margin: 0 5% 0 5%;
|
||||
width: 1080px;
|
||||
margin: 20px 10% 0 10%;
|
||||
width: 80%;
|
||||
background-color: lightblue;
|
||||
}
|
||||
|
||||
.header {
|
||||
@ -33,6 +34,7 @@ body {
|
||||
|
||||
.main {
|
||||
padding: 15px;
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
|
||||
.row:after {
|
||||
@ -43,14 +45,14 @@ body {
|
||||
|
||||
.footer {
|
||||
font-size: 12px;
|
||||
background-color: #f1f1f1;
|
||||
background-color: #333;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
float: left;
|
||||
display: block;
|
||||
color: #333;
|
||||
color: #f2f2f2;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
@ -60,3 +62,8 @@ body {
|
||||
background-color: #ddd;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.floatright {
|
||||
float: right;
|
||||
padding-top: 25px;
|
||||
}
|
241
files/hm-config.txt
Normal file
@ -0,0 +1,241 @@
|
||||
MASTER
|
||||
{
|
||||
Channel: 2
|
||||
{
|
||||
[TRANSMIT_TRY_MAX]: 06
|
||||
[AES_ACTIVE]: 00
|
||||
[POWERUP_ACTION]: 00
|
||||
[STATUSINFO_RANDOM]: 01
|
||||
[STATUSINFO_MINDELAY]: 04
|
||||
}
|
||||
Channel: 1
|
||||
{
|
||||
[TRANSMIT_TRY_MAX]: 06
|
||||
[AES_ACTIVE]: 00
|
||||
[POWERUP_ACTION]: 00
|
||||
[STATUSINFO_RANDOM]: 01
|
||||
[STATUSINFO_MINDELAY]: 04
|
||||
}
|
||||
Channel: 0
|
||||
{
|
||||
[ROAMING]: 00
|
||||
[POLLING_INTERVAL]: 3c
|
||||
[CONF_BUTTON_TIME]: ff
|
||||
[INTERNAL_KEYS_VISIBLE]: 01
|
||||
[POLLING]: 00
|
||||
[LOCAL_RESET_DISABLE]: 00
|
||||
}
|
||||
}
|
||||
|
||||
VALUES
|
||||
{
|
||||
Channel: 2
|
||||
{
|
||||
[WORKING]: 00
|
||||
[INHIBIT]: 00
|
||||
[STATE]: 00
|
||||
[INSTALL_TEST]: 00
|
||||
[ON_TIME]: 00
|
||||
}
|
||||
Channel: 1
|
||||
{
|
||||
[WORKING]: 00
|
||||
[INHIBIT]: 00
|
||||
[STATE]: 00
|
||||
[INSTALL_TEST]: 00
|
||||
[ON_TIME]: 00
|
||||
}
|
||||
Channel: 0
|
||||
{
|
||||
[CENTRAL_ADDRESS_SPOOFED]: 00
|
||||
[RSSI_PEER]: 00
|
||||
[BOOT]: 00
|
||||
[RSSI_DEVICE]: 3a
|
||||
[AES_KEY]: 00
|
||||
[CONFIG_PENDING]: 00
|
||||
[LAST_PACKET_RECEIVED]: 5b 16 17 7e
|
||||
[DUTYCYCLE]: 00
|
||||
[UNREACH]: 00
|
||||
[LOWBAT]: 00
|
||||
[STICKY_UNREACH]: 01
|
||||
}
|
||||
}
|
||||
|
||||
LINK
|
||||
{
|
||||
Channel: 2
|
||||
{
|
||||
Address: 0xfd0001
|
||||
{
|
||||
Remote channel: 2
|
||||
{
|
||||
[UI_HINT]: 00
|
||||
[SHORT_ON_TIME]: ff
|
||||
[SHORT_ONDELAY_TIME]: 00
|
||||
[SHORT_OFF_TIME]: ff
|
||||
[SHORT_OFFDELAY_TIME]: 00
|
||||
[SHORT_JT_ONDELAY]: 06
|
||||
[SHORT_JT_ON]: 06
|
||||
[SHORT_JT_OFFDELAY]: 06
|
||||
[SHORT_JT_OFF]: 06
|
||||
[SHORT_CT_ONDELAY]: 00
|
||||
[SHORT_CT_OFFDELAY]: 00
|
||||
[LONG_JT_OFF]: 06
|
||||
[SHORT_ON_TIME_MODE]: 00
|
||||
[LONG_ONDELAY_TIME]: 00
|
||||
[SHORT_CT_ON]: 00
|
||||
[LONG_CT_ONDELAY]: 00
|
||||
[LONG_ACTION_TYPE]: 01
|
||||
[LONG_COND_VALUE_HI]: 64
|
||||
[LONG_OFF_TIME_MODE]: 00
|
||||
[LONG_OFFDELAY_TIME]: 00
|
||||
[LONG_CT_OFFDELAY]: 00
|
||||
[SHORT_COND_VALUE_LO]: 32
|
||||
[LONG_COND_VALUE_LO]: 32
|
||||
[LONG_CT_OFF]: 00
|
||||
[LONG_JT_ONDELAY]: 06
|
||||
[SHORT_OFF_TIME_MODE]: 00
|
||||
[LONG_CT_ON]: 00
|
||||
[LONG_MULTIEXECUTE]: 01
|
||||
[SHORT_CT_OFF]: 00
|
||||
[LONG_OFF_TIME]: ff
|
||||
[LONG_JT_OFFDELAY]: 06
|
||||
[LONG_ON_TIME_MODE]: 00
|
||||
[LONG_JT_ON]: 06
|
||||
[LONG_ON_TIME]: ff
|
||||
[SHORT_ACTION_TYPE]: 01
|
||||
[SHORT_COND_VALUE_HI]: 64
|
||||
}
|
||||
}
|
||||
Address: 0x5a518b
|
||||
{
|
||||
Remote channel: 2
|
||||
{
|
||||
[UI_HINT]: 00
|
||||
[SHORT_ON_TIME]: ff
|
||||
[SHORT_ONDELAY_TIME]: 00
|
||||
[SHORT_OFF_TIME]: ff
|
||||
[SHORT_OFFDELAY_TIME]: 00
|
||||
[SHORT_JT_ONDELAY]: 03
|
||||
[SHORT_JT_ON]: 04
|
||||
[SHORT_JT_OFFDELAY]: 06
|
||||
[SHORT_JT_OFF]: 01
|
||||
[SHORT_CT_ONDELAY]: 00
|
||||
[SHORT_CT_OFFDELAY]: 00
|
||||
[LONG_JT_OFF]: 01
|
||||
[SHORT_ON_TIME_MODE]: 00
|
||||
[LONG_ONDELAY_TIME]: 00
|
||||
[SHORT_CT_ON]: 00
|
||||
[LONG_CT_ONDELAY]: 00
|
||||
[LONG_ACTION_TYPE]: 01
|
||||
[LONG_COND_VALUE_HI]: 64
|
||||
[LONG_OFF_TIME_MODE]: 00
|
||||
[LONG_OFFDELAY_TIME]: 00
|
||||
[LONG_CT_OFFDELAY]: 00
|
||||
[SHORT_COND_VALUE_LO]: 32
|
||||
[LONG_COND_VALUE_LO]: 32
|
||||
[LONG_CT_OFF]: 00
|
||||
[LONG_JT_ONDELAY]: 03
|
||||
[SHORT_OFF_TIME_MODE]: 00
|
||||
[LONG_CT_ON]: 00
|
||||
[LONG_MULTIEXECUTE]: 01
|
||||
[SHORT_CT_OFF]: 00
|
||||
[LONG_OFF_TIME]: ff
|
||||
[LONG_JT_OFFDELAY]: 06
|
||||
[LONG_ON_TIME_MODE]: 00
|
||||
[LONG_JT_ON]: 04
|
||||
[LONG_ON_TIME]: ff
|
||||
[SHORT_ACTION_TYPE]: 01
|
||||
[SHORT_COND_VALUE_HI]: 64
|
||||
}
|
||||
}
|
||||
}
|
||||
Channel: 1
|
||||
{
|
||||
Address: 0xfd0001
|
||||
{
|
||||
Remote channel: 1
|
||||
{
|
||||
[UI_HINT]: 00
|
||||
[SHORT_ON_TIME]: ff
|
||||
[SHORT_ONDELAY_TIME]: 00
|
||||
[SHORT_OFF_TIME]: ff
|
||||
[SHORT_OFFDELAY_TIME]: 00
|
||||
[SHORT_JT_ONDELAY]: 06
|
||||
[SHORT_JT_ON]: 06
|
||||
[SHORT_JT_OFFDELAY]: 06
|
||||
[SHORT_JT_OFF]: 06
|
||||
[SHORT_CT_ONDELAY]: 00
|
||||
[SHORT_CT_OFFDELAY]: 00
|
||||
[LONG_JT_OFF]: 06
|
||||
[SHORT_ON_TIME_MODE]: 00
|
||||
[LONG_ONDELAY_TIME]: 00
|
||||
[SHORT_CT_ON]: 00
|
||||
[LONG_CT_ONDELAY]: 00
|
||||
[LONG_ACTION_TYPE]: 01
|
||||
[LONG_COND_VALUE_HI]: 64
|
||||
[LONG_OFF_TIME_MODE]: 00
|
||||
[LONG_OFFDELAY_TIME]: 00
|
||||
[LONG_CT_OFFDELAY]: 00
|
||||
[SHORT_COND_VALUE_LO]: 32
|
||||
[LONG_COND_VALUE_LO]: 32
|
||||
[LONG_CT_OFF]: 00
|
||||
[LONG_JT_ONDELAY]: 06
|
||||
[SHORT_OFF_TIME_MODE]: 00
|
||||
[LONG_CT_ON]: 00
|
||||
[LONG_MULTIEXECUTE]: 01
|
||||
[SHORT_CT_OFF]: 00
|
||||
[LONG_OFF_TIME]: ff
|
||||
[LONG_JT_OFFDELAY]: 06
|
||||
[LONG_ON_TIME_MODE]: 00
|
||||
[LONG_JT_ON]: 06
|
||||
[LONG_ON_TIME]: ff
|
||||
[SHORT_ACTION_TYPE]: 01
|
||||
[SHORT_COND_VALUE_HI]: 64
|
||||
}
|
||||
}
|
||||
Address: 0x5a518b
|
||||
{
|
||||
Remote channel: 1
|
||||
{
|
||||
[UI_HINT]: 00
|
||||
[SHORT_ON_TIME]: ff
|
||||
[SHORT_ONDELAY_TIME]: 00
|
||||
[SHORT_OFF_TIME]: ff
|
||||
[SHORT_OFFDELAY_TIME]: 00
|
||||
[SHORT_JT_ONDELAY]: 03
|
||||
[SHORT_JT_ON]: 04
|
||||
[SHORT_JT_OFFDELAY]: 06
|
||||
[SHORT_JT_OFF]: 01
|
||||
[SHORT_CT_ONDELAY]: 00
|
||||
[SHORT_CT_OFFDELAY]: 00
|
||||
[LONG_JT_OFF]: 01
|
||||
[SHORT_ON_TIME_MODE]: 00
|
||||
[LONG_ONDELAY_TIME]: 00
|
||||
[SHORT_CT_ON]: 00
|
||||
[LONG_CT_ONDELAY]: 00
|
||||
[LONG_ACTION_TYPE]: 01
|
||||
[LONG_COND_VALUE_HI]: 64
|
||||
[LONG_OFF_TIME_MODE]: 00
|
||||
[LONG_OFFDELAY_TIME]: 00
|
||||
[LONG_CT_OFFDELAY]: 00
|
||||
[SHORT_COND_VALUE_LO]: 32
|
||||
[LONG_COND_VALUE_LO]: 32
|
||||
[LONG_CT_OFF]: 00
|
||||
[LONG_JT_ONDELAY]: 03
|
||||
[SHORT_OFF_TIME_MODE]: 00
|
||||
[LONG_CT_ON]: 00
|
||||
[LONG_MULTIEXECUTE]: 01
|
||||
[SHORT_CT_OFF]: 00
|
||||
[LONG_OFF_TIME]: ff
|
||||
[LONG_JT_OFFDELAY]: 06
|
||||
[LONG_ON_TIME_MODE]: 00
|
||||
[LONG_JT_ON]: 04
|
||||
[LONG_ON_TIME]: ff
|
||||
[SHORT_ACTION_TYPE]: 01
|
||||
[SHORT_COND_VALUE_HI]: 64
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
files/img_0053.jpg
Normal file
After Width: | Height: | Size: 2.5 MiB |
BIN
files/img_0054-e1476437702547.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
files/img_0055-e1476437685461.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
files/img_0056.jpg
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
files/img_0100-e1478087375824.jpg
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
files/img_01012-e1478087121580.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
files/img_0105.jpg
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
files/img_0111-e1478087101747.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
files/img_0140.jpg
Normal file
After Width: | Height: | Size: 2.6 MiB |
BIN
files/img_0140_small.jpg
Normal file
After Width: | Height: | Size: 397 KiB |
BIN
files/img_0143-e1482141676335.jpg
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
files/img_0143-e1482141676335_small.jpg
Normal file
After Width: | Height: | Size: 157 KiB |
BIN
files/img_0144.jpg
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
files/img_0144_small.jpg
Normal file
After Width: | Height: | Size: 323 KiB |
BIN
files/img_0146.jpg
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
files/img_0146_small.jpg
Normal file
After Width: | Height: | Size: 155 KiB |
BIN
files/img_0813-e1473432862286.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
files/img_0813-e1473432862286_small.jpg
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
files/img_0814.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
files/img_0814_small.jpg
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
files/img_0818-e1473677307841.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
files/img_0818-e1473677307841_small.jpg
Normal file
After Width: | Height: | Size: 180 KiB |
BIN
files/img_0821-e1473677332189.jpg
Normal file
After Width: | Height: | Size: 928 KiB |
BIN
files/img_0821-e1473677332189_small.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
files/inverter0_2016-09-23-4.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
files/sender_receiver.png
Normal file
After Width: | Height: | Size: 153 KiB |
1
src/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*~
|
11
src/main.ts
@ -8,17 +8,13 @@ import * as express from 'express'
|
||||
|
||||
function getPageOptions(contentStr: string) : any {
|
||||
let pageOptions : any = {}
|
||||
// logger.info(`contentStr: ${contentStr}`)
|
||||
try {
|
||||
let lines = contentStr.split("\n")
|
||||
let firstLine = lines[0]
|
||||
// logger.info(`firstLine: ${firstLine}`)
|
||||
let pageOptionsStr = firstLine.replace(/^\s*<!-- (\{.+\}) -->[\s\S]*$/, "\$1")
|
||||
// logger.info(`pageOptionsStr: ${pageOptionsStr}`)
|
||||
pageOptions = JSON.parse(pageOptionsStr)
|
||||
// logger.info(JSON.stringify(pageOptions))
|
||||
} catch {
|
||||
// logger.info("No pageOptions found")
|
||||
logger.info("No pageOptions found")
|
||||
}
|
||||
return pageOptions
|
||||
}
|
||||
@ -50,6 +46,7 @@ let cache: any = {}
|
||||
|
||||
|
||||
app.engine('pag', (filePath: string, options: any, callback: any) => {
|
||||
// logger.info(JSON.stringify(options))
|
||||
if (! (filePath in cache)) {
|
||||
logger.info(`${filePath} not yet in cache`)
|
||||
|
||||
@ -111,7 +108,8 @@ app.get('/reload', (req, res) => {
|
||||
cache = {}
|
||||
toc = getToc()
|
||||
masterTmpl = fs.readFileSync('./docroot/master.tmpl').toString()
|
||||
res.send('reload triggered')
|
||||
let base = req.headers['x-proxy-original-url'] || "/"
|
||||
res.redirect(`${base}index`)
|
||||
})
|
||||
|
||||
app.use('/files', express.static('files'))
|
||||
@ -125,3 +123,4 @@ app.listen(config.dict.httpPort, () => {
|
||||
})
|
||||
logger.info("Homepage running")
|
||||
|
||||
|
||||
|