Merge branch 'master' into develop

pull/90/head^2
Sleevezipper 3 years ago
commit ff38c67e3f

@ -19,6 +19,8 @@ It will try to futher accomplish this goal in the future by:
![The resulting sensors and commands in Home Assistant](https://i.imgur.com/jXRU2cu.png)
Not convinced yet? Check out [this excellent video](https://youtu.be/D5A7le79R5M) by GeekToolkit on YouTube.
## Installation
You can get the installer from [here](https://hassworkstationstorage.z6.web.core.windows.net/publish/setup.exe). When using the installer, the application checks for updates on startup. This is the recommended way to install for most users.
@ -161,13 +163,6 @@ This sensor returns the current session state. It has the following possible sta
This sensor returns the volume of the currently playing audio. So if you're listening to music and you pause, this sensor will return 0 (or at least a very low value).
|State|Explanation|
|---|---|
|Locked|All user sessions are locked.|
|LoggedOff|No users are logged in.|
|InUse|A user is currently logged in.|
|Unknown|Something went wrong while getting the status.|
### Dummy
This sensor spits out a random number every second. Useful for testing, maybe you'll find some other use for it.

@ -0,0 +1,33 @@
# Direct communication
Because this application communicates via MQTT, You can query sensor data directly from other compatible programs. This means you can use it outside of homeassistant, allowing for great flexibility, and this document is designed to simplify this process.
## MQTT topics
All of the sensors in this app follow a strict naming convention, and can be accessed using a simple formula:
```
homeassistant/ENTITY TYPE/PC NAME/SENSOR NAME/REQUEST TYPE
```
This means that you can substitute values into this formula to get the topic for any sensor, for example :
```
homeassistant/switch/mediaCenterPC/Shutdown/set
```
## Executing commands
By publishing a message containing `ON` to this example topic :
```
homeassistant/switch/mediaCenterPC/Shutdown/set
```
We can execute the shutdown command, and turn off the media center PC.
## Reading sensor data
Reading sensor data can be done by subscribing to an MQTT topic. For example, if I wanted to know the CPU load, i can subscribe to this topic :
```
homeassistant/sensor/DESKTOP-1/MediaCenterPC/State
```
## MQTT autodiscovery
If your application supports MQTT discovery, than you should be able to see your sensors added to your platform of choice automatically. When using home assistant, you should take care to rename your entities, as the MQTT integration does not integrate the device name into the entity name, and so using the default could potentially cause a collision with multiple devices.
Loading…
Cancel
Save