This gist is intended to help you deal with the following error conditions:
Error: appkey is incorrect 'er_invalid_appkeyError: unknown error 'Request is not encrypted'- nil pointer exceptions while fetching battery information
- missing device_type arguments
This gist has a number of parts which, because of the way in which this gist has grown over time, are not necessarily in a logical order.