Example #1
0
import select
import time

from pytomation.interfaces import Serial, W800rf32, InsteonPLM, Wtdio, NamedPipe, \
                                StateInterface, Command, HTTPServer
from pytomation.devices import Motion, Door, Light, Location, InterfaceDevice, Room, \
                                Photocell, Generic, StateDevice, State, Attribute


###################### INTERFACE CONFIG #########################
web = HTTPServer()

insteon = InsteonPLM(Serial('/dev/ttyR2', 19200, xonxoff=False))
wtdio = Wtdio(Serial('/dev/mh_weeder_port', 9600))
w800 = W800rf32(Serial('/dev/mh_w800_port', 4800, xonxoff=False))

# Set the I/O points as inputs on the wtdio board, these are all set as inputs
wtdio.setChannel('ASA')
wtdio.setChannel('ASB')
wtdio.setChannel('ASC')
wtdio.setChannel('ASD')
wtdio.setChannel('ASE')
wtdio.setChannel('ASF')
wtdio.setChannel('ASG')

#wtdio.dio_invert('G')

###################### DEVICE CONFIG #########################

# ______ REMOTES ____________________________________________________
Example #2
0
 def setUp(self):
     self.ms = Mock_Interface()
     self.insteon = InsteonPLM(self.ms)