Time to dive in. Let’s create a development setup for JeeMon on Mac OSX, in a new folder called “jee”:
cd ~/Desktop
git clone git://git.jeelabs.org/jeerev.git jee
cd jee
wget https://jeelabs.org/pub/jeemon/jeemon-macosx.zip
unzip jeemon-macosx.zip
That gives me the following files:

There is more here than strictly needed for production use – just ignore most of this for now. The main bits are “jeemon
” and the “kit/
” sub-folder with all the JeeRev code in it.
On Linux, the commands will be almost the same, but you’ll need to get a different JeeMon zip file.
Since I don’t use Windows myself, I’ll have to rely on help / support from others (yes, you!) to get the details right.
Thanks to @tankslappa, here’s a first report of an install on XP SP3:
cd %homepath%\desktop
“C:\Program Files\Git\bin\git” clone git://git.jeelabs.org/jeerev.git jee
Cloning into jee…
remote: Counting objects: 1810, done.
remote: Compressing objects: 100% (670/670), done.
remote: Total 1810 (delta 1187), reused 1742 (delta 1119)
Receiving objects: 100% (1810/1810), 1.45 MiB | 87 KiB/s, done.
Resolving deltas: 100% (1187/1187), done.
cd jee
wget https://jeelabs.org/pub/jeemon/jeemon-win.zip
Then unzip using your favorite zip manager, and you should be good to go (I’ll optimize further, one day).
Note: on Mac OSX and Linux, if “.” is not in your path, you’ll need to add it or type “./jeemon
” i.s.o. “jeemon
” everywhere it is mentioned below.
At this point, JeeMon is ready for use.
There are a few built-in commands – here’s a quick sanity check:
jeemon env general
The output provides some general details about the current runtime environment:
GENERAL:
JeeMon = v1.5
Library = /Users/jcw/Desktop/jee/kit
Encoding = utf-8
Directory = /Users/jcw/Desktop/jee
Executable = /Users/jcw/Desktop/jee/jeemon
Tcl version = 8.6b1.1
If you got this far, then everything is working as intended. If not: you’ve hit a bug – please get in touch.
But the normal procedure is to simply launch it:
jeemon
If this is the first time, you’ll get something like this:
No application startup code found.
21:22:29.157 app is now running in first-time configuration mode
21:22:29.189 web server starting on http://127.0.0.1:8181/
Where “first-time configuration mode” means that JeeMon didn’t find a “main.tcl” rig, which is normally used to start up. To get past this step, you need to point your web browser to the indicated URL, which’ll show this page:

There’s not much point in selecting anything else but “YES”at this stage. This creates a 3-line “main.tcl” file:
# default JeeMon startup file
Log main.tcl {in [pwd]}
Jm needs HomeApp
From now on, JeeMon will start up using the built-in “HomeApp” rig when there are no command-line args.
The next steps depend on what you’re after – you can either dive into Tcl programming and explore how JeeRev (i.e. the kit/
area) is structured, or you can try out some examples and get a more top-down impression of it all.
To explore Tcl, the thing to keep in mind is that JeeMon will act as a standard no-frills Tcl 8.6 programming environment when launched with a source file as argument (just like tclsh and tclkit). Here’s how to make a hello-world demo – create a file called “hello.tcl” with your favorite text editor and put the following code in it:
puts "hello, world"
Then run that code using the command “jeemon hello.tcl
“. You can probably guess what it does…
If you want to use a convenient interactive shell with scrollback, history, and debugging support, download the TkCon script and launch it using “jeemon tkcon.tcl
” – this uses Tk to create a mini IDE.
For Tcl manuals, books, and demos, see http://www.tcl.tk/. To really dive in, check out this tutorial or this.
But chances are that you just want to get an idea of what JeeMon does in the context of Physical Computing, House Monitoring, or Home Automation. I’ll describe just two simple examples here, and will point to the JeeMon homepage for the rest. Note that everything described below is really part of JeeRev, i.e. the standard library used by JeeMon – or to put it differently, by the source files located inside the “kit/
” folder.
First, let’s launch a trivial web server (you can see the code at examples/hello-web/main.tcl):
jeemon examples/hello-web/
You’ll see a log output line, similar to this:
18:23:46.744 web server starting on http://127.0.0.1:8181/
JeeMon is now running in async event mode, and keeps running until you force it to stop (with ^C, kill, whatever). Leave it running and go to the indicated URL in your browser. You’ll be greeted with a web page generated by JeeMon. Hit refresh to convince yourself that it really works.
Now quit JeeMon and check out the files in the “examples/hello-rf12/
” folder. This example connects to a JeeNode/JeeLink running the RF12demo sketch, and displays incoming packets via its web server. But before launching JeeMon, you have to tell it what serial interface (COM or tty port) to use: copy “config-sample.txt” to “config.txt” and edit it to match your setup. Make sure the JeeNode/JeeLink is plugged in, then start JeeMon:
jeemon examples/hello-rf12/
The output will look something like this:
18:37:57.166 web server starting on http://127.0.0.1:8181/
18:37:58.154 rf12? [RF12demo.8] A i1* g5 @ 868 MHz
[...]
And two dozen more lines which you can ignore. Now go to that same URL again with your web browser. If your config file defines the proper net group and you have some JeeNodes sending out packets in that net group, you’ll see them in your browser after a while. This is what I got within a few minutes, here at JeeLabs:
#1 18:42:21 - OK 19 186 200 8 1 226 2 32 0 0 213 81 33
#2 18:42:31 - OK 19 186 200 8 1 226 2 32 0 0 213 81 33
#3 18:42:44 - OK 3 132 43 9 0
#4 18:42:51 - OK 19 186 200 8 1 226 2 32 0 0 213 81 33
#5 18:43:11 - OK 19 186 200 8 1 226 2 32 0 0 213 81 33
#6 18:43:21 - OK 19 186 200 8 1 226 2 32 0 0 213 81 33
#7 18:43:29 - OK 6 1 95 212 0
[...]
Now might be a good time to look at the code in examples/hello-rf12/main.tcl – to see how it all works.
Wanna experiment? Easy: quit JeeMon, create a new directory “blah
“, and copy the files from the example to it. Edit them as you like, then start JeeMon using “jeemon blah
“. Go ahead, try it! – the worst that can happen is that you get error messages. Usually, error tracebacks will refer to JeeRev files in the “kit/
” folder.
This concludes my intro for those who want to get their feet wet with JeeMon. We’ve only scratched the surface!
I’ll work out more examples on the JeeRev page as I start building up my own setup here at JeeLabs. If you want to try things and run into trouble (there will be rough edges!) – here are two places to post problems and bugs:
Feel free to ask and post anything else on the forum. If it gets out of hand, I’ll set up a separate area for JeeMon.
A quick note about the Shop: I’m running into some shortages across the board (such as wire jumpers), which also affect the JX and WSP packs. All the missing bits are on order, but some of this might not get in before early December. My apologies for the delay and inconvenience! -jcw