Skip to main content

Geotab SDK Notice: Removal of Device property

Genevieve-1051
Community Administrator
Original Poster

In version 5.7.2001 of the MyGeotab API there will be a breaking change to remove the Device property HardwareId. This will facilitate the decoupling of SerialNumber and HardwareId and is designed to cause the least inconvenience to existing integrations as possible.

As a result of decoupling the Hardware ID and serial number, it will no longer be possible to decode a given serial number to a corresponding hardware ID or encode a serial number by using the device type and hardware ID. This is something older versions of the NuGet package do implicitly when deserializing the device JSON to a device object, and it becomes a problem when an integration using an older NuGet package version receives a hardware ID from the server. 

Problems can occur if the client encodes the hardware ID to an incorrect serial number. This causes issues when trying to Set devices using the older NuGet package because it sends a different serial number than it receives. If a hardware ID is received by the API, it will be ignored and the serial number will be taken as the source of truth. 

In order to prevent breaking existing integrations using older versions of the NuGet package we must no longer return hardware ID in the device object JSON. For continuity, the 5.7.2001 NuGet package will retain its hardware ID property, though its value will always be null.

Removing hardware ID means many integrations using older NuGet packages will continue to function normally but integrations using hardware ID may be accessing a null or nonexistent hardware ID from the JSON payload. As a precaution you may need to adjust your integration in following ways:

  1. Do not encode or decode serial from/to hardware ID.
  2. Do not expect hardware ID to be present in JSON payload.
  3. If using an older NuGet package, do not use the hardware ID of the Device object. It may be incorrect.
Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

Hi Luis,

 

Hardware ID will be omitted from the JSON response.

The mypreview.geotab.com federation should be updated to 5.7.2001 late this week or early next week. This will allow you to do some testing soon.

 

Thanks,

 

Steve

2 Replies

Hi,

 

I saw this notice in MyAdmin and it's very detailed in the way it will affect .Net users of the Nuget, but in our case we use Javascript and our own wrappers in other languages. I'm concerned what will happen in the JSON-RPC calls themselves, not the .Net wrappers. Can you please confirm how a Get => Device call in 2001 will return each device in its JSON-RPC payload? Will hardwareId be omitted? Will it be null? Will it still be there but should not be relied upon? We are never setting it anywhere in our code, but we have 1 integration that needed serials to be numerical and so we used hardwareId to identify devices instead of the serialNumber. Wondering how we can mitigate.

Thanks!

Hi Luis,

 

Hardware ID will be omitted from the JSON response.

The mypreview.geotab.com federation should be updated to 5.7.2001 late this week or early next week. This will allow you to do some testing soon.

 

Thanks,

 

Steve

Still have questions?