This repo is deprecated and replaced by
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
solar power

Water Temperature Sensors


The firmware is located in the electron directory.

To build:

$ cd electron
$ particle login
$ rm electron_firmware_*.bin
$ make
$ particle flash --usb electron_firmware_*.bin

(Support for local toolchain is planned.)

  • If DEBUG_MODE is set to 1, the data will be logged to serial every 5 seconds.
  • If DEBUG_MODE is set to 0, the data will be logged to the particle cloud as an event every hour.

Event data format

The events are logged as events to the particle cloud with the event name measurement.

The data contains the measurements as comma separated key=value pairs. The temperature values are returned as decimal milli-degrees celsius.


  • t1: Main temperature sensor
  • v: Battery voltage
  • c: Battery capacity (percent)

Here's an example event:


Message format (LoRaWAN)

LoRaWAN uses a binary message format. Payload bytes correspond to the following C struct (bytes in network byte order):

struct {
    uint32_t millicelsius; // Integer like 23420
    float batteryVoltage; // Float like 3.945454
    float batteryCharge; // Charge percentage like 85.38253
} payload;

In Python, messages can be parsed using the !iff format specifier:

import struct
struct.unpack(̈́'!iff', payload)


  • Do we want a binary format, or stick with ascii strings?
  • If we want a binary format, how do we keep it upgradeable?