Added Device state detection

Keeping version info