Skip to content

lostmsu/Stack.Kasa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stack Widgets for Kasa smart devices

Example usage

  1. Add the following definitions to your layout:
xmlns:dataSources="clr-namespace:LostTech.Stack.Widgets.DataSources;assembly=LostTech.Stack.Widgets"
xmlns:kasa="clr-namespace:Stack.Kasa;assembly=Stack.Kasa"
  1. Create a sensor
<Grid.Resources>
  <kasa:KasaOutlet x:Key="PowerMeter"
                   HostOrIP="192.168.1.2"
                   dataSources:DataSource.RefreshInterval="0:0:5" />
</Grid.Resources>
  1. Bind a TextBlock
<TextBlock Text="{Binding Power, Source={StaticResource PowerMeter}, Mode=OneWay, StringFormat={}{0:0}W}"
           Background="White" Padding="7,3" />
  1. Build the project and copy the following files to the CustomWidgets folder (it should be next to your Layouts folder): Stack.Kasa.dll, Newtonsoft.Json.dll, slf4net.dll, and Kasa.dll.

  2. Restart Stack and load the updated layout.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages