rename to hass-workstation-service and add readme

pull/9/head
sleevezipper 3 years ago
parent 65fb3c7d20
commit 9a7cb2f0b3

@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace hass_desktop_service.Communication
namespace hass_workstation_service.Communication
{
public class AutoDiscoveryConfigModel
{

@ -2,13 +2,13 @@ using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using hass_desktop_service.Communication.Util;
using hass_workstation_service.Communication.Util;
using Microsoft.Extensions.Logging;
using MQTTnet;
using MQTTnet.Client;
using MQTTnet.Client.Options;
namespace hass_desktop_service.Communication
namespace hass_workstation_service.Communication
{
public class MqttPublisher

@ -1,6 +1,6 @@
using System.Text.Json;
namespace hass_desktop_service.Communication.Util
namespace hass_workstation_service.Communication.Util
{
public class CamelCaseJsonNamingpolicy : JsonNamingPolicy
{

@ -1,6 +1,6 @@
using System;
namespace hass_desktop_service.Data
namespace hass_workstation_service.Data
{
public class ConfiguredSensor
{

@ -3,11 +3,11 @@ using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Text.Json;
using hass_desktop_service.Communication;
using hass_desktop_service.Domain.Sensors;
using hass_workstation_service.Communication;
using hass_workstation_service.Domain.Sensors;
using Microsoft.Extensions.Configuration;
namespace hass_desktop_service.Data
namespace hass_workstation_service.Data
{
public class ConfiguredSensorsService
{

@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using hass_desktop_service.Domain.Sensors;
using hass_workstation_service.Domain.Sensors;
namespace hass_desktop_service.Domain
namespace hass_workstation_service.Domain
{
public abstract class Device
{

@ -1,10 +1,13 @@
using System;
using System.Threading.Tasks;
using hass_desktop_service.Communication;
using hass_workstation_service.Communication;
using MQTTnet;
namespace hass_desktop_service.Domain.Sensors
namespace hass_workstation_service.Domain.Sensors
{
/// <summary>
/// This
/// </summary>
public abstract class AbstractSensor
{
public Guid Id { get; protected set; }

@ -1,9 +1,9 @@
using System;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using hass_desktop_service.Communication;
using hass_workstation_service.Communication;
namespace hass_desktop_service.Domain.Sensors
namespace hass_workstation_service.Domain.Sensors
{
public class UserNotificationStateSensor : AbstractSensor
{

@ -2,12 +2,12 @@ using System;
using System.Runtime.InteropServices;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using hass_desktop_service.Communication;
using hass_workstation_service.Communication;
using Microsoft.Extensions.Configuration;
using MQTTnet.Client.Options;
using hass_desktop_service.Data;
using hass_workstation_service.Data;
namespace hass_desktop_service
namespace hass_workstation_service
{
public class Program
{

@ -1,6 +1,6 @@
{
"profiles": {
"hass_desktop_service": {
"hass_workstation_service": {
"commandName": "Project",
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"

@ -0,0 +1,14 @@
# HASS Workstation Service
This goal of this project is to provide useful sensors and services from your workstation to [Home Assistant](https://www.home-assistant.io/). It accomplishes this goal by:
- Running in the background as a service
- Being lightweight so you'll never notice it
- Using well defined standards
- Being local when you want it to, only communicating through your own MQTT broker
It will try to futher accomplish this goal in the future by:
- Being platform independent
- Being easy to configure
- Using secure communication

@ -3,14 +3,14 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using hass_desktop_service.Communication;
using hass_desktop_service.Data;
using hass_desktop_service.Domain.Sensors;
using hass_workstation_service.Communication;
using hass_workstation_service.Data;
using hass_workstation_service.Domain.Sensors;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using MQTTnet.Client;
namespace hass_desktop_service
namespace hass_workstation_service
{
public class Worker : BackgroundService
{

@ -10,10 +10,5 @@
"Host": "192.168.2.6",
"Username": "tester",
"Password": "tester"
},
"ConfiguredSensors": [
{"Type": "UserNotificationStateSensor", "Ïd": "17fec74e-5d82-4334-8d40-45cfa8449228", "Name": "Sensor1"},
{"Type": "UserNotificationStateSensor", "Ïd": "27fec74e-5d82-4334-8d40-45cfa8449228", "Name": "Sensor2"},
{"Type": "UserNotificationStateSensor", "Ïd": "37fec74e-5d82-4334-8d40-45cfa8449228", "Name": "Sensor3"}
]
}
}

@ -2,8 +2,8 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UserSecretsId>dotnet-hass_desktop_service-C65C2EBE-1977-4C24-AC6B-6921877E1390</UserSecretsId>
<RootNamespace>hass_desktop_service</RootNamespace>
<UserSecretsId>dotnet-hass_workstation_service-C65C2EBE-1977-4C24-AC6B-6921877E1390</UserSecretsId>
<RootNamespace>hass_workstation_service</RootNamespace>
</PropertyGroup>
<ItemGroup>
Loading…
Cancel
Save