Exemplo n.º 1
0
class NuimoOnkyo(Nuimo):
            
    def __init__(self, macAddress):
        Nuimo.__init__(self, macAddress)
        self.onkyo = Onkyo()
        
        print("Onkyo Host: %s" % self.onkyo.Host)
        print("Onkyo power state is %s" % self.onkyo.PowerState())
        print("Onkyo volume level is %s" % self.onkyo.VolumeLevel())
        
    
    def fly(self, flyValue):
        print(flyValue)
        
    def swipe(self, swipeValue):
        print(swipeValue)
        
    def rotate(self, rotateValue):
        print(int(rotateValue))
        self.onkyo.rotateVolume(rotateValue)
        
    def button(self, buttonValue):
        if buttonValue == 0:
            # check power state of Onkyo
            print("Button pressed. Onkyo PowerState is %s" % self.onkyo.PowerState())
            self.onkyo.TogglePower()

    def getNuimoBatteryLevel(self):
        return
Exemplo n.º 2
0
 def __init__(self, macAddress):
     Nuimo.__init__(self, macAddress)
     self.onkyo = Onkyo()
     
     print("Onkyo Host: %s" % self.onkyo.Host)
     print("Onkyo power state is %s" % self.onkyo.PowerState())
     print("Onkyo volume level is %s" % self.onkyo.VolumeLevel())