https://github.com/jimm98y/egonapi
Client to control the ABB Ego-n smart home system
https://github.com/jimm98y/egonapi
abb ego-n netstandard smarthome
Last synced: about 1 year ago
JSON representation
Client to control the ABB Ego-n smart home system
- Host: GitHub
- URL: https://github.com/jimm98y/egonapi
- Owner: jimm98y
- License: mit
- Created: 2023-02-04T15:01:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T23:30:23.000Z (about 3 years ago)
- Last Synced: 2025-02-09T21:30:55.214Z (over 1 year ago)
- Topics: abb, ego-n, netstandard, smarthome
- Language: C#
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EgonAPI
Client to control the ABB Ego-n smart home system. The client communicates directly with the web module over HTTP.
## Discover
Call `DiscoverAsync` to get the web module description:
```cs
EgonDescription discovery = await EgonClient.DiscoverAsync("192.168.1.255");
```
## EgonClient
Create the client:
```cs
var egonClient = new EgonClient(discovery, "admin", "123456789");
```
Retrive all devices and groups from the configuration:
```cs
var egonConfig = await egonClient.GetConfigurationAsync();
```
Query the current state of all devices (polling):
```cs
var updated = await egonClient.GetCurrentStateAsync(egonConfig);
```
## Control devices
To turn on the first device:
```cs
await egonClient.ExecuteActionAsync(egonConfig.Devices.First().Value.Id, EgonActions.On);
```