Exemple #1
0
	def POST(self):
		try:
			button_on = web.input().submit_on
			switch_low(int(button_on))
			# return button_on
		except:
			pass

		try:
			button_off = web.input().submit_off
			switch_high(int(button_off))
			# return button_off
		except:
			pass
			
		# [vol up]
		try:
			volup = web.input().volup
			ext_funcs.volume_controls("+")
			web.seeother("/")
		except:
			pass

		# [vol down]
		try:
			voldown = web.input().voldown
			ext_funcs.volume_controls("-")
			web.seeother("/")
		except:
			pass

		# [mute]
		try:
			mute = web.input().mute
			ext_funcs.volume_controls("toggle")
			web.seeother("/")
		except:
			pass

		# [xbee switch on]
		try: 
			light_button_on = web.input().light_button_on
			toggle_lights.set_state(str(light_button_on), "off")
			# return light_button_on
			# web.seeother('/')
			# return light_button_on
		except Exception, e:
			# return e
			pass
Exemple #2
0
	def POST(self):
		try:
			button_on = web.input().submit_on
			switch_low(button_on)
		except:
			pass

		try:
			button_off = web.input().submit_off
			switch_high(button_off)
		except:
			pass
			
		# [vol up]
		try:
			volup = web.input().volup
			ext_funcs.volume_controls("+")
			web.seeother("/")
		except:
			pass

		# [vol down]
		try:
			voldown = web.input().voldown
			ext_funcs.volume_controls("-")
			web.seeother("/")
		except:
			pass

		# [mute]
		try:
			mute = web.input().mute
			ext_funcs.volume_controls("toggle")
			web.seeother("/")
		except:
			pass

		return web.seeother('/')
Exemple #3
0
		except Exception, e:
			print e

		# [stop]
		try:
			station_stop = web.input().stop
			stop_command = "mpc stop"
			proc = Popen(stop_command,shell=True, stdout=PIPE)
			web.seeother("/")
		except:
			pass

		# [vol up]
		try:
			volup = web.input().volup
			ext_funcs.volume_controls("+")
			web.seeother("/")
		except:
			pass

		# [vol down]
		try:
			voldown = web.input().voldown
			ext_funcs.volume_controls("-")
			web.seeother("/")
		except:
			pass

		# [mute]
		try:
			mute = web.input().mute