Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release v1.4.0 #19

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.0] - 2024-12-20

### Added

- Support for Thingy91x

### Changed

- Merge changes from
[`golioth/reference-design-template@template_v2.5.0`](https://github.com/golioth/reference-design-template/tree/template_v2.5.0).
- Sensor readings moved to their own functions. This facilitates reading different sensors on the
Thingy91 and Thingy91x

### Known issues

- Thingy91x: The BME68x environment sensor sometimes shows repeated, unchanging values for
IAQ/VOC/CO2 readings. The same behavior is present in the factory sample from Nordic and believed
to be an issue with the upstream driver.

## [1.3.0] - 2024-10-03

### Added
Expand Down
104 changes: 99 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Overview
********

This repository highlights various aspects of the Golioth platform on the Nordic
Thingy91 device.
Thingy91 and Thingy91x devices.

This repo is based on the Golioth `Reference Design Template`_.

Expand Down Expand Up @@ -64,10 +64,24 @@ to this build. Then run the following commands to build and program the firmware
You must perform a pristine build (use ``-p`` or remove the ``build`` directory)
after changing the firmware version number in the ``VERSION`` file for the change to take effect.

Build for Thingy91
==================

.. code-block:: text

$ (.venv) west build -p -b thingy91/nrf9160/ns --sysbuild app
$ (.venv) west flash
west build -p -b thingy91/nrf9160/ns --sysbuild app
west flash

Build for Thingy91x
===================

.. code-block:: text

west build -p -b thingy91x/nrf9151/ns --sysbuild app
west flash --erase

Provision the device
********************

Configure PSK-ID and PSK using the device shell based on your Golioth
credentials and reboot:
Expand Down Expand Up @@ -161,14 +175,94 @@ The following RPCs can be initiated in the Remote Procedure Call menu of the
* ``4``: ``LOG_LEVEL_DBG``

``play_song``
This device can play different songs when the ``play_song`` RPC is sent with
one of the following parameters:
The Thingy91 can play different songs when the ``play_song`` RPC is sent with one of the
following parameters:

* ``beep``: Play a short 1 kHz tone. Also plays when button is pressed.
* ``funkytown``: Play the main tune from the 70s classic.
* ``mario``: Itsa me...a classic chiptune song!
* ``golioth``: A short theme for Golioth. Also plays on device boot.

Note that the Thingy91x does not have a buzzer and will return an "unimplemented" error code
which this method is called.

Time-Series Stream data
=======================

Sensor data is sent to Golioth based on the ``LOOP_DELAY_S`` setting. Sensor vary between the
supported boards, so different readings are available based on your hardware. Data may be viewed in
the `Golioth Console`_ by viewing the LightDB Stream tab of the device, or the in the Project's
Monitor section on the left sidebar.

Below you will find sample data for the devices supported by this application.

Thingy91
^^^^^^^^

.. code-block:: json

{
"sensor": {
"accel": {
"x": 0.343232,
"y": -0.156906,
"z": -9.257477
},
"light": {
"blue": 23,
"green": 56,
"ir": 6,
"red": 29
},
"weather": {
"gas": 51344,
"hum": 35.593,
"pre": 98.548,
"tem": 22.62
}
}
}

Thingy91x
^^^^^^^^^

.. code-block:: json

{
"sensor": {
"accel": {
"x": -0.008085,
"y": 0.0294,
"z": -0.803845
},
"weather": {
"co2": 467.279876,
"hum": 30.058282,
"iaq": 35,
"pre": 98511,
"tem": 20.995311,
"voc": 0.43105
}
}
}

Stateful Data (LightDB State)
=============================

Up-counting and down-counting timer readings are periodically sent to the ``actual`` path of the
LightDB Stream service. The frequency that these reading change is based on the ``LOOP_DELAY_S``
setting.

* ``desired`` values may be changed from the cloud side. The device will recognize these, validate
them for [0..9999] bounding, and then reset these endpoints to ``-1``. Changes may be made while
the device is not connected and will persist until the next time a connection is established.

* ``actual`` values will be updated by the device whenever a valid value is
received from the ``desired`` endpoints. The cloud may read the ``state``
endpoints to determine device status, but only the device should ever write to
the ``state`` endpoints.

.. _Reference Design Template: https://github.com/golioth/reference-design-template
.. _Pipelines: https://docs.golioth.io/data-routing
.. _Golioth Console: https://console.golioth.io
.. _golioth-zephyr-boards: https://github.com/golioth/golioth-zephyr-boards
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_MAJOR = 1
VERSION_MINOR = 3
VERSION_MINOR = 4
PATCHLEVEL = 0
VERSION_TWEAK = 0
EXTRAVERSION =
2 changes: 1 addition & 1 deletion boards/thingy91x_nrf9151_ns.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
CONFIG_BME680=n
CONFIG_BME68X_IAQ=y
CONFIG_BME68X_IAQ_THREAD_STACK_SIZE=2048
CONFIG_BME68X_IAQ_SAMPLE_RATE_ULTRA_LOW_POWER=y
CONFIG_BME68X_IAQ_SAMPLE_RATE_LOW_POWER=y
9 changes: 9 additions & 0 deletions boards/thingy91x_nrf9151_ns.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
sw1 = &button0;
};

pwmleds {
/* workaround error in upstream board definition that swapped blue and green */
pwm_led1: pwm_led_1 {
pwms = <&pwm0 2 PWM_MSEC(8) PWM_POLARITY_NORMAL>;
};
pwm_led2: pwm_led_2 {
pwms = <&pwm0 1 PWM_MSEC(8) PWM_POLARITY_NORMAL>;
};
};
};

&bme680 {
Expand Down
Loading
Loading