This page describes The "Fork for 7NC kitchen" fork of FW004, "Far Watch Watcher".
"Far Watch Watcher" is a utility which increases the benefit you get if you have set up an Arduserver... which can cost as little as $16... or have a FarWatch webserver. Or some other web server which includes two lines that are there for the wants of FarWatchWatcher.
(I'll describe those lines later.)
FW004_kitfork isn't typical of the software I offer via the web. It is crude. It isn't flexible. But it does work... in a narrow context... if you are willing to take a bit of trouble setting it up. And it is free!
This page isn't typical of what I usually publish. It is unpolished. It doesn't take you gently by the hand. It doesn't do things "well". But, if you can overcome all of that, you can see FarWatchWatcher working by using it to watch one of my FarWatch servers....http://mon7nc.dyndns.org:1202/
(Testing that as a simple link should bring up (in a new tab) a short webpage starting "Yet another Arduserver!...".)
OR, you can use FW004 with a webserver of your own, as long as it contains two essential lines.
To set up a suitable webserver easily, use an ESP8266... The code you need is downloadable from my essay on another Arduserver... this time with an ESP8266.
New data joins the graph at the right hand edge, and older data is slowly "pushed" to the left.
The server must return one line that says...
.. and following that, where you see sttt in the line above, you must have...
The digits will be treated as reporting a temperature in DECI-degrees, C.
Except for the last character in the data line, the rest are ignored.
If the line returned...
... FW004 (kitfork fork) would "think" that the server was seeing 15.6 degrees C and -5.1 degrees C, and put dots on the graph accordingly. (Actually, the -5.1 would either be lost, or "wrap" around (vertically) and appear in a misleading place. The graph is set up to handle temperatures from about 45 - 85 Fahrenheit at the moment. Two horizontal lines mark the "60 deg F" and "70 deg F" levels... another thing that earlier versions of FW004 and precursors (FW003) lack.)
Little bonus: You saw the "b" at the end of the line. If that is 0 (zero) a line at the bottom of the FW004_kitfork graph is low. If it is anything else, the line is high. "b" for Binary. It is meant for reporting the state of a digital input to the server that is serving up the temperatures. "0" and "1" would be logical values. but in fact anything other than "0" is as good as "1".
FarWatchWATCHER FW004_kitfork automatically harvests some of the data the server offers. It draws a graph of the readings. It even records them in a spreadsheet- friendly data file.
I do offer a much better page than this, discussing the general FarWatchWatcher concept, and giving links to various related pages.
This essay is a kludged version of an earlier one. The earlier one explained... in more detail... an older datasource/ FarWatchWatcher combination. The older essay may help you figure out things I've explained badly here. (FW004 is a tweaked version of FW003.)
I may not, in the time I've been able to give this, been able to explain things adequately, but at least I've got the code online for you. Start by seeing if you can get this FW004 to read my humidity and temperature sensor (URL is here somewhere). If you get that far, and have some ESP8266 experience (or get it, from my article, cited here too), try setting up your own sensor reading webserver for FW004 to read? If you succeed, I would be delighted to know that my work wasn't a waste of time. Apologies for not making this easier for you, the way I hope most of my pages make them easy.
Still reading? Great! You have an Arduserver running? (or one of mine is responding.) Time to download and try FW004_kitfork, FarWatchWatcher...
You can download a zip file containing FW004, the "kitfork" fork. The program is under development just now. It will read, graph and record two temperatures, though. (Plus the state of an "on"/"off", or other digital datum.) Don't hesitate to get in touch, should you have questions.
Set up a folder for FW004_kitfork. (You can have multiple folders for multiple copies of FW004_kitfork and its associated files, if you anticipate monitoring more than one webpage. The folder name can be whatever you wish)
Fetch the .zip file I provide, and unpack from it to the folder you created at least FW004.exe. (Note that the "kit fork" part does NOT appear there. The title bar of the main window shows "Fork... for NC 8266". (No mention of "kitchen". Sorry!)
Windows 10 may whine... they want me to pay to be "recognized". If you get "Windows Protected Your PC..." with a big "Don't run" button, look for the "more information" link in the text. Click that, and a "Run Anyway" button appears. You DID scan the .exe with your anti-virus software, I hope?)
Run FW004.exe, and it should create a FW004ini.txt. (You can't run it directly from the .zip because of this part of how it works. Download .zip. Extract at least the .exe to a folder on your hard drive.)
It won't run the first time you try to use it.
Put the URL of your data source in the "Watched URL" edit box. (Until that is right, the program may be laggy, as it tries... and fails... to access a "server" "at" whatever "URL" is specified by that edit box. If you are comfortable with editing ini files, put your URL into the ini file as the entry for "IPAddr".)
Put anything you like in the "Free text..." box.
Close the program.
You may need to open FW004ini.txt in a text editor. Find the line...
.. and set it to "the right number". (Which I will explain!)
Several of the lines in the ini file, e.g....
...don't matter! at the moment.
You can leave the .ini file open in your text editor the whole time... but each time you quit FW004, the ini file is re-saved... with the values then present in the application.
Quit FW004 BEFORE making changes to what you see in the ini file. THEN (re)save the ini file from the text editor. That way, when you next start FW004, what it sees in the ini file will be in step with what is on the screen in the text editor.
"The right number" (for WhereFmtCodeLineIs=)...
Access your data source with a simple web browser. (Firefox, Chrome... whatever.)
Access the page's source. (Firefox: Right-click, "View Page Source.)
Find the line that says...
See which line that is, counting the first line as "1".
THAT's the number to put in FW004ini.txt as "WhereFmtCodeLineIs".
SAVE the edited FW004ini.txt. Restart FW004. You HAD stoppedFW004 before trying to edit the ini file, hadn't you? (If not, start again... when FW004 is stopped, it wipes out whatever ini file is present.)
FW004 should start running, returning the values from the server. You can click "Tick for debug speed..." to speed the fetch/report cycle up for testing purposes.
So... you have, at least in theory, access to a webpage serving up the data in the right format.
You've got FW004.exe in a folder of its own, with a tweaked .ini file. (The program itself will tweak the ini file when you change things in the program's window while it is running, e.g. the URL accessed.)
Now you can run FW004_kitfork!
Your anti-malware software may need to be told to let the program "do" TCP to and from the Arduserver. It probably SHOULD ask if the activity is sanctioned by you!
.. but in due course, a graph of the temperature values from the server will build. (And there will be the "on/off" data in the lime-green line at the bottom of the graph. (The graph above, the state of that datum from the server doesn't change during the period plotted. (Which was about 32 hours. It started just after midnight on day one, passed midnight once (magenta line), and ran for about another 8 hours before the screenshot was captured. There were two temperature sensors in different parts of one room. The outside air temperature was low. The room had a thermostatically controlled electric heater, which switched on about a dozen times. The big spike at about 2pm came from a door opening briefly to a very warm large room adjacent to the small room the sensors were in. The temperatures were generally between 60 degrees (troughs of green line) to 76 degrees (peaks of blue lines).
Unlike earlier versions of FW004, on the graph, by the way, as the numbers coming from the server INCREASE, the lines go UP.. as they always "should" have. (When you are a programmer, you can complain. You'd surprised how hard fixing THAT "little quirk" is.
You will see some vertical lines on the graph. The magenta ones are done at midnight... on the machine that FW004 is running on. The gray ones are done at 6am, noon, and 9pm.
The image to the left is of the main control panel for the application. The wide, scrollable pane across the bottom has the source code, as fetched from the server. The left hand pane above that shows how the data was interpreted, and sent to the data file on the disk.
The bottom pane of the "FW004_readings_f1" window gives you a look at the raw data lines, as extracted from the webpage.
"Quis custodiet ipsos custodes?"? The link will take you to the Wikipedia entry.
Please remember disclaimers at top... neither the software nor the webpage meet my usual standards for customer care... but if they are useful, I am pleased to share them.
Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org