Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JKamsker committed Mar 22, 2024
1 parent 8b6e711 commit 4ff1cb8
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 8 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Jonas Kamsker

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
76 changes: 76 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!-- Enhance readme:
For github.
Tool is for extracting data from XSense sensors (currently only for Temperature and Humidity sensors). -->

# XSenseExtractor

`XSenseExtractor` is a .NET Tool to extract data from XSense sensors. It provides a command-line interface to interact with the XSense system, allowing you to retrieve data from the sensors and display it in human and machine-readable formats.


## Installation and Usage

`XSenseExtractor` can be easily installed and updated as a .NET Global Tool, allowing you to run it from anywhere on your system. Below are the instructions for installation, updating, and basic usage.

### Prerequisites

- .NET 8: Make sure you have the .NET 8 installed on your machine. You can download it from [the official .NET website](https://dot.net/download).

### Installing XSenseExtractor

To install `XSenseExtractor` as a global tool, open your terminal and run the following command:

```shell
dotnet tool install --global XSense-Extractor
```

This command will download and install the latest version of `XSenseExtractor`, making it globally available from the command line.

### Updating XSenseExtractor

If you already have `XSenseExtractor` installed and want to update it to the latest version, use the following command:

```shell
dotnet tool update XSense-Extractor -g
```

This will check for the latest version of the tool and update it accordingly.

## Usage

### Login

Authenticate a user with a username and password.

```shell
xsense login --username <USERNAME> --password <PASSWORD>
```
### List Stations

Display all stations and their devices.

```shell
xsense stations
```

### Monitor Live Data

Monitor real-time data from a specific station.

```shell
xsense monitor --stationId <STATION_ID> [--houseId <HOUSE_ID>]
```

### Retrieve Historical Data

Get historical data for a station or device within a date range.

```shell
xsense history --stationId <STATION_ID> [--houseId <HOUSE_ID>] [--deviceId <DEVICE_ID>] --from <START_DATE> --to <END_DATE>
```

##

</br>
<p align="center">
Made with <span style="color: #e25555;">&hearts;</span> in Austria <img src="https://images.emojiterra.com/google/noto-emoji/v2.034/128px/1f1e6-1f1f9.png" width="20" height="20"/>
</p>
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

using System.Globalization;
using System.Text;

using XSenseExtractor;
using XSenseExtractor.Models.Aggregates;
using XSenseExtractor.Models.Init;

using static System.Collections.Specialized.BitVector32;

namespace XSenseExtractor.Cli;
namespace Commands;

internal class GetHistoryCommand : AsyncCommand<GetHistoryCommand.Settings>
{
Expand Down Expand Up @@ -241,8 +241,8 @@ LiveMetricsDataPoint dataPoint
) : this(house, station, device, dataPoint.Time, dataPoint.Temperature, dataPoint.Humidity
)
{
this.House = house;
this.Station = station;
this.Device = device;
House = house;
Station = station;
Device = device;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Spectre.Console;
using Spectre.Console.Cli;
using XSenseExtractor;

namespace XSenseExtractor.Cli;
namespace Commands;

// Lists stations and houses
internal class GetStationsCommand : AsyncCommand
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Spectre.Console;
using Spectre.Console.Cli;

using XSenseExtractor;
using XSenseExtractor.Models.Init;

namespace XSenseExtractor.Cli;
namespace Commands;

internal class MonitorLiveDataCommand : AsyncCommand<MonitorLiveDataCommand.Settings>
{
Expand Down

0 comments on commit 4ff1cb8

Please sign in to comment.