Clarified control_any_noreg.py by adding a MIHO005 example
1 parent e9ac4e8 commit 4b01055e530380b7d45a0d99210a1fb8739a580b
@David Whale David Whale authored on 29 May 2016
Showing 1 changed file
View
9
src/control_any_noreg.py
# control_any_noreg.py 17/03/2016 D.J.Whale
#
# Control up to 4 legacy green-button sockets (or MiHome control-only sockets)
# Shows how to address sockets directly without using the registry.
 
import time
import energenie
 
 
# A device that uses a custom house code (e.g. learnt from a hand controller)
socket5 = energenie.Devices.ENER002((0x1234, 1))
 
sockets = [all_sockets, socket1, socket2, socket3, socket4, socket5]
# A MiHome device that we know the address of from a previous capture
socket6 = energenie.Devices.MIHO005(0x68b)
 
sockets = [all_sockets, socket1, socket2, socket3, socket4, socket5, socket6]
 
 
def legacy_socket_loop():
"""Turn all sockets on or off every few seconds"""