Cloud Portal
Using the Device Dashboard
the portal device dashboard provides insights into devices that have been deployed with an application embedded with the ditto sdk with the device dashboard, y ou can gather and store peer to peer sync and network details automatically rather than needing to continuously query ditto for this data the device dashboard is powered by the small peer info ( smallpeerinfo ) ditto system collection and avaiable for ditto sdk version 4 4 0 and later once enabled, you can access the following details for each device using the portal mesh network connection status timestamp when last seen by the big peer cloud deployment names and unique identifiers operating system (os) address peer key latest device logs custom user metadata viewing devices with ditto sdk 4 8 0 and later the device dashboard will automatically be populated with smallpeerinfo in the ditto sdk 4 8 0 and later to opt out of having device data written and transmitted to the portal, you must disable smallpeerinfo ditto smallpeerinfo isenabled = falseditto smallpeerinfo isenabled = falseditto smallpeerinfo isenabled = falseditto smallpeerinfo isenabled = falseditto smallpeerinfo isenabled = false;ditto get small peer info() set enabled(false)ditto small peer info() set enabled(false) dart(beta) // coming soon viewing devices with ditto sdk 4 4 0 4 7 x in earlier versions of the ditto sdk, the smallpeerinfo feature needs to be manually enabled to collect data enable smallpeerinfo before calling startsync() using the following steps set smallpeerinfo isenabled set to true ditto smallpeerinfo isenabled = trueditto smallpeerinfo isenabled = trueditto smallpeerinfo isenabled = trueditto smallpeerinfo isenabled = trueditto smallpeerinfo isenabled = true;ditto get small peer info() set enabled(true)ditto small peer info() set enabled(true) dart(beta) // coming soon set the sync scope to bigpeer only which indicates that the data should be synced to the cloud (bigpeer) default is that the data is only captured locally ditto smallpeerinfo syncscope = bigpeeronlyditto smallpeerinfo syncscope = dittosmallpeerinfosyncscope bigpeeronlyawait ditto smallpeerinfo setsyncscope("bigpeeronly")ditto smallpeerinfo syncscope = dittosmallpeerinfosyncscope bigpeeronlyditto smallpeerinfo syncscope = dittosmallpeerinfosyncscope bigpeeronlyditto get small peer info() sync scope(), syncscope bigpeeronlyditto small peer info() set sync scope(dittosmallpeerinfosyncscope bigpeeronly); dart(beta) // coming soon viewing devices with ditto sdk 4 3 x and earlier the devices dashboard is only supported on devices with sdk version 4 4 0 and later you must upgrate your application to a support version to take advantage of this feature capability custom user defined device name for cross platform development or when targeting ios, if you want the ability to uniquely identify devices within ditto, call the devicename property on the ditto namespace and specify the desired name this must be set before calling startsync() to take effect ditto devicename = "your device name"ditto devicename = "your device name"ditto devicename = "your device name"ditto devicename = "your device name"ditto devicename = "your device name";ditto device name = "your device name";ditto set device name("your device name"); dart(beta) // coming soon custom user metadata you can add custom device information into the device dashboard by setting the small peer info metadata property on a device var metadata \[string string] = \[ "app version" "1 0 0", "device id" "abc123" ] // set the object directly ditto smallpeerinfo setmetadata(metadata) // or // convert dictionary to json string if let jsondata = try? jsonserialization data(withjsonobject metadata, options \[]), let jsonstring = string(data jsondata, encoding utf8) { // set with a json serialized payload ditto smallpeerinfo setmetadatajsonstring(jsonstring) }val metadata = mutablemapof\<string, string>( "app version" to "1 0 0", "device id" to "abc123" ) // set the object directly ditto smallpeerinfo metadata = metadata // or val jsonmetadata = jsonobject(metadata) val jsonstring = jsonmetadata tostring() // set with a json serialized payload ditto smallpeerinfo metadatajsonstring = jsonstringconst metadata = { app version "1 0 0", device id "abc123" } // set the object directly ditto smallpeerinfo metadata = metadata // or const jsonstring = json stringify(metadata) // set with a json serialized payload ditto smallpeerinfo metadatajsonstring = jsonstringmap\<string, string> metadata = new hashmap<>(); metadata put("app version", "1 0 0"); metadata put("device id", "abc123"); // set the object directly ditto smallpeerinfo setmetadata(metadata); // or jsonobject jsonmetadata = new jsonobject(metadata); string jsonstring = jsonmetadata tostring(); // set with a json serialized payload ditto smallpeerinfo setmetadatajsonstring(jsonstring);dictionary\<string, string> metadata = new dictionary\<string, string> { { "app version", "1 0 0" }, { "device id", "abc123" } }; // set the object directly ditto smallpeerinfo metadata = metadata; // or string jsonstring = jsonconvert serializeobject(metadata); // set with a json serialized payload ditto smallpeerinfo metadatajsonstring = jsonstring;std map\<std string, std string> metadata; metadata\["app version"] = "1 0 0"; metadata\["device id"] = "abc123"; // set the object directly ditto get small peer info() set metadata(metadata); // or nlohmann json json metadata(metadata); std string json string = json metadata dump(); // set with a json serilalized payload ditto get small peer info() set metadata json string(json string)use std collections hashmap; use serde json json; let mut metadata = hashmap new(); metadata insert("app version" to string(), "1 0 0" to string()); metadata insert("device id" to string(), "abc123" to string()); // set the object directly ditto get small peer info() set metadata(metadata clone()); // or let json metadata = json!(metadata); let json string = json metadata to string(); // set with a json serialized payload ditto get small peer info() set metadata json string(json string); dart(beta) // coming soon