Ejemplo n.º 1
0
#! /usr/bin/env python
#coding=utf-8

from miio import chuangmi_plug
#from yeelight import discover_bulbs
import time

#print discover_bulbs()
plug = chuangmi_plug.ChuangmiPlug("192.168.43.30",
                                  '5339aae5464ac87cdf5686ab0d8f75ce')

while 1:
    print("IN LOOP!")
    plug.on()
    time.sleep(2)
    plug.off()
    time.sleep(2)
Ejemplo n.º 2
0
#!/home/ross/rossgit/loadcellflask/venv/bin/python3

from miio import chuangmi_plug
from config import CFG

IP = CFG.IP
TOK = CFG.TOK 

cP = chuangmi_plug.ChuangmiPlug(ip=IP, token=TOK, start_id=0, debug=0, lazy_discover=True, model='chuangmi.plug.m1')
print(cP.status())


Ejemplo n.º 3
0
#! /usr/bin/env python
#coding=utf-8

from miio import chuangmi_plug
#from yeelight import discover_bulbs
import time

#print discover_bulbs()
plug = chuangmi_plug.ChuangmiPlug("192.168.28.229",
                                  'ede445d92432153996ae77bd7c3a1d5c')

while 1:
    print("IN LOOP!")
    #plug.on()
    #time.sleep(2)
    plug.off()
    time.sleep(1)
    plug.off()
Ejemplo n.º 4
0
#! /usr/bin/env python
#coding=utf-8

from miio import chuangmi_plug
#from yeelight import discover_bulbs
import time

#print discover_bulbs()
ip = '192.168.28.114'
token = '7bebc798739c7e2640ffe4cc6568f8d3'

plug = chuangmi_plug.ChuangmiPlug(ip, token)

for i in range(5):
    print("IN LOOP!")
    plug.on()
    time.sleep(2)
    plug.off()
    time.sleep(2)