Troubleshooting Guide

Error 500 Code While Retrieving Access Tokens or Making API Calls

An Error 500 code is issued after making an HTTP request when a total of 100 devices are connected to the space (applicable to Free/Trial versions). If this occurs, do the following to fix the issue:
  1. Revoke the access tokens issued earlier to reduce to the number of connected devices.
  2. Wait 24 hours for the tokens to expire before issuing new access tokens.

Serial Monitor Output is Displaying Random Symbols

One potential reason for this issue could be the Serial Monitor Speeds set in the code and PlatformIO configuration file are not aligned.
  1. Check that your Serial monitor speed in your code is the same value set in your platformio.ini file.
    Note: By default, the monitor speed is set to 9600 even if it is not defined in the file.
    Tip: Serial Monitor speed can be defined by the adding the following line:
    monitor_speed = 115200 //change to the value you want

Inconsistency in HTTP Response Status Codes

Your project may require you to make frequently repeated HTTP requests to the SmartWorks API to perform a certain function; however, if it is too frequent, the server may return a 404 (Not Found) error. Some solutions to this issue could be:
  1. Add a delay between requests
  2. Use ”try-except” in Python or ignore the error message until the requestsucceeds
Note: There are many other potential solutions regarding this issue.