Skip to content

A simple API to provide access to mihome gosund outlet.

Notifications You must be signed in to change notification settings

MTAwsl/Mihome-Gosund-Plug-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mihome-Gosund-Plug-API

This repository contains basic library file to implement controls(on/off) of Mihome Gosund Plugs.

Usage

First install required dependencies using

pip install -r requirements.txt

Copy gosund_plug.py and miio.py to your working directory.

Import GosundPlug class and you are ready to go :)

Example:

from gosund_plug import GosundPlug

usage = GosundPlug("YOUR IP ADDRESS", "YOUR TOKEN'S HERE")
example = GosundPlug("192.168.1.233", "ffffffffffffffffffffffffffffffff")

print(example.status()) # Returns a boolean which value is True when it's on and False when it's off

example.on() # Switch on
example.off() # Switch off

Credits

Miio protocal: https://github.com/OpenMiHome/mihome-binary-protocol

Gosund Plug control: https://github.com/rytilahti/python-miio/blob/miot_basics/miio/gosund_plug.py

About

A simple API to provide access to mihome gosund outlet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages