I've got 52 devices (some real, some virtual) added to the MakerAPI app. I noticed recently that when fetching all of these devices (with full details) I get back 757 attributes that are simply "null"
http://192.168.0.201/apps/api/38/devices/all?access_token=ABC
I did a grep for ": null," in my formatted results to illustrate this (snippet below).
I realize not ever driver is created by Hubitat but I do feel like there's no point in returning a null value via JSON.. to me a null value is the same as not being there - unlike an empty "" value which does have some meaning.
Hopefully others agree too.. that's a lot of extra data/bandwidth which could easily be avoided.
Worst-case - could you add an optional flag to hide these null values? That wouldn't change the results for existing apps that rely on MakerAPI (even though I'm not sure it would)
Here's the null attributes I get from my 52 Hubitat devices..
"model": null,
"manufacturer": null,
"values": null,
"codeLength": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"lastMonthTotal": null,
"power": null,
"currMonthAvg": null,
"currMonthTotal": null,
"lastMonthAvg": null,
"energy": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"lastMonthTotal": null,
"power": null,
"currMonthAvg": null,
"currMonthTotal": null,
"lastMonthAvg": null,
"energy": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"values": null,
"lastCheckinEpoch": null,
"model": null,
"manufacturer": null,
"released": null,
"values": null,
"doubleTapped": null,
"model": null,
"manufacturer": null,
"lastMonthTotal": null,
"power": null,
"currMonthAvg": null,
"currMonthTotal": null,
"lastMonthAvg": null,
"energy": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"Light Sensor CH1": null,
"values": null,
"Snapshot Period Minutes Options": null,
"Last Battery Alert": null,
"Feature Plan ID": null,
"Clip Rate": null,
"Early Termination Supported": null,
"Ping Interval": null,
"Motion Sensitivity": null,
"Temp Hysteresis": null,
"Motion Regions Compatible": null,
"SM Backup Enabled": null,
"LFR Strength": null,
"Light Sensor Data Valid": null,
"Usage": null,
"Join Available": null,
"MFG Mez Type": null,
"Server": null,
"FW Git Hash": null,
"PIR Rejections": null,
"Video Description": null,
"Firmware Version": null,
"Temp Adjust": null,
"LiveView Duration": null,
"Time Zone": null,
"Battery Alarm Enable": null,
"Battery Signal": null,
"Camera Error": null,
"Thumbnail Image": null,
"Join State": null,
"Snapshot Period Minutes": null,
"Time DHCP Lease": null,
"Battery Voltage Interval": null,
"Busy": null,
"OS Version": null,
"Submit Logs": null,
"Account": null,
"Last Command ID": null,
"Flip Video": null,
"Video History Count": null,
"Camera Seq": null,
"Total 108 Wakeups": null,
"Temp Min": null,
"Record Audio": null,
"Continue Warning": null,
"Night Vision Exposure Compatible": null,
"Last Backfill Completed": null,
"Network Origin": null,
"Encryption Key": null,
"Temp Alert State": null,
"Temp Max": null,
"Night Vision Exposure": null,
"Illuminator Enable": null,
"Video Quality": null,
"LFR Alert Count": null,
"Deleted": null,
"Illuminator Duration": null,
"Onboarded": null,
"LiveView Seconds": null,
"Table Update Sequence": null,
"Local Storage Status": null,
"MFG Mez Range": null,
"Battery Voltage Threshold": null,
"Lifetime Count": null,
"Total TB Wakeups": null,
"LFR Channel": null,
"Record Audio Enable": null,
"Video Recording Optional": null,
"Early Notification Compatible": null,
"Temp Interval": null,
"MFG Main Type": null,
"Error Codes": null,
"Last LFR Alert": null,
"Unit Number": null,
"Early Notification": null,
"Created": null,
"Privacy Zones Compatible": null,
"LFR TB Wakeups": null,
"AC Power": null,
"Options": null,
"LFR Sync Interval": null,
"Dev 1": null,
"Last Activity": null,
"LiveView RTSP": null,
"Battery Check Time": null,
"Network Key": null,
"Wifi Alert Count": null,
"Last Backup Completed": null,
"Temp Alerts Enabled": null,
"Video hz": null,
"Clip Seconds": null,
"Buzzer On": null,
"Camera Key": null,
"Lifetime Duration": null,
"Offline Alert Count": null,
"Clip Max Length": null,
"Last Temp Alert": null,
"Local Storage Enabled": null,
"LFR Frequency": null,
"Usage Rate": null,
"LFR 108 Wakeups": null,
"Last Wifi Alert": null,
"Early PIR Compatible": null,
"Camera ID": null,
"Storage Total": null,
"Video Recording Enable": null,
"Alert Tone Enable": null,
"Dev 2": null,
"LV Save": null,
"Auto Test": null,
"Auto Arm By Geo": null,
"IPv": null,
"Liveview Bitrate": null,
"Alert Repeat": null,
"MFG Main Range": null,
"Alert Tone Volume": null,
"Flip Image": null,
"LFR Signal": null,
"html": null,
"Time 108 Boot": null,
"Siren Volume": null,
"Siren Enable": null,
"Battery Alert Account": null,
"WiFi Connect Failure Count": null,
"LiveView Rate": null,
"Thumbnail": null,
"Temp Alarm Enable": null,
"Auto Arm By Time": null,
"Retry Count": null,
"Clip Warning Threshold": null,
"Light Sensor Data New": null,
"LiveView Enabled": null,
"LiveView Mode": null,
"WiFi Strength": null,
"Media ID": null,
"Motion Regions": null,
"Time DNS Resolve": null,
"Alert Interval": null,
"Daylight Savings Time": null,
"Last Backup Started": null,
"DHCP Failure Count": null,
"Time WLAN Connect": null,
"Illuminator Intensity": null,
"Enabled": null,
"Sync Module Error": null,
"Video Length": null,
"Time First Video": null,
"Snapshot Compatible": null,
"Backfill In Progress": null,
"Local Storage Compatible": null,
"MAC Address": null,
"Serial": null,
"Temp Alert Status": null,
"Light Sensor CH0": null,
"Dev 3": null,
"Temperature Alert Count": null,
"Battery Number": null,
"Snapshot Enabled": null,
"WiFi Signal": null,
"Clip Bitrate": null,
"Battery Alert Count": null,
"Storage Used": null,
"LiveView Continue Interval": null,
"Early Termination": null,
"WiFi Timeout": null,
"Max Resolution": null,
"Battery Voltage Hysteresis": null,
"Socket Failure Count": null,
"Invert Image": null,
"New Command": null,
"Last HB": null,
"Flip Video Compatible": null,
"model": null,
"manufacturer": null,
"Light Sensor CH1": null,
"values": null,
"Snapshot Period Minutes Options": null,
"Last Battery Alert": null,
"Feature Plan ID": null,
"Clip Rate": null,
"Early Termination Supported": null,
"Ping Interval": null,
"Motion Sensitivity": null,
"Temp Hysteresis": null,
"Motion Regions Compatible": null,
"SM Backup Enabled": null,
"LFR Strength": null,
"Light Sensor Data Valid": null,
"Usage": null,
"Join Available": null,
"MFG Mez Type": null,
"Server": null,
"FW Git Hash": null,
"PIR Rejections": null,
"Video Description": null,
"Firmware Version": null,
"Temp Adjust": null,
"LiveView Duration": null,
"Time Zone": null,
"Battery Alarm Enable": null,
"Battery Signal": null,
"Camera Error": null,
"Thumbnail Image": null,
"Join State": null,
"Snapshot Period Minutes": null,
"Time DHCP Lease": null,
"Battery Voltage Interval": null,
"Busy": null,
"OS Version": null,
"Submit Logs": null,
"Account": null,
"Last Command ID": null,
"Flip Video": null,
"Video History Count": null,
"Camera Seq": null,
"Total 108 Wakeups": null,
"Temp Min": null,
"Record Audio": null,
"Continue Warning": null,
"Night Vision Exposure Compatible": null,
"Last Backfill Completed": null,
"Network Origin": null,
"Encryption Key": null,
"Temp Alert State": null,
"Temp Max": null,
"Night Vision Exposure": null,
"Illuminator Enable": null,
"Video Quality": null,
"LFR Alert Count": null,
"Deleted": null,
"Illuminator Duration": null,
"Onboarded": null,
"LiveView Seconds": null,
"Table Update Sequence": null,
"Local Storage Status": null,
"MFG Mez Range": null,
"Battery Voltage Threshold": null,
"Lifetime Count": null,
"Total TB Wakeups": null,
"LFR Channel": null,
"Record Audio Enable": null,
"Video Recording Optional": null,
"Early Notification Compatible": null,
"Temp Interval": null,
"MFG Main Type": null,
"Error Codes": null,
"Last LFR Alert": null,
"Unit Number": null,
"Early Notification": null,
"Created": null,
"Privacy Zones Compatible": null,
"LFR TB Wakeups": null,
"AC Power": null,
"Options": null,
"LFR Sync Interval": null,
"Dev 1": null,
"Last Activity": null,
"LiveView RTSP": null,
"Battery Check Time": null,
"Network Key": null,
"Wifi Alert Count": null,
"Last Backup Completed": null,
"Temp Alerts Enabled": null,
"Video hz": null,
"Clip Seconds": null,
"Buzzer On": null,
"Camera Key": null,
"Lifetime Duration": null,
"Offline Alert Count": null,
"Clip Max Length": null,
"Last Temp Alert": null,
"Local Storage Enabled": null,
"LFR Frequency": null,
"Usage Rate": null,
"LFR 108 Wakeups": null,
"Last Wifi Alert": null,
"Early PIR Compatible": null,
"Camera ID": null,
"Storage Total": null,
"Video Recording Enable": null,
"Alert Tone Enable": null,
"Dev 2": null,
"LV Save": null,
"Auto Test": null,
"Auto Arm By Geo": null,
"IPv": null,
"Liveview Bitrate": null,
"Alert Repeat": null,
"MFG Main Range": null,
"Alert Tone Volume": null,
"Flip Image": null,
"LFR Signal": null,
"html": null,
"Time 108 Boot": null,
"Siren Volume": null,
"Siren Enable": null,
"Battery Alert Account": null,
"WiFi Connect Failure Count": null,
"LiveView Rate": null,
"Thumbnail": null,
"Temp Alarm Enable": null,
"Auto Arm By Time": null,
"Retry Count": null,
"Clip Warning Threshold": null,
"Light Sensor Data New": null,
"LiveView Enabled": null,
"LiveView Mode": null,
"WiFi Strength": null,
"Media ID": null,
"Motion Regions": null,
"Time DNS Resolve": null,
"Alert Interval": null,
"Daylight Savings Time": null,
"Last Backup Started": null,
"DHCP Failure Count": null,
"Time WLAN Connect": null,
"Illuminator Intensity": null,
"Enabled": null,
"Sync Module Error": null,
"Video Length": null,
"Time First Video": null,
"Snapshot Compatible": null,
"Backfill In Progress": null,
"Local Storage Compatible": null,
"MAC Address": null,
"Serial": null,
"Temp Alert Status": null,
"Light Sensor CH0": null,
"Dev 3": null,
"Temperature Alert Count": null,
"Battery Number": null,
"Snapshot Enabled": null,
"WiFi Signal": null,
"Clip Bitrate": null,
"Battery Alert Count": null,
"Storage Used": null,
"LiveView Continue Interval": null,
"Early Termination": null,
"WiFi Timeout": null,
"Max Resolution": null,
"Battery Voltage Hysteresis": null,
"Socket Failure Count": null,
"Invert Image": null,
"New Command": null,
"Last HB": null,
"Flip Video Compatible": null,
"model": null,
"manufacturer": null,
"Light Sensor CH1": null,
"values": null,
"Snapshot Period Minutes Options": null,
"Last Battery Alert": null,
"Feature Plan ID": null,
"Clip Rate": null,
"Early Termination Supported": null,
"Ping Interval": null,
"Motion Sensitivity": null,
"Temp Hysteresis": null,
"Motion Regions Compatible": null,
"SM Backup Enabled": null,
"LFR Strength": null,
"Light Sensor Data Valid": null,
"Usage": null,
"Join Available": null,
"MFG Mez Type": null,
"Server": null,
"FW Git Hash": null,
"PIR Rejections": null,
"Video Description": null,
"Firmware Version": null,
"Temp Adjust": null,
"LiveView Duration": null,
"Time Zone": null,
"Battery Alarm Enable": null,
"Battery Signal": null,
"Camera Error": null,
"Thumbnail Image": null,
"Join State": null,
"Snapshot Period Minutes": null,
"Time DHCP Lease": null,
"Battery Voltage Interval": null,
"Busy": null,
"OS Version": null,
"Submit Logs": null,
"Account": null,
"Last Command ID": null,
"Flip Video": null,
"Video History Count": null,
"Camera Seq": null,
"Total 108 Wakeups": null,
"Temp Min": null,
"Record Audio": null,
"Continue Warning": null,
"Night Vision Exposure Compatible": null,
"Last Backfill Completed": null,
"Network Origin": null,
"Encryption Key": null,
"Temp Alert State": null,
"Temp Max": null,
"Night Vision Exposure": null,
"Illuminator Enable": null,
"Video Quality": null,
"LFR Alert Count": null,
"Deleted": null,
"Illuminator Duration": null,
"Onboarded": null,
"LiveView Seconds": null,
"Table Update Sequence": null,
"Local Storage Status": null,
"MFG Mez Range": null,
"Battery Voltage Threshold": null,
"Lifetime Count": null,
"Total TB Wakeups": null,
"LFR Channel": null,
"Record Audio Enable": null,
"Video Recording Optional": null,
"Early Notification Compatible": null,
"Temp Interval": null,
"MFG Main Type": null,
"Error Codes": null,
"Last LFR Alert": null,
"Unit Number": null,
"Early Notification": null,
"Created": null,
"Privacy Zones Compatible": null,
"LFR TB Wakeups": null,
"AC Power": null,
"Options": null,
"LFR Sync Interval": null,
"Dev 1": null,
"Last Activity": null,
"LiveView RTSP": null,
"Battery Check Time": null,
"Network Key": null,
"Wifi Alert Count": null,
"Last Backup Completed": null,
"Temp Alerts Enabled": null,
"Video hz": null,
"Clip Seconds": null,
"Buzzer On": null,
"Camera Key": null,
"Lifetime Duration": null,
"Offline Alert Count": null,
"Clip Max Length": null,
"Last Temp Alert": null,
"Local Storage Enabled": null,
"LFR Frequency": null,
"Usage Rate": null,
"LFR 108 Wakeups": null,
"Last Wifi Alert": null,
"Early PIR Compatible": null,
"Camera ID": null,
"Storage Total": null,
"Video Recording Enable": null,
"Alert Tone Enable": null,
"Dev 2": null,
"LV Save": null,
"Auto Test": null,
"Auto Arm By Geo": null,
"IPv": null,
"Liveview Bitrate": null,
"Alert Repeat": null,
"MFG Main Range": null,
"Alert Tone Volume": null,
"Flip Image": null,
"LFR Signal": null,
"html": null,
"Time 108 Boot": null,
"Siren Volume": null,
"Siren Enable": null,
"Battery Alert Account": null,
"WiFi Connect Failure Count": null,
"LiveView Rate": null,
"Thumbnail": null,
"Temp Alarm Enable": null,
"Auto Arm By Time": null,
"Retry Count": null,
"Clip Warning Threshold": null,
"Light Sensor Data New": null,
"LiveView Enabled": null,
"LiveView Mode": null,
"WiFi Strength": null,
"Media ID": null,
"Motion Regions": null,
"Time DNS Resolve": null,
"Alert Interval": null,
"Daylight Savings Time": null,
"Last Backup Started": null,
"DHCP Failure Count": null,
"Time WLAN Connect": null,
"Illuminator Intensity": null,
"Enabled": null,
"Sync Module Error": null,
"Video Length": null,
"Time First Video": null,
"Snapshot Compatible": null,
"Backfill In Progress": null,
"Local Storage Compatible": null,
"MAC Address": null,
"Serial": null,
"Temp Alert Status": null,
"Light Sensor CH0": null,
"Dev 3": null,
"Temperature Alert Count": null,
"Battery Number": null,
"Snapshot Enabled": null,
"WiFi Signal": null,
"Clip Bitrate": null,
"Battery Alert Count": null,
"Storage Used": null,
"LiveView Continue Interval": null,
"Early Termination": null,
"WiFi Timeout": null,
"Max Resolution": null,
"Battery Voltage Hysteresis": null,
"Socket Failure Count": null,
"Invert Image": null,
"New Command": null,
"Last HB": null,
"Flip Video Compatible": null,
"model": null,
"manufacturer": null,
"values": null,
"volume": null,
"mute": null,
"model": null,
"manufacturer": null,
"values": null,
"date": null,
"model": null,
"manufacturer": null,
"values": null,
"volume": null,
"mute": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"pushed": null,
"values": null,
"indicatorStatus": null,
"date": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"values": null,
"date": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"values": null,
"lockCodes": null,
"codeChanged": null,
"lastCodeName": null,
"model": null,
"manufacturer": null,
"values": null,
"lockCodes": null,
"codeChanged": null,
"lastCodeName": null,
"model": null,
"manufacturer": null,
"values": null,
"lastMap": null,
"memberFriendlyName": null,
"numOfCharacters": null,
"lastLogMessage": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"values": null,
"levelPreset": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"values": null,
"doorMoving": null,
"myQAccountId": null,
"model": null,
"manufacturer": null,
"values": null,
"doorMoving": null,
"myQAccountId": null,
"model": null,
"manufacturer": null,
"values": null,
"doubleTapped": null,
"model": null,
"manufacturer": null,
"values": null,
"thermostatSetpoint": null,
"fanTimeout": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"values": null,
"thermostatSetpoint": null,
"fanTimeout": null,
"model": null,
"manufacturer": null,
"values": null,
"thermostatSetpoint": null,
"model": null,
"manufacturer": null,
"lastMonthTotal": null,
"power": null,
"currMonthAvg": null,
"currMonthTotal": null,
"lastMonthAvg": null,
"energy": null,
"model": null,
"manufacturer": null,
"lastMonthTotal": null,
"power": null,
"currMonthAvg": null,
"currMonthTotal": null,
"lastMonthAvg": null,
"energy": null,
"date": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"lastMonthTotal": null,
"power": null,
"currMonthAvg": null,
"currMonthTotal": null,
"lastMonthAvg": null,
"energy": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"model": null,
"manufacturer": null,
"values": null,
"model": null,
"manufacturer": null,
"values": null,
"last_observation_Forecast": null,
"windSpeed": null,
"wind_direction": null,
"wind_string": null,
"sunsetTime": null,
"illuminated": null,
"condition_code": null,
"cloudTomorrow": null,
"cloudDayAfterTomorrow": null,
"forecast_code": null,
"weatherIcons": null,
"cloudToday": null,
"dewpoint": null,
"wind_cardinal": null,
"noonTime": null,
"alertDescr": null,
"windDirection": null,
"alert": null,
"alertTile": null,
"vis": null,
"condition_icon_only": null,
"condition_icon": null,
"wind_gust": null,
"forecast_text": null,
"threedayTile": null,
"betwixt": null,
"cloud": null,
"wind_degree": null,
"myTile": null,
"condition_text": null,
"last_poll_Forecast": null,
"tw_end": null,
"alertSender": null,
"sunriseTime": null,
"tw_begin": null,