Skip to content

Instantly share code, notes, and snippets.

@julemand101
Created July 26, 2022 14:42
Show Gist options
  • Save julemand101/686caa450ed6868287076470a595e48f to your computer and use it in GitHub Desktop.
Save julemand101/686caa450ed6868287076470a595e48f to your computer and use it in GitHub Desktop.
import 'dart:convert';
void main() {
deviceFromJson(jsonString);
}
Device deviceFromJson(String str) => Device.fromJson(json.decode(str));
class Device {
Device({
required this.mode,
required this.device,
});
String mode;
DeviceClass device;
factory Device.fromJson(Map<String, dynamic> json) => Device(
mode: json["mode"],
device: DeviceClass.fromJson(json["device"]),
);
}
class DeviceClass {
DeviceClass({
required this.deviceId,
required this.publicId,
required this.companyId,
required this.company,
required this.label,
required this.mobileProviderId,
required this.mobileProvider,
required this.hologramDeviceId,
required this.hologramLinkId,
required this.firmwareVersionId,
required this.version,
required this.formattedVersion,
required this.deviceTypeId,
required this.deviceType,
required this.ipAddress,
required this.recordInterval,
required this.uploadInterval,
required this.powerMode,
required this.connectivity,
required this.connectivityClass,
required this.usersLastRecordDate,
required this.gmtLastRecordDate,
required this.battery,
required this.batteryPercentage,
required this.batteryClass,
required this.batteryIcon,
required this.signalQuality,
required this.signalQualityClass,
required this.signalQualityText,
required this.signalQualityIcon,
required this.queuedRecords,
required this.command,
required this.status,
required this.statusClass,
required this.purchaseDate,
required this.warrantyPeriod,
required this.warrantyExpires,
required this.warrantyStatus,
required this.temperatureClass,
required this.temperatureMetric,
required this.temperatureImperial,
required this.surgeProtection,
required this.totalProducts,
this.temperatureLowThreshold,
this.temperatureHighThreshold,
this.notes,
this.importId,
required this.deleted,
required this.createdBy,
required this.lastUpdatedBy,
required this.deletedBy,
required this.dateCreated,
required this.dateModified,
required this.dateDeleted,
required this.scope,
required this.owner,
required this.links,
required this.ports,
required this.iotDeviceTags,
required this.entityAddresses,
required this.availablePorts,
required this.mobile,
});
String? deviceId;
String? publicId;
String? companyId;
String? company;
String label;
String? mobileProviderId;
String? mobileProvider;
String? hologramDeviceId;
String? hologramLinkId;
String? firmwareVersionId;
String? version;
String? formattedVersion;
String? deviceTypeId;
String? deviceType;
String? ipAddress;
String? recordInterval;
String? uploadInterval;
String? powerMode;
String? connectivity;
String? connectivityClass;
String? usersLastRecordDate;
DateTime gmtLastRecordDate;
String? battery;
String? batteryPercentage;
String? batteryClass;
String? batteryIcon;
String? signalQuality;
String? signalQualityClass;
String? signalQualityText;
String? signalQualityIcon;
String? queuedRecords;
String? command;
String? status;
String? statusClass;
DateTime? purchaseDate;
String? warrantyPeriod;
DateTime? warrantyExpires;
String? warrantyStatus;
String? temperatureClass;
String? temperatureMetric;
String? temperatureImperial;
String? surgeProtection;
String? totalProducts;
dynamic temperatureLowThreshold;
dynamic temperatureHighThreshold;
dynamic notes;
dynamic importId;
String? deleted;
String? createdBy;
String? lastUpdatedBy;
dynamic deletedBy;
dynamic dateCreated;
String? dateModified;
dynamic dateDeleted;
String? scope;
String? owner;
DeviceLinks links;
List<Port> ports;
List<IotDeviceTag> iotDeviceTags;
List<EntityAddress> entityAddresses;
List<String> availablePorts;
Mobile mobile;
factory DeviceClass.fromJson(Map<String, dynamic> json) => DeviceClass(
deviceId: json["device_id"],
publicId: json["public_id"],
companyId: json["company_id"],
company: json["company"],
label: json["label"] ?? 'null',
mobileProviderId: json["mobile_provider_id"],
mobileProvider: json["mobile_provider"],
hologramDeviceId: json["hologram_device_id"],
hologramLinkId: json["hologram_link_id"],
firmwareVersionId: json["firmware_version_id"],
version: json["version"],
formattedVersion: json["formatted_version"],
deviceTypeId: json["device_type_id"],
deviceType: json["device_type"],
ipAddress: json["ip_address"],
recordInterval: json["record_interval"],
uploadInterval: json["upload_interval"],
powerMode: json["power_mode"],
connectivity: json["connectivity"],
connectivityClass: json["connectivity_class"],
usersLastRecordDate: json["users_last_record_date"],
gmtLastRecordDate: DateTime.parse(json["gmt_last_record_date"]),
battery: json["battery"],
batteryPercentage: json["battery_percentage"],
batteryClass: json["battery_class"],
batteryIcon: json["battery_icon"],
signalQuality: json["signal_quality"],
signalQualityClass: json["signal_quality_class"],
signalQualityText: json["signal_quality_text"],
signalQualityIcon: json["signal_quality_icon"],
queuedRecords: json["queued_records"],
command: json["command"],
status: json["status"],
statusClass: json["status_class"],
purchaseDate: DateTime.parse(json["purchase_date"]),
warrantyPeriod: json["warranty_period"],
warrantyExpires: DateTime.parse(json["warranty_expires"]),
warrantyStatus: json["warranty_status"],
temperatureClass: json["temperature_class"],
temperatureMetric: json["temperature_metric"],
temperatureImperial: json["temperature_imperial"],
surgeProtection: json["surge_protection"],
totalProducts: json["total_products"],
temperatureLowThreshold: json["temperature_low_threshold"],
temperatureHighThreshold: json["temperature_high_threshold"],
notes: json["notes"],
importId: json["import_id"],
deleted: json["deleted"],
createdBy: json["created_by"],
lastUpdatedBy: json["last_updated_by"],
deletedBy: json["deleted_by"],
dateCreated: json["date_created"],
dateModified: json["date_modified"],
dateDeleted: json["date_deleted"],
scope: json["scope"],
owner: json["owner"],
links: DeviceLinks.fromJson(json["links"]),
ports: List<Port>.from(json["ports"].map((x) => Port.fromJson(x))),
iotDeviceTags: List<IotDeviceTag>.from(
json["iot_device_tags"].map((x) => IotDeviceTag.fromJson(x))),
entityAddresses: List<EntityAddress>.from(
json["entity_addresses"].map((x) => EntityAddress.fromJson(x))),
availablePorts:
List<String>.from(json["available_ports"].map((x) => x)),
mobile: Mobile.fromJson(json["mobile"]),
);
}
class EntityAddress {
EntityAddress({
required this.entityAddressesId,
required this.objectRef,
required this.objectId,
required this.address1,
required this.address2,
required this.city,
required this.state,
required this.zipCode,
required this.zipCodeExt,
required this.countryName,
required this.countryIso2,
required this.countryIso3,
required this.countryId,
required this.fullSingleLineAddress,
required this.fullMultiLineAddress,
required this.addressType,
required this.prime,
required this.primeType,
required this.primeClass,
required this.mapsLink,
required this.deleted,
required this.createdBy,
required this.lastUpdatedBy,
required this.deletedBy,
required this.dateCreated,
required this.dateModified,
required this.dateDeleted,
required this.links,
});
String entityAddressesId;
String objectRef;
String objectId;
String address1;
String address2;
String city;
String state;
String zipCode;
dynamic zipCodeExt;
String countryName;
String countryIso2;
String countryIso3;
String countryId;
String fullSingleLineAddress;
String fullMultiLineAddress;
String addressType;
String prime;
String primeType;
String primeClass;
String mapsLink;
String deleted;
String createdBy;
String lastUpdatedBy;
dynamic deletedBy;
String dateCreated;
String dateModified;
dynamic dateDeleted;
EntityAddressLinks links;
factory EntityAddress.fromJson(Map<String, dynamic> json) => EntityAddress(
entityAddressesId: json["entity_addresses_id"],
objectRef: json["object_ref"],
objectId: json["object_id"],
address1: json["address1"],
address2: json["address2"],
city: json["city"],
state: json["state"],
zipCode: json["zip_code"],
zipCodeExt: json["zip_code_ext"],
countryName: json["country_name"],
countryIso2: json["country_iso_2"],
countryIso3: json["country_iso_3"],
countryId: json["country_id"],
fullSingleLineAddress: json["full_single_line_address"],
fullMultiLineAddress: json["full_multi_line_address"],
addressType: json["address_type"],
prime: json["prime"],
primeType: json["prime_type"],
primeClass: json["prime_class"],
mapsLink: json["maps_link"],
deleted: json["deleted"],
createdBy: json["created_by"],
lastUpdatedBy: json["last_updated_by"],
deletedBy: json["deleted_by"],
dateCreated: json["date_created"],
dateModified: json["date_modified"],
dateDeleted: json["date_deleted"],
links: EntityAddressLinks.fromJson(json["links"]),
);
}
class EntityAddressLinks {
EntityAddressLinks({
required this.self,
});
String self;
factory EntityAddressLinks.fromJson(Map<String, dynamic> json) =>
EntityAddressLinks(
self: json["self"],
);
}
class IotDeviceTag {
IotDeviceTag({
required this.id,
required this.deviceId,
required this.tagId,
required this.tag,
required this.companyId,
required this.createdBy,
required this.lastUpdatedBy,
required this.deletedBy,
required this.dateCreated,
required this.dateModified,
required this.dateDeleted,
required this.scope,
required this.owner,
required this.links,
});
String id;
String deviceId;
String tagId;
String tag;
String companyId;
String createdBy;
dynamic lastUpdatedBy;
dynamic deletedBy;
String dateCreated;
dynamic dateModified;
dynamic dateDeleted;
String scope;
String owner;
EntityAddressLinks links;
factory IotDeviceTag.fromJson(Map<String, dynamic> json) => IotDeviceTag(
id: json["id"],
deviceId: json["device_id"],
tagId: json["tag_id"],
tag: json["tag"],
companyId: json["company_id"],
createdBy: json["created_by"],
lastUpdatedBy: json["last_updated_by"],
deletedBy: json["deleted_by"],
dateCreated: json["date_created"],
dateModified: json["date_modified"],
dateDeleted: json["date_deleted"],
scope: json["scope"],
owner: json["owner"],
links: EntityAddressLinks.fromJson(json["links"]),
);
}
class DeviceLinks {
DeviceLinks({
required this.self,
required this.customer,
});
String self;
String customer;
factory DeviceLinks.fromJson(Map<String, dynamic> json) => DeviceLinks(
self: json["self"],
customer: json["customer"],
);
}
class Mobile {
Mobile({
required this.deviceName,
required this.sim,
required this.imei,
required this.hologramDeviceId,
required this.whenCreated,
required this.simState,
required this.overageLimit,
required this.currentBillingData,
required this.lastNetworkUsed,
required this.lastConnected,
this.lastSessionBytes,
this.lastSessionBegin,
this.lastSessionEnd,
this.networkName,
this.radioTech,
this.simActive,
this.linkId,
});
String deviceName;
String sim;
String imei;
int hologramDeviceId;
DateTime whenCreated;
String simState;
int overageLimit;
int currentBillingData;
String lastNetworkUsed;
String lastConnected;
dynamic lastSessionBytes;
dynamic lastSessionBegin;
dynamic lastSessionEnd;
dynamic networkName;
dynamic radioTech;
dynamic simActive;
dynamic linkId;
factory Mobile.fromJson(Map<String, dynamic> json) => Mobile(
deviceName: json["device_name"],
sim: json["sim"],
imei: json["imei"],
hologramDeviceId: json["hologram_device_id"],
whenCreated: DateTime.parse(json["when_created"]),
simState: json["sim_state"],
overageLimit: json["overage_limit"],
currentBillingData: json["current_billing_data"],
lastNetworkUsed: json["last_network_used"],
lastConnected: json["last_connected"],
lastSessionBytes: json["last_session_bytes"],
lastSessionBegin: json["last_session_begin"],
lastSessionEnd: json["last_session_end"],
networkName: json["network_name"],
radioTech: json["radio_tech"],
simActive: json["sim_active"],
linkId: json["link_id"],
);
}
class Port {
Port({
required this.devicePortsId,
required this.deviceId,
required this.companyId,
required this.company,
required this.productId,
required this.productName,
required this.portNumber,
required this.version,
required this.sensorTypeId,
required this.sensorType,
required this.sensorDescription,
required this.imperialSymbol,
required this.metricSymbol,
required this.fillVolumeGallons,
required this.fillVolumeLiters,
required this.totalGallonsCapacity,
required this.totalLitersCapacity,
required this.percentFull,
required this.tankTypeId,
required this.tankType,
required this.slug,
required this.imageUrl,
required this.formula,
required this.reorderYellow,
required this.reorderRed,
required this.deleted,
required this.createdBy,
required this.lastUpdatedBy,
required this.deletedBy,
required this.dateCreated,
required this.dateModified,
required this.dateDeleted,
required this.scope,
required this.owner,
required this.links,
required this.tankSpecs,
});
String devicePortsId;
String deviceId;
String companyId;
String company;
String productId;
String productName;
String portNumber;
String version;
String sensorTypeId;
String sensorType;
String sensorDescription;
String imperialSymbol;
String metricSymbol;
String fillVolumeGallons;
String fillVolumeLiters;
String totalGallonsCapacity;
String totalLitersCapacity;
String percentFull;
String tankTypeId;
TankType? tankType;
Slug? slug;
String imageUrl;
String formula;
String reorderYellow;
String reorderRed;
String deleted;
dynamic createdBy;
String lastUpdatedBy;
dynamic deletedBy;
String dateCreated;
String dateModified;
dynamic dateDeleted;
String scope;
String owner;
EntityAddressLinks links;
List<TankSpec> tankSpecs;
factory Port.fromJson(Map<String, dynamic> json) => Port(
devicePortsId: json["device_ports_id"],
deviceId: json["device_id"],
companyId: json["company_id"],
company: json["company"],
productId: json["product_id"],
productName: json["product_name"],
portNumber: json["port_number"],
version: json["version"],
sensorTypeId: json["sensor_type_id"],
sensorType: json["sensor_type"],
sensorDescription: json["sensor_description"],
imperialSymbol: json["imperial_symbol"],
metricSymbol: json["metric_symbol"],
fillVolumeGallons: json["fill_volume_gallons"],
fillVolumeLiters: json["fill_volume_liters"],
totalGallonsCapacity: json["total_gallons_capacity"],
totalLitersCapacity: json["total_liters_capacity"],
percentFull: json["percent_full"],
tankTypeId: json["tank_type_id"],
tankType: tankTypeValues.map[json["tank_type"]],
slug: slugValues.map[json["slug"]],
imageUrl: json["image_url"],
formula: json["formula"],
reorderYellow: json["reorder_yellow"],
reorderRed: json["reorder_red"],
deleted: json["deleted"],
createdBy: json["created_by"],
lastUpdatedBy: json["last_updated_by"],
deletedBy: json["deleted_by"],
dateCreated: json["date_created"],
dateModified: json["date_modified"],
dateDeleted: json["date_deleted"],
scope: json["scope"],
owner: json["owner"],
links: EntityAddressLinks.fromJson(json["links"]),
tankSpecs: List<TankSpec>.from(
json["tank_specs"].map((x) => TankSpec.fromJson(x))),
);
}
enum Slug { VERTICAL_CYLINDER, VERTICAL_OVAL, RECTANGULAR }
final slugValues = EnumValues({
"rectangular": Slug.RECTANGULAR,
"vertical_cylinder": Slug.VERTICAL_CYLINDER,
"vertical_oval": Slug.VERTICAL_OVAL
});
class TankSpec {
TankSpec({
required this.id,
required this.devicePortsId,
required this.tankTypeId,
required this.tankType,
required this.slug,
required this.defUsGallons,
required this.defLiters,
required this.metricDiameter,
required this.metricHeight,
required this.metricWidth,
required this.metricLength,
required this.sensorOffset,
required this.imperialDiameter,
required this.imperialHeight,
required this.imperialWidth,
required this.imperialLength,
required this.usGallons,
required this.liters,
required this.gallonCalcDiff,
required this.dimensionDisplay,
required this.template,
required this.createdBy,
required this.lastUpdatedBy,
required this.deletedBy,
required this.dateCreated,
required this.dateModified,
required this.dateDeleted,
required this.links,
});
String id;
String devicePortsId;
String tankTypeId;
TankType? tankType;
Slug? slug;
String defUsGallons;
String defLiters;
String metricDiameter;
String? metricHeight;
String? metricWidth;
String metricLength;
String sensorOffset;
String imperialDiameter;
String? imperialHeight;
String? imperialWidth;
String imperialLength;
String? usGallons;
String? liters;
String gallonCalcDiff;
String? dimensionDisplay;
String template;
String createdBy;
String? lastUpdatedBy;
dynamic deletedBy;
String dateCreated;
String? dateModified;
dynamic dateDeleted;
EntityAddressLinks links;
factory TankSpec.fromJson(Map<String, dynamic> json) => TankSpec(
id: json["id"],
devicePortsId: json["device_ports_id"],
tankTypeId: json["tank_type_id"],
tankType: tankTypeValues.map[json["tank_type"]],
slug: slugValues.map[json["slug"]],
defUsGallons: json["def_us_gallons"],
defLiters: json["def_liters"],
metricDiameter: json["metric_diameter"],
metricHeight:
json["metric_height"] == null ? null : json["metric_height"],
metricWidth: json["metric_width"] == null ? null : json["metric_width"],
metricLength: json["metric_length"],
sensorOffset: json["sensor_offset"],
imperialDiameter: json["imperial_diameter"],
imperialHeight:
json["imperial_height"] == null ? null : json["imperial_height"],
imperialWidth:
json["imperial_width"] == null ? null : json["imperial_width"],
imperialLength: json["imperial_length"],
usGallons: json["us_gallons"] == null ? null : json["us_gallons"],
liters: json["liters"] == null ? null : json["liters"],
gallonCalcDiff: json["gallon_calc_diff"],
dimensionDisplay: json["dimension_display"] == null
? null
: json["dimension_display"],
template: json["template"],
createdBy: json["created_by"],
lastUpdatedBy:
json["last_updated_by"] == null ? null : json["last_updated_by"],
deletedBy: json["deleted_by"],
dateCreated: json["date_created"],
dateModified:
json["date_modified"] == null ? null : json["date_modified"],
dateDeleted: json["date_deleted"],
links: EntityAddressLinks.fromJson(json["links"]),
);
}
enum TankType { VERTICAL_CYLINDER, VERTICAL_OVAL, RECTANGULAR_SHAPE }
final tankTypeValues = EnumValues({
"Rectangular Shape": TankType.RECTANGULAR_SHAPE,
"Vertical Cylinder": TankType.VERTICAL_CYLINDER,
"Vertical Oval": TankType.VERTICAL_OVAL
});
class EnumValues<T> {
Map<String, T> map;
late Map<T, String> reverseMap;
EnumValues(this.map);
Map<T, String> get reverse {
if (reverseMap == null) {
reverseMap = map.map((k, v) => new MapEntry(v, k));
}
return reverseMap;
}
}
const String jsonString = '''{
"mode": "** DEVELOPMENT MODE: ON **",
"device": {
"device_id": "2",
"public_id": "100000",
"company_id": "1",
"company": "ABC Company",
"label": "testing",
"mobile_provider_id": "2",
"mobile_provider": "Hologram",
"hologram_device_id": "1222631",
"hologram_link_id": "1380862",
"firmware_version_id": "15",
"version": "300",
"formatted_version": "3.0.0",
"device_type_id": "1",
"device_type": "LT14",
"ip_address": "24.123.249.150",
"record_interval": "4500",
"upload_interval": "2",
"power_mode": "1",
"connectivity": "offline",
"connectivity_class": "red",
"users_last_record_date": "2021-12-19 16:19",
"gmt_last_record_date": "2021-12-19 21:19:16",
"battery": "5.25",
"battery_percentage": "75%",
"battery_class": "green",
"battery_icon": "battery_full",
"signal_quality": "12",
"signal_quality_class": "yellow",
"signal_quality_text": "medium",
"signal_quality_icon": "signal_cellular_alt",
"queued_records": "100",
"command": "0",
"status": "active",
"status_class": "red",
"purchase_date": "2021-02-04",
"warranty_period": "1",
"warranty_expires": "2022-02-04",
"warranty_status": "0",
"temperature_class": "green",
"temperature_metric": "20.0",
"temperature_imperial": "68",
"surge_protection": "1",
"total_products": "4",
"temperature_low_threshold": null,
"temperature_high_threshold": null,
"notes": null,
"import_id": null,
"deleted": "0",
"created_by": "Jason May",
"last_updated_by": "Jason May",
"deleted_by": null,
"date_created": null,
"date_modified": "2022-05-12 12:36",
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/customers/1/devices/2",
"customer": "https://api.licadas.com/customers/1"
},
"ports": [
{
"device_ports_id": "5",
"device_id": "2",
"company_id": "1",
"company": "ABC Company",
"product_id": "1",
"product_name": "Water",
"port_number": "1",
"version": "300",
"sensor_type_id": "2",
"sensor_type": "Pressure Transducer",
"sensor_description": "External pressure ",
"imperial_symbol": "G",
"metric_symbol": "L",
"fill_volume_gallons": "0.1200",
"fill_volume_liters": "3.634",
"total_gallons_capacity": "20888.00000",
"total_liters_capacity": "79069.644",
"percent_full": "0",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"image_url": "https://api.licadas.com/static/images/tanks/vertical_cylinder.jpg",
"formula": "d,h",
"reorder_yellow": "3",
"reorder_red": "2",
"deleted": "0",
"created_by": null,
"last_updated_by": "1",
"deleted_by": null,
"date_created": "2018-11-25 12:06",
"date_modified": "2021-12-22 17:28",
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/device_ports/5"
},
"tank_specs": [
{
"id": "54",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 16:05",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/54"
}
},
{
"id": "55",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 16:05",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/55"
}
},
{
"id": "56",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 17:27",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/56"
}
},
{
"id": "57",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 17:27",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/57"
}
},
{
"id": "58",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 17:28",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/58"
}
},
{
"id": "59",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 17:28",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/59"
}
},
{
"id": "60",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 17:28",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/60"
}
},
{
"id": "61",
"device_ports_id": "5",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2611.00000",
"def_liters": "9883.706",
"metric_diameter": "2032.0",
"metric_height": "3048.0",
"metric_width": "0.0",
"metric_length": "0.0",
"sensor_offset": "127.0",
"imperial_diameter": "80.00",
"imperial_height": "120.00",
"imperial_width": "0.00",
"imperial_length": "0.00",
"us_gallons": "2611",
"liters": "9884",
"gallon_calc_diff": "2611",
"dimension_display": "2032D x 3048H",
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-12-22 17:28",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/61"
}
}
]
},
{
"device_ports_id": "6",
"device_id": "2",
"company_id": "1",
"company": "ABC Company",
"product_id": "1",
"product_name": "Water",
"port_number": "2",
"version": "300",
"sensor_type_id": "13",
"sensor_type": "thermistor",
"sensor_description": "Temperature monitoring",
"imperial_symbol": "&deg;F",
"metric_symbol": "&deg;C",
"fill_volume_gallons": "1.3260",
"fill_volume_liters": "5.019",
"total_gallons_capacity": "2.64172",
"total_liters_capacity": "10.000",
"percent_full": "50",
"tank_type_id": "5",
"tank_type": "Vertical Oval",
"slug": "vertical_oval",
"image_url": "https://api.licadas.com/static/images/tanks/vertical_oval.jpg",
"formula": "h,l,w",
"reorder_yellow": "2",
"reorder_red": "1",
"deleted": "0",
"created_by": null,
"last_updated_by": "10",
"deleted_by": null,
"date_created": "2018-11-25 12:06",
"date_modified": "2021-11-02 13:58",
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/device_ports/6"
},
"tank_specs": [
{
"id": "33",
"device_ports_id": "6",
"tank_type_id": "5",
"tank_type": "Vertical Oval",
"slug": "vertical_oval",
"def_us_gallons": "2.64172",
"def_liters": "10.000",
"metric_diameter": "2209.8",
"metric_height": null,
"metric_width": null,
"metric_length": "1651.0",
"sensor_offset": "0.0",
"imperial_diameter": "87.00",
"imperial_height": null,
"imperial_width": null,
"imperial_length": "65.00",
"us_gallons": null,
"liters": null,
"gallon_calc_diff": "1670",
"dimension_display": null,
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-08-18 11:32",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/33"
}
}
]
},
{
"device_ports_id": "7",
"device_id": "2",
"company_id": "1",
"company": "ABC Company",
"product_id": "7",
"product_name": "Test Fluid",
"port_number": "3",
"version": "300",
"sensor_type_id": "8",
"sensor_type": "Pressure Transducer",
"sensor_description": "External pressure transducer",
"imperial_symbol": "G",
"metric_symbol": "L",
"fill_volume_gallons": "1.6410",
"fill_volume_liters": "6.212",
"total_gallons_capacity": "2.64172",
"total_liters_capacity": "10.000",
"percent_full": "62",
"tank_type_id": "3",
"tank_type": "Rectangular Shape",
"slug": "rectangular",
"image_url": "https://api.licadas.com/static/images/tanks/rectangle.jpg",
"formula": "h,w,l",
"reorder_yellow": "2",
"reorder_red": "1",
"deleted": "0",
"created_by": null,
"last_updated_by": "10",
"deleted_by": null,
"date_created": "2018-11-25 12:06",
"date_modified": "2021-11-02 12:49",
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/device_ports/7"
},
"tank_specs": [
{
"id": "32",
"device_ports_id": "7",
"tank_type_id": "3",
"tank_type": "Rectangular Shape",
"slug": "rectangular",
"def_us_gallons": "2.64172",
"def_liters": "10.000",
"metric_diameter": "2209.8",
"metric_height": null,
"metric_width": null,
"metric_length": "1651.0",
"sensor_offset": "0.0",
"imperial_diameter": "87.00",
"imperial_height": null,
"imperial_width": null,
"imperial_length": "65.00",
"us_gallons": null,
"liters": null,
"gallon_calc_diff": "1670",
"dimension_display": null,
"template": "0",
"created_by": "1",
"last_updated_by": "1",
"deleted_by": null,
"date_created": "2021-08-18 10:53",
"date_modified": "2021-08-18 11:28",
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/32"
}
}
]
},
{
"device_ports_id": "8",
"device_id": "2",
"company_id": "1",
"company": "ABC Company",
"product_id": "6",
"product_name": "Battery Acid",
"port_number": "5",
"version": "300",
"sensor_type_id": "6",
"sensor_type": "THIS IS A TEST",
"sensor_description": "TEST change",
"imperial_symbol": "F",
"metric_symbol": "C",
"fill_volume_gallons": "2.6410",
"fill_volume_liters": "9.997",
"total_gallons_capacity": "2.64172",
"total_liters_capacity": "10.000",
"percent_full": "100",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"image_url": "https://api.licadas.com/static/images/tanks/vertical_cylinder.jpg",
"formula": "d,h",
"reorder_yellow": "20",
"reorder_red": "10",
"deleted": "0",
"created_by": null,
"last_updated_by": "10",
"deleted_by": null,
"date_created": "2018-11-25 12:06",
"date_modified": "2021-11-02 14:05",
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/device_ports/8"
},
"tank_specs": [
{
"id": "31",
"device_ports_id": "8",
"tank_type_id": "2",
"tank_type": "Vertical Cylinder",
"slug": "vertical_cylinder",
"def_us_gallons": "2.64172",
"def_liters": "10.000",
"metric_diameter": "2209.8",
"metric_height": null,
"metric_width": null,
"metric_length": "1651.0",
"sensor_offset": "0.0",
"imperial_diameter": "87.00",
"imperial_height": null,
"imperial_width": null,
"imperial_length": "65.00",
"us_gallons": null,
"liters": null,
"gallon_calc_diff": "1670",
"dimension_display": null,
"template": "0",
"created_by": "1",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-08-18 10:53",
"date_modified": null,
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/tank_specs/31"
}
}
]
}
],
"iot_device_tags": [
{
"id": "5",
"device_id": "2",
"tag_id": "6",
"tag": "Test 555",
"company_id": "203",
"created_by": "Jason May",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-09-13 20:46",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/5"
}
},
{
"id": "23",
"device_id": "2",
"tag_id": "15",
"tag": "Test 3",
"company_id": "1",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-10-01 14:25",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/23"
}
},
{
"id": "24",
"device_id": "2",
"tag_id": "16",
"tag": "asdf",
"company_id": "315",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-10-01 14:37",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/24"
}
},
{
"id": "25",
"device_id": "2",
"tag_id": "17",
"tag": "addtag",
"company_id": "203",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-10-01 14:45",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/25"
}
},
{
"id": "26",
"device_id": "2",
"tag_id": "18",
"tag": "another",
"company_id": "250",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-10-01 14:51",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/26"
}
},
{
"id": "29",
"device_id": "2",
"tag_id": "12",
"tag": "Test 3",
"company_id": "1",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-10-02 11:25",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/29"
}
},
{
"id": "41",
"device_id": "2",
"tag_id": "1",
"tag": "Test 1",
"company_id": "1",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2021-10-05 11:23",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/41"
}
},
{
"id": "57",
"device_id": "2",
"tag_id": "14",
"tag": "new tag",
"company_id": "14",
"created_by": "Evan Bates",
"last_updated_by": null,
"deleted_by": null,
"date_created": "2022-05-26 15:43",
"date_modified": null,
"date_deleted": null,
"scope": "read, create, update, delete",
"owner": "0",
"links": {
"self": "https://api.licadas.com/iot_device_tags/57"
}
}
],
"entity_addresses": [
{
"entity_addresses_id": "163",
"object_ref": "devices",
"object_id": "2",
"address1": "test address",
"address2": "asdf",
"city": "Colton",
"state": "OH",
"zip_code": "23445",
"zip_code_ext": null,
"country_name": "Andorra",
"country_iso_2": "AD",
"country_iso_3": "AND",
"country_id": "188",
"full_single_line_address": "test address, asdf, Colton, OH, 23445, Andorra",
"full_multi_line_address": "test address<br />asdf<br />Colton, OH, 23445<br />Andorra",
"address_type": "device",
"prime": "0",
"prime_type": "alternate",
"prime_class": "default",
"maps_link": "https://www.google.com/maps/place/test+address+asdf+Colton+OH+23445+Andorra",
"deleted": "0",
"created_by": "Evan Bates",
"last_updated_by": "Evan Bates",
"deleted_by": null,
"date_created": "2021-09-29 10:55",
"date_modified": "2021-09-29 11:08",
"date_deleted": null,
"links": {
"self": "https://api.licadas.com/entity_addresses/163"
}
}
],
"available_ports": [
"9",
"8"
],
"mobile": {
"device_name": "100000: ABC Company",
"sim": "8944502808207252164",
"imei": "868963046675740",
"hologram_device_id": 1222631,
"when_created": "2021-05-28 19:04:00",
"sim_state": "PAUSED-USER",
"overage_limit": 10000000,
"current_billing_data": 0,
"last_network_used": "",
"last_connected": "",
"last_session_bytes": null,
"last_session_begin": null,
"last_session_end": null,
"network_name": null,
"radio_tech": null,
"sim_active": null,
"link_id": null
}
}
}
''';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment