diff --git a/src/gyro.cpp b/src/gyro.cpp index a6f8155..d11f208 100644 --- a/src/gyro.cpp +++ b/src/gyro.cpp @@ -248,7 +248,7 @@ bool GyroSensor::read() { _validValue = true; _angle = calculateAngle(_lastGyroData); #if !defined(GYRO_DISABLE_LOGGING) - Log.notice(F("GYRO: Sensor values %d,%d,%d\t%F" CR), _lastGyroData.ax, + Log.verbose(F("GYRO: Sensor values %d,%d,%d\t%F" CR), _lastGyroData.ax, _lastGyroData.ay, _lastGyroData.az, _angle); #endif } diff --git a/src_docs/source/api.rst b/src_docs/source/api.rst index 68b04eb..d0b6d36 100644 --- a/src_docs/source/api.rst +++ b/src_docs/source/api.rst @@ -128,6 +128,18 @@ Retrive the data used for formula calculation data via an HTTP GET command. Payl } +GET: /api/factory +================ + +Will do a reset to factory defaults and delete all data except wifi settings. + +For this to work you will need to supply the device id as a parameter in the request: + +:: + + http://mygravity.local/api/factory?id= + + POST: /api/config/device ======================== diff --git a/src_docs/source/releases.rst b/src_docs/source/releases.rst index 8617b35..58b741e 100644 --- a/src_docs/source/releases.rst +++ b/src_docs/source/releases.rst @@ -7,10 +7,12 @@ v0.8.0 ------ * Added option to set http headers (2 per http endpoint), these can be used for - other formats and authentication with services. + other http formats than json (default) and for adding authentication headers. * Added possibility to view last 10 errors on device page. * Added possibility to define token parameter used in iSpindle format. * Added instructions for how to configure integration with Brewspy +* Added instructions for how to configure integration with Thingspeak +* Added option to do a factory reset via API. * Logging the runtime, how long a measurement take (last 10 are stored). This can be used to check how good the wifi connection is and estimate the lifetime when on battery. Check the device page in the UI for this information. diff --git a/src_docs/source/services.rst b/src_docs/source/services.rst index 6805a9f..c8f11ff 100644 --- a/src_docs/source/services.rst +++ b/src_docs/source/services.rst @@ -162,8 +162,36 @@ Brewspy BrewSpy is a service that can show the history and manage the brew. -You need to enter the Token found in brewspy into the UI under Token and enter the following URL under http. +You need to enter the Token found in brewspy. The field is found under the field for http configuration. .. code-block:: http://brew-spy.com/api/ispindel + + +Thingspeak +++++++++++ + +Thingspeak is an IoT platform for receiving data which can be visualized. + +In order to use this platform you need to create a channel (channel = device) and get the APIKEY for +writing to the channel. Each channel can handle up to 8 measurements. In the http field enter the following URL. + +.. code-block:: + + http://api.thingspeak.com/update.json + + +You also need to create a custom format for the selected endpoint where the field1-field8 contains the data +you want to include. The example below sends 5 different values to the channel identified by the API key. + +.. code-block:: + + { + "api_key": "", + "field1": ${gravity}, + "field2": ${temp}, + "field3": ${angle}, + "field4": ${battery}, + "field5": ${rssi} + }