Debugging

Debugging#

In some cases, the adapter system may produce errors due to incorrect configuration, genuine fault with the adapter or issue with the equipment. If configuration errors occur, they will be displayed during initialisation, and the program will exit. All of these errors are “AdapterBuildError” errors. These error codes and names are expanded below.

  • “device.json not found for adapter at …”: The adapter chosen doesn’t have attached metadata, i.e. device.json in the directory.

  • “adapter_id’ not found in …”: The device.json is present but doesn’t have an adapter_id.

  • “Adapter for code … not found.”: An adapter adapter_id wasn’t found with the same code as provided in the configuration file.

  • “Missing instance ID.”: The configuration file provided doesn’t have an instance ID.

  • “Missing required keys for …”: The required parameters for an adapter haven’t been provided in full. If an error ocurrs during monitoring (usual running of the adapter), the adapter will continue running and attempt to adapt given the type of error. The types of errors are explained below.

  • InputError: Either the hardware is down, or the input mechanism cannot access the information it should be able to.

  • HardwareStalledError: The hardware appears to have stopped transmitting information.

  • ClientUnreachableError: The client OR output mechanism can’t post information. For example, the MQTT broker can’t be transmitted to.

  • AdapterLogicError: Logic within how the adapter has been built causes an error.

  • InterpreterError: The adapter interpreter has some faults that cannot be identified without knowledge of the adapter’s specifics.