added api for device

Conflicts:
	main.py