added quantity error  checking from json and compared to registered device