SenseRx

An app for the Kookaberry

Tony Strasser

Developed by
Tony Strasser

AustSTEM

This app allows a Kookaberry to receive datagrams (packages of formatted data) transmitted wirelessly from a Kookaberry, or a network of Kookaberries, running compatible SenseXX (eg SenseDHT) apps within the range of its digital packet radio and on the same channel.

It receives these transmissions and logs them in a consolidated data file for later analysis and display on a computer.

It also transmits the current time to all the Kookaberries in the sensor network when it has the current time.

Directions

Radio Channel

Determine the radio channel to be used by all the Kookaberries in the sensor network and use the _Config app to ensure that the Kookaberry running the SenseRx app is using the same channel [the default channel is 7].

[Note: the Kookaberry has 84 available radio channels, each of which can be used to for separate and simultaneous independent sensor networks. Every Kookaberry in the network should first be configured with the selected radio channel (0 to 83) and ID (0 to 99) and desired datalogging interval using the _Config app]

Current time

The current time on a Kookaberry can be set by any of these methods:

  • Connect the Kookaberry to a PC or Mac and run any of KookaIDE, KookaBlockly or KookaTW which will automatically synchronise the Kookaberry’s clock to the computer’s clock.

  • Attach a DS3231 battery clock, which has been previously set to the correct time, to the Kookaberry. If present the SenseRx app will interrogate the DS3231 and set the Kookaberry’s time.

  • Connect the Kookaberry serial port (connector P3) to a Raspberry Pi (or other computer) running Node-Red with AustSTEMs Kookaberry Sensor Trends configuration. This sends time messages that SenseRx uses to synchronise time.

SenseRx judges the time as being correct when the year is 2020 or later. In that event it sends regular time messages which the other Kookaberries running SenseXX apps on the same radio channel will automatically set their time to.

Running the app

Using the Kookaberry’s app menu, navigate to the SenseRx app and press Button B to run it.

What is showing on the Home screen?

  1. Top Row: Name of app; OK if functioning correctly; the radio channel being used

  2. Centre Screen: Displays the datagrams transmitted from the Kookaberries running SenseXX apps. In the example shown, a Kookaberry with ID 01 and running the SenseDHT app with a DHT22 sensor is measuring a Temperature of 26.8 degrees Celsius and a Relative Humidity of 44.5%

  3. Bottom Row: Button A is Exit as usual; and the Kookaberry’s time

Logging of data

Every datagram received by SenseRx is decoded according to the identifier (usually the name of a sensor), and the decoded data (being the date and time, the transmitting Kookaberry’s ID, the sensor, and the sensor data) are logged in a sparse CSV (comma separated variable) file called SenseRx.CSV in the Kookaberry’s filestore. A sparse CSV file has column headings for every expected item of data, with the received data being stored in the applicable columns.

Displaying the logged data

After SenseRx has finished running, the data logged by the SenseRx app can be recovered from the Kookaberry’s USB memory and displayed and analysed in the same way as other CSV data files. The SenseRx CSV data looks like this

The data in the file is compatible with spreadsheet programs such as Microsoft Excel and can be transformed into charts using the spreadsheet tools.

The Kookaberry app GraphCSV can also be used to convert the SenseRx.CSV file into a web-browser viewable line chart in the SenseRx.htm file in the Kookaberry’s filestore. Please refer to the separate description of the GraphCSV app.

Receiving and displaying the data via a Raspberry Pi server

Development is ongoing to be able to use a Raspberry Pi as a classroom server to display data from multiple Kookaberries (within the Kookaberry’s radio range of up to 10 metres) in real time as the data is collected.

The SenseRx app provides the data it receives to a Raspberry Pi server via a serial connection to the Raspberry Pi’s USB port. The Raspberry Pi will generate a graph with separate trends for each data item received. The graph can be used by any web browser connected to the Raspberry Pi’s local network, including via WiFi or Ethernet.

The example graph shows data from a DHT22 sensor (Ta-degC-01 and H-%-01) and indicates there was data for a DS18 (To-degC-01) prior to the timeframe. The graph will display data for the last 24 hours or for a maximum of 10,000 data intervals.

A CSV file with a customised set of data columns for only data that were recorded can be created and downloaded using this web-browser interface.

Version:


Last updated:1 week ago


Device:Kookaberry


Radio code:


App ID:...


lib_dependencies:


root_dependencies:


Downloads

Download on GitHub
Image

Support

Issues resolved in the support forum:

8 out of 11
View support forum

Leave a Reply

Bitnami