Reply to comment

For my home automation project I needed a general purpose protocol to send data (and text) from a server to a Jeenode:

- First to control a multi-line LCD display

- To control "things" connected to a Jeenode remotely (and wirelessly of course)

The first project is to control a set of fans mounted in a boiler cupboard that gets way too hot occasionally, and to control a display on top of the cupboard.

The temperature is already reported to the server from another Jeenode running a unmodified version of the "ROOMS" sketch reading from a temperature and humidity sensor (SHT11).

As I would like to spend as little time modifying existing code I decided to use a Jeenode running the "DEMO" sketch at the server end - as this already has the ability to send data to a destination node using the format :

first_part + $destination_jeenode + " a"

where the "first_part" are bytes written as hexadecimal 2 character sequences separated by space.

So in other words - to send a "0" (i.e. as a example a "off" to a jeenode you would send

00 35 a

which sends a "0" to a jeenode with address 35 (or "C" as the alternate address format when you start up a Jeenode)

or to send "AB" to Jeenode 35 :

33 34 35 a

If a string is to be sent each character in the string has to be encoded as 2 hex digits with " " (space) in between characters.

To make this easier I wrote a short Ruby script to do this for me - which in turn can be called from other scripts.

----

On the other end (the remote Jeenode) I decided to use a slightly modified version of the "DEMO" sketch to do all the hard work.

Each piece of this will be described in a later post.

Reply

The content of this field is kept private and will not be shown publicly.