HomagGroup.HomagConnect.MmrMobile.Client
1.0.0
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package HomagGroup.HomagConnect.MmrMobile.Client --version 1.0.0
NuGet\Install-Package HomagGroup.HomagConnect.MmrMobile.Client -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HomagGroup.HomagConnect.MmrMobile.Client" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HomagGroup.HomagConnect.MmrMobile.Client --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HomagGroup.HomagConnect.MmrMobile.Client, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HomagGroup.HomagConnect.MmrMobile.Client as a Cake Addin #addin nuget:?package=HomagGroup.HomagConnect.MmrMobile.Client&version=1.0.0 // Install HomagGroup.HomagConnect.MmrMobile.Client as a Cake Tool #tool nuget:?package=HomagGroup.HomagConnect.MmrMobile.Client&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
HOMAG MMR Mobile Client
HOMAG Connect MMR Mobile gives you direct access to your machine data (counters, states) from MMR Mobile. You can then conveniently integrate this into your applications. To help you get started, we have prepared a few examples that you can find below.
Version history
Version | Date | Comment |
---|---|---|
1.0.0 | 07.09.2023 | First Draft |
Content table
Authorization
TL;DR
mkdir test-homag-connect-mmr-client
dotnet new console
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
dotnet add package HomagGroup.HomagConnect.MmrMobile.Client
using System.Net.Http.Headers;
using System.Text;
using HomagConnect.MmrMobile.Client.Services;
Console.WriteLine("Hello at the HOMAG MMR Mobile Client");
var client = new HttpClient();
client.BaseAddress = new Uri("https://connect.homag.cloud");
Console.WriteLine("Please insert your subscription Id:");
var subscriptionId = Console.ReadLine();
Console.WriteLine("Please insert your token:");
var token = Console.ReadLine();
var credentials = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{subscriptionId}:{token}"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);
var states = await mmrMobileService.GetStateData(subscriptionId);
var counters = await mmrMobileService.GetCounterData(subscriptionId);
Console.WriteLine($"You got {states.Count()} states and {counters.Count()} counter for the last 14 days")
dotnet run
Homag Connect MMR Mobile interface overview
Name | Method | API | Usage |
---|---|---|---|
GetStateData | GET | api/{subscriptionId}/mmr/ <br/>states?from={from}&to={to} <br/>&machineNumber={machineNumber} <br/>&instanceId={instanceId} <br/>&machineType={machineType} <br/>&stateId={stateId} <br/>&detailedStateId={detailedStateId} |
Returns all state data for the asked time window (default: 14 days) for all machines assigned to the subscription, if not asked specifically. |
GetCounterData | GET | api/{subscriptionId}/mmr/ <br/>counter?from={from}&to={to} <br/>&machineNumber={machineNumber} <br/>&instanceId={instanceId} <br/>&machineType={machineType} <br/>&counterId={counterId} |
Returns all counter data for the asked time window (default: 14 days) for all machines assigned to the subscription, if not asked specifically. |
Details
GetStateData
Input
Parameter | Type | Description |
---|---|---|
subscriptionId (Required) | string | The id of the subscription |
from (Optional) | DateTime | DateTime that the search should start from |
to (Optional) | DateTime | DateTime that the search should end |
machineNumber (Optional) | string | Number of the machine (Format: x-xxx-xx-xxxx) |
instanceId (Optional) | string | The id of the instance |
machineType (Optional) | string | Type of machine |
stateId (Optional) | string | Id of the state |
detailedStateId (Optional) | string | Id of the detailed state |
Output
Property | Type | Description |
---|---|---|
Machine Number | string | Number of the machine |
Machine Name | string | Name of the machine |
Machine Type | string | Type of machine |
Timestamp | DateTime | Day when the data was gathered |
Duration [h] | double | Time that the machine spent in the state in hours |
Instance Id | string | Id of the instance |
Detailed State Id | string | Id of the detailed state |
Detailed State | string | Detailed state translated into the requested language |
State Id | string | Id of the state |
State | string | State translated into the requested language |
Example
Request
GET /api/{someSubscriptionId}/mmr/states
api-version: 2023-09-05
Accept-Language: de-DE
Authorization: Basic NjU1MDFEMDktMkJCOS00M0MyLUI5RDMtMUZCMDAwNkE3NjlFOnNkMDlzaGR1Z985OGffc2ZkZ3pz32Y5ZGhzYWZkaHNmZN92ODlwYmZkOXZiaGFmZGd2
tracestate: someinternaltracedata
Response (200 OK)
Content-Type: application/json; charset=utf-8
[
{
"Machine Number": "0-242-92-1234",
"Machine Name": "Some Machine | 0-242-92-1234",
"Machine Type": "CNC",
"Timestamp": "2022-09-27T00:00:00",
"Duration [h]": 4.348055555555556,
"Instance Id": "M1-C1",
"Detailed State Id": "S_OMU_MODE1",
"Detailed State": "Hauptnutzung Tisch links",
"State Id": "s_mainusage",
"State": "Hauptnutzung"
}
]
GetCounterData
Input
Parameter | Type | Description |
---|---|---|
subscriptionId (Required) | string | The id of the subscription |
from (Optional) | DateTime | DateTime that the search should start from |
to (Optional) | DateTime | DateTime that the search should end |
machineNumber (Optional) | string | Number of the machine (Format: x-xxx-xx-xxxx) |
instanceId (Optional) | string | The id of the instance |
machineType (Optional) | string | Type of machine |
counterId (Optional) | string | Id of the counter |
Output
Property | Type | Description |
---|---|---|
Machine Number | string | Number of the machine |
Machine Name | string | Name of the machine |
Machine Type | string | Type of machine |
Timestamp | DateTime | Day when the data was gathered |
Value | double | Output value |
Instance Id | string | Id of the instance |
Counter Id | string | Id of the counter |
Counter | string | Counter translated into the requested language |
Example
Request
GET /api/{someSubscriptionId}/mmr/counters
api-version: 2023-09-05
Accept-Language: de-DE
Authorization: Basic NjU1MDFEMDktMkJCOS00M0MyLUI5RDMtMUZCMDAwNkE3NjlFOnNkMDlzaGR1Z985OGffc2ZkZ3pz32Y5ZGhzYWZkaHNmZN92ODlwYmZkOXZiaGFmZGd2
tracestate: someinternaltracedata
Response (200 OK)
Content-Type: application/json; charset=utf-8
[
{
"Machine Number": "0-242-92-1234",
"Machine Name": "Some Machine | 0-242-92-1234",
"Machine Type": "CNC",
"Timestamp": "2022-09-05T00:00:00",
"Value": 62.0,
"Instance Id": "M1-C1",
"Counter Id": "S_OUT_CyclesAll",
"Counter": "Ausbringung Zyklen"
}
]
Contribute
If you find anything, feel free to contribute to this repository. We are happy for every improvement ❤️.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- HomagGroup.HomagConnect.Base (>= 1.0.0)
- Microsoft.AspNetCore.Mvc.Formatters.Json (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.