# RainWise CC3000 {id=cc3000_notes}

The CC3000 data logger stores 2MB of records.

When the logger fills up, it stops recording.

When WeeWX starts up it will attempt to
download all records from the logger since the last record in the
archive database.

The driver does not support hardware record generation.

The CC3000 data logger may be configured to return data in METRIC or ENGLISH
units. These are then mapped to the WeeWX unit groups `METRICWX` or `US`,
respectively.

## Configuring with `weectl device` {id=cc3000_configuration}

The CC3000 can be configured with the utility
[`weectl device`](../utilities/weectl-device.md).

!!! Note
    Make sure you stop `weewxd` before running `weectl device`.


### --help {id=cc3000_help}

Invoking `weectl device` with the `--help` option will produce something like
this:

    weectl device --help

```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
Usage: weectl device [config_file] [options] [-y] [--debug] [--help]

Configuration utility for weewx devices.

Options:
-h, --help            show this help message and exit
--debug               display diagnostic information while running
-y                    answer yes to every prompt
--info                display weather station configuration
--current             display current weather readings
--history=N           display N records (0 for all records)
--history-since=N     display records since N minutes ago
--clear-memory        clear station memory
--get-header          display data header
--get-rain            get the rain counter
--reset-rain          reset the rain counter
--get-max             get the max values observed
--reset-max           reset the max counters
--get-min             get the min values observed
--reset-min           reset the min counters
--get-clock           display station clock
--set-clock           set station clock to computer time
--get-interval        display logger archive interval, in seconds
--set-interval=N      set logging interval to N seconds
--get-units           show units of logger
--set-units=UNITS     set units to METRIC or ENGLISH
--get-dst             display daylight savings settings
--set-dst=mm/dd HH:MM,mm/dd HH:MM,[MM]M
set daylight savings start, end, and amount
--get-channel         display the station channel
--set-channel=CHANNEL
set the station channel
```

### `--info` {id=cc3000_info}

Display the station settings with `--info`

    weectl device --info

This will result in something like:

```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
Firmware: Rainwise CC-3000 Version: 1.3 Build 022 Dec 02 2016
Time: 2020/01/04 15:38:14
DST: 03/08 02:00,11/01 02:00,060
Units: ENGLISH
Memory: 252242 bytes, 4349 records, 12%
Interval: 300
Channel: 0
Charger: CHARGER=OFF,BATTERIES=5.26V
Baro: 30.37
Rain: 3.31
HEADER: ['HDR', '"TIMESTAMP"', '"TEMP OUT"', '"HUMIDITY"', '"PRESSURE"', '"WIND DIRECTION"', '"WIND SPEED"',~
MAX: ['MAX', '11:59  61.1', '02:47  99', '09:51 30.42', '13:32 337', '13:32  13.3', '00:00   0.00', '09:20  ~
MIN: ['MIN', '02:19  40.6', '14:42  66', '00:34 30.24', '00:00  67', '00:00   0.0', '00:00   0.00', '06:48  ~
```

### `--current` {id=cc3000_current}

Returns the current values in a comma-delimited format. The order of
the data values corresponds to the output of the
`--get-header` command. `NO DATA` is returned if the unit has not
received a transmission from the weather station.

    weectl device --current

This will result in something like:

```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
{'dateTime': 1578175453.0, 'outTemp': 58.6, 'outHumidity': 71.0, 'pressure': 30.36, 'windDir': 315.0, ~
```

### `--history=N` {id=cc3000_history}

Display the latest `N` records from the CC3000 logger memory.  Use a value of
`0` to display all records.  Note: because there may be other records
mixed in with the archive records, this command will display an
extra seven records per day (or partial day).

    weectl device --history=2

This will result in something like:

```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
['REC', '2020/01/04 13:25', ' 58.9', ' 71', '30.36', '344', '  4.9', ' 10.7', '  0.00', ' 7.44', ' 5.26', ~
['REC', '2020/01/04 13:30', ' 59.0', ' 71', '30.36', '327', '  3.6', ' 10.0', '  0.00', ' 7.32', ' 5.26', ~
['REC', '2020/01/04 13:35', ' 59.1', ' 70', '30.36', '305', '  5.5', ' 13.3', '  0.00', ' 7.44', ' 5.26', ~
['REC', '2020/01/04 13:40', ' 59.1', ' 70', '30.36', '330', '  3.4', '  8.9', '  0.00', ' 7.08', ' 5.26', ~
['REC', '2020/01/04 13:45', ' 58.9', ' 70', '30.36', '318', '  2.6', '  7.2', '  0.00', ' 7.17', ' 5.26', ~
['REC', '2020/01/04 13:50', ' 58.8', ' 71', '30.36', '312', '  3.6', '  7.9', '  0.00', ' 7.14', ' 5.26', ~
['REC', '2020/01/04 13:55', ' 58.9', ' 71', '30.36', '330', '  4.5', ' 10.0', '  0.00', ' 7.20', ' 5.26', ~
['REC', '2020/01/04 14:00', ' 58.8', ' 71', '30.36', '331', '  4.6', '  9.6', '  0.00', ' 7.38', ' 5.26', ~
['REC', '2020/01/04 14:05', ' 58.6', ' 71', '30.36', '331', '  4.0', '  9.3', '  0.00', ' 7.29', ' 5.26', ~
```

### `--history-since=N` {id=cc3000_history_since}

Display all CC3000 logger memory records created in
the last `N` minutes.

    weectl device --history-since=10

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
{'dateTime': 1578175800.0, 'outTemp': 58.6, 'outHumidity': 70.0, 'pressure': 30.36, 'windDir': 316.0, ~
{'dateTime': 1578176100.0, 'outTemp': 58.7, 'outHumidity': 70.0, 'pressure': 30.36, 'windDir': 317.0, ~
```

### `--clear-memory` {id=cc3000_clear_memory}

Use <span class='code'>--clear-memory` to erase all records
from the logger memory.

    weectl device --clear-memory

### `--get-header` {id=cc3000_get_header}

Returns a series of comma delimited text descriptions. These
descriptions are used to identify the type and order of the returned
data in both `--get-current</code>,
`--download=N</code> and
`--download-since=N</code> commands.

    weectl device --get-header

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
['HDR', '"TIMESTAMP"', '"TEMP OUT"', '"HUMIDITY"', '"PRESSURE"', '"WIND DIRECTION"', '"WIND SPEED"', ~
```

### `--get-rain` {id=cc3000_get_rain}

Display the rain counter.

The CC-3000 maintains a rainfall counter that is only reset by a reboot or by
issuing the `reset` command. The counter counts in 0.01 inch increments and
rolls over at 65536 counts. Issuing the rainfall reset command will clear all
rainfall counters including the current daily rainfall.

    weectl device --get-rain

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
3.31
```

### `--reset-rain` {id=cc3000_reset_rain}

Reset the rain counter to zero.

    weectl device --reset-rain

### `--get-max` {id=cc3000_get_max}

Get the maximum values observed since the last time.

Output parameter order: Outside temperature, humidity, pressure,
wind direction, wind speed, rainfall (daily total), station
voltage, inside temperature. If any optional sensors have been
enabled they will also be displayed.

    weectl device --get-max

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
['MAX', '11:59  61.1', '02:47  99', '09:51 30.42', '13:32 337', '13:32  13.3', '00:00   0.00', '09:20 ~
```

### `--reset-max` {id=cc3000_reset_max}

Reset the maximum values.

    weectl device --reset-max

### `--get-min` {id=cc3000_get_min}

Get the minimum values observed since the last time.

Output parameter order: Outside temperature, humidity, pressure,
wind direction, wind speed, rainfall (ignore), station
voltage, inside temperature. If any optional sensors have been
enabled they will also be displayed.

    weectl device --get-min

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
['MIN', '02:19  40.6', '14:42  66', '00:34 30.24', '00:00  67', '00:00   0.0', '00:00   0.00', '06:48 ~
```

### `--reset-min` {id=cc3000_reset_min}

Reset the minimum values.

    weectl device --reset-min

### `--get-clock` {id=cc3000_get_clock}

Get the time.

    weectl device --get-clock

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
2020/01/04 15:01:34
```

### `--set-clock` {id=cc3000_set_clock}

Set the station clock to match the date/time of the computer.

    weectl device --set-clock

### `--get-interval` {id=cc3000_get_interval}

Returns the current logging interval (in seconds).

    weectl device --get-interval

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
300
```

### `--set-interval=N` {id=cc3000_set_interval}

Set the archive interval.

CC3000 loggers ship from the factory with an archive interval of
1 minutes (60 seconds). To change the
station's interval to 300 seconds (5 minutes), do the following:

    weectl device --set-interval=5

### `--get-units` {id=cc3000_get_units}

Returns the current measurement units.

    weectl device --get-units

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
ENGLISH
```

### `--set-units` {id=cc3000_set_units}

The CC3000 can display data in either ENGLISH or METRIC unit systems.  Use
`--set-units` to specify one or the other.

The CC3000 driver automatically converts the units to maintain consistency with
the units in WeeWX.

    weectl device --set-units=ENGLISH

### `--get-dst` {id=cc3000_get_dst}

Return the dates and times when the clock will change due to daylight
saving and the number of minutes that the clock will change.

This will result in something like:
```
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
03/08 02:00,11/01 02:00,060
```

### `--set-dst=N` {id=cc3000_set_dst}

Set the station start, end, and amount of daylight savings.

The schedule can be set by adding the three parameters, forward date and time,
back date and time and number of minutes to change (120 max).

    weectl device --set-dst="03/08 02:00,11/01 02:00,060"

Daylight saving can be disabled by setting the daylight-saving to zero.

    weectl device --set-dst=0

### `--get-channel` {id=cc3000_get_channel}

Displays the station channel (0-3).

This will result in something like:
```
Using configuration file /home/weewx/weewx.conf
Using CC3000 driver version 0.30 (weewx.drivers.cc3000)
0
```

### `--set-channel=N` {id=cc3000_set_channel}

Rainwise stations transmit on one of four channels.  If you have
multiple instrument clusters within a kilometer or so of each
other, you should configure each to use a different channel.
In the instrument cluster, remove the cover and set the DIP
switches 0 and 1.  Use `--set-channel`
to a value of 0-3 to match that of the instrument cluster.

    weectl device --set-channel=0

## Station data {id=cc3000_data}

The following table shows which data are provided by the station
hardware and which are calculated by WeeWX.

<table class='station_data'>
<caption>CC3000 station data</caption>
<tbody class='code'>
<tr class="first_row">
<td style='width:200px'>Database Field</td>
<td>Observation</td>
<td>Loop</td>
<td>Archive</td>
</tr>
<tr>
<td class='first_col'>barometer</td>
<td></td>
<td>S</td>
<td>S</td>
</tr>
<tr>
<td class='first_col'>pressure</td>
<td>PRESSURE</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>altimeter</td>
<td></td>
<td>S</td>
<td>S</td>
</tr>
<tr>
<td class='first_col'>inTemp</td>
<td>TEMP IN</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>outTemp</td>
<td>TEMP OUT</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>outHumidity</td>
<td>HUMIDITY</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>windSpeed</td>
<td>WIND SPEED</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>windDir</td>
<td>WIND DIRECTION</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>windGust</td>
<td>WIND GUST</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>rain</td>
<td>rain_delta</td>
<td>D</td>
<td>D</td>
</tr>
<tr>
<td class='first_col'></td>
<td>RAIN</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>rainRate</td>
<td></td>
<td>S</td>
<td>S</td>
</tr>
<tr>
<td class='first_col'>dewpoint</td>
<td></td>
<td>S</td>
<td>S</td>
</tr>
<tr>
<td class='first_col'>windchill</td>
<td></td>
<td>S</td>
<td>S</td>
</tr>
<tr>
<td class='first_col'>heatindex</td>
<td></td>
<td>S</td>
<td>S</td>
</tr>
<tr>
<td class='first_col'>radiation<sup>1</sup></td>
<td>SOLAR RADIATION</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>UV<sup>1</sup></td>
<td>UV INDEX</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>supplyVoltage</td>
<td>STATION BATTERY</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td class='first_col'>consBatteryVoltage</td>
<td>BATTERY BACKUP</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td class='first_col'>extraTemp1<sup>2</sup></td>
<td>TEMP 1</td>
<td>H</td>
<td>H</td>
</tr>
<tr>
<td class='first_col'>extraTemp2<sup>2</sup></td>
<td>TEMP 2</td>
<td>H</td>
<td>H</td>
</tr>
</tbody>
</table>

<p class='station_data_key'>
<sup>1</sup> The <span class='code'>radiation</span> and
<span class='code'>UV</span>
data are available only with the optional solar radiation sensor.
</p>

<p class='station_data_key'>
<sup>2</sup> The <span class='code'>extraTemp1</span> and
<span class='code'>extraTemp2</span>
data are available only with the optional additional temperature
sensors.
</p>

<p class='station_data_key'>
<b>H</b> indicates data provided by <b>H</b>ardware<br/>
<b>D</b> indicates data calculated by the <b>D</b>river<br/>
<b>S</b> indicates data calculated by the StdWXCalculate <b>S</b>ervice<br/>
</p>

