Poor-Man’s Control System

Ping

import ouimeaux.environment# Setup UPnP server and listen for devices
env = ouimeaux.environment.Environment()
env.start()
env.discover()
# Make sure we found the switch
if 'SteamControl' not in env.devices:
print(env.list_switches())
raise ValueError("Unable to discover control system.")
# Now we have access to our control
control = env.get_switch('SteamControl')

Basic Insight

# We have access to some metadata around electricity usage
print("current_power = " + str(control.current_power))
print("today_kwh = " + str(control.today_kwh))
print("today_on_time = " + str(control.today_on_time))

Big Picture

--

--

--

Manage Developer Relations @Dolby; Maker at Robot Garden; Previously HERE, GE, Rackspace, DreamWorks Animation, MathWorks, Carnegie Mellon

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

macOS big sur !! installation stuck ?

Written before the test, About Akash Testnet

How to waste time and abuse Google Sheets for personal amusement

Make your tests work for you, and not the other way around

Implementation of the 4 Pillars of OOP in Python and Java

Three Major Cloud Platforms

Postmortem Report

What I Gained After 1 Year of #100DaysOfCode

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jayson DeLancey

Jayson DeLancey

Manage Developer Relations @Dolby; Maker at Robot Garden; Previously HERE, GE, Rackspace, DreamWorks Animation, MathWorks, Carnegie Mellon

More from Medium

Blockless Interviews: Butian Li

MongoDB | The most popular NoSQL database

‘C’ Dynamic Library

How to Subtitle a Video Automatically