diff --git a/Docs/images/nucucar_android.png b/Docs/images/nucucar_android.png new file mode 100644 index 0000000..8017c61 Binary files /dev/null and b/Docs/images/nucucar_android.png differ diff --git a/NucuCar.Domain/Readme.md b/NucuCar.Domain/Readme.md index efcabd8..42b6797 100644 --- a/NucuCar.Domain/Readme.md +++ b/NucuCar.Domain/Readme.md @@ -1,4 +1,4 @@ -## Protos +# Protos The files from Protos are compiled by the gRPC compiler and provide data structures that are shared across the project. \ No newline at end of file diff --git a/NucuCar.Sensors/Readme.md b/NucuCar.Sensors/Readme.md index 46ecf79..f519e7f 100644 --- a/NucuCar.Sensors/Readme.md +++ b/NucuCar.Sensors/Readme.md @@ -11,16 +11,48 @@ _You may download the Fritzing diagrams from `Docs/fritzing/` in order to play w Wire your sensor according to the following diagram: -![alt text](../Docs/images/nucucar.sensors_bb.jpg) - +![raspberry pi wiring diagram](../Docs/images/nucucar.sensors_bb.jpg) #### BME680 -Connect the BME680 sensor to the I2C bus 1 (I2C.1) of the Raspberry Pi. +Connect the BME680 sensor to the I2C bus 1 (I2C.1) of the Raspberry Pi. The address ` 0x76` will be used to communicate with the sensor. Make sure I2C is enabled. Use `raspi-config`. +# Configuration + +Each Sensor is configured via the `appsettings.json` file. The following configuration options are +available to all sensors: + +- Enabled: (bool) Enables or disables the sensor. +- Telemetry: (bool) Enables or disables telemetry reporting for the sensor. +- Grpc: (bool): Enables or disables the gRPC endpoint for the sensor. +- MeasurementInterval: (int) The interval in milliseconds in which the sensor will read data. Default: 3000 + +--- +Besides sensor configuration, you may also configure the telemetry service. The telemetry service collects telemetry data from all sensors +and uses a telemetry publisher to publish the data. + +Example config: +``` +{ + "Telemetry": { + "Publisher": "Disk", + "ServiceEnabled": true, + "PublishInterval": 3000, + "ConnectionString": "FileName=nucucar.telemetry;FileExtension=txt;Separator=\n" + }, + "EnvironmentSensor": { + "Enabled": true, + "Telemetry": true, + "Grpc": true + }, +} +``` + +--- + # Sensors #### Environment Sensor diff --git a/NucuCar.Telemetry/Readme.md b/NucuCar.Telemetry/Readme.md index 6a24248..c10553e 100644 --- a/NucuCar.Telemetry/Readme.md +++ b/NucuCar.Telemetry/Readme.md @@ -1,12 +1,26 @@ -## Telemetry +# Telemetry -It provides useful classes and abstractions for implementing telemetry -in individual components. All telemetry publishers use the MQTT protocol unless specified -otherwise. +This package provides useful classes and abstractions for implementing telemetry +in individual components. -### Azure Telemetry +The telemetry service is used by other packages in order to implement telemetry reporting. It may be configured via the `appsettings.json` file or environment variables. -#### Publisher +# Configuration + +The following configurations is available for the Telemetry service: + +- Publisher: (string) The telemetry publisher. i.e: `Azure`, `Disk`, `Firestore`, `Console`. +- ServiceEnabled: (bool) Enables or disables the telemetry collection service. +- PublishInterval: (int) The interval in which to publish the telemetry data. +- ConnectionString: (string) Connection string for the telemetry publisher. + +# Telemetry Publishers + +Telemetry publishers are used by the telemetry service in order to publish data. + +## Azure Telemetry + +### Publisher You can use cloud telemetry for free via Azure-IoT-Hub. You still need a backend application that will process the messages. @@ -26,7 +40,7 @@ dotnet run --Telemetry:ConnectionString=CONNECTION_STRING export Telemetry:ConnectionString=CONNECTION_STRING ``` -The Telemetry:Publisher must be set to: Azure +The `Telemetry:Publisher` must be set to: Azure You may also use the format from above to override any settings in appsettings.json. @@ -37,16 +51,16 @@ Azure's IoT Hub Build-In Endpoints setting. --- -### Disk Telemetry +## Disk Telemetry -#### Publisher +### Publisher Publishes telemetry on the disk. Example connection string: `Filename=telemetry;FileExtension=csv;Separator=,;BufferSize=4096` -The Telemetry:Publisher must be set to: Disk +The `Telemetry:Publisher` must be set to: Disk See the source code for comments on the ConnectionString. @@ -56,13 +70,13 @@ You will need to parse the file by yourself. --- -### Firebase Firestore Database +## Firebase Firestore Database -#### Publisher +### Publisher Publishes telemetry on the firestore. -The Telemetry:Publisher must be set to: Firestore +The `Telemetry:Publisher` must be set to: Firestore Example connection string: `ProjectId=nucuhub;CollectionName=sensors-telemetry-test;Timeout=1000` diff --git a/NucuHub.Android/Readme.md b/NucuHub.Android/Readme.md new file mode 100644 index 0000000..8ac9ad6 --- /dev/null +++ b/NucuHub.Android/Readme.md @@ -0,0 +1,7 @@ +# Introduction + +This package holds the code for the NucuCar.Android companion application. + +The purpose of the application is to allow the user to interact with the NucuCar system via the mobile phone. + +![android application image](../Docs/images/nucucar_android.png) \ No newline at end of file diff --git a/Readme.md b/Readme.md index 6157d39..3f1963a 100644 --- a/Readme.md +++ b/Readme.md @@ -25,8 +25,6 @@ To build this project you will need to install .Net Core 3.1 and Android Studio. To run this project on the Raspberry Pi you will need dotnet core 3.1. installed. - - ## Building The following script provides instructions on how to build the whole project and deploy the NucuCar.Sensors module on the Raspberry Pi.