《zds2023-thingset-jaeger.pdf》由會員分享,可在線閱讀,更多相關《zds2023-thingset-jaeger.pdf(28頁珍藏版)》請在三個皮匠報告上搜索。
1、ThingSet+Zephyr:Transport-Agnostic DeviceConnectivity Within 10 MinutesMartin Jger-Libre SolarJune 27,2023#EMBEDDEDOSSUMMITData Flows in Embedded DevicesMobile AppFlash/EEPROMDeviceMCUCloudSensor dataActuator controlLog dataTest interfaceCalibration parameters2/16Data Flows in Embedded DevicesMobile
2、 AppFlash/EEPROMDeviceMCUCloudSensor dataActuator controlLog dataTest interfaceCalibration parametersMobile AppFlash/EEPROMDeviceMCUCloudSensor dataActuator controlLog dataTest interfaceCalibration parametersUserDeveloperManufacturer2/16Agenda1.Semantic Data Model2.ThingSet Protocol3.Transports&Mapp
3、ings4.Zephyr Integration5.Demo Time!6.Roadmap and Outlook3/16Example ApplicationA thermostat in Prague at sunsetby Stable Diffusion4/16Example ApplicationA thermostat in Prague at sunsetby Stable DiffusionMeasuredtemperatureTargetTemperatureHeateron/off4/16 pNodeID:C001CAFE01234567,#data item pNodeN
4、ame:Smart Thermostat,Sensor:#group rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:#subset Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:#overlay mLive:sEnable:true,sInterval_s:1 Semantic Data Model5/16 pNodeID:C001CAFE01234567,#
5、data item pNodeName:Smart Thermostat,Sensor:#group rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:#subset Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:#overlay mLive:sEnable:true,sInterval_s:1 Semantic Data ModelMain Objectives
6、5/16 pNodeID:C001CAFE01234567,#data item pNodeName:Smart Thermostat,Sensor:#group rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:#subset Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:#overlay mLive:sEnable:true,sInterval_s:1 Sem
7、antic Data ModelMain ObjectivesSchema-less and self-explanatory:All essentialinformation can be retrieved from the device itself.5/16 pNodeID:C001CAFE01234567,#data item pNodeName:Smart Thermostat,Sensor:#group rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLi
8、ve:#subset Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:#overlay mLive:sEnable:true,sInterval_s:1 Semantic Data ModelMain ObjectivesSchema-less and self-explanatory:All essentialinformation can be retrieved from the device itself.Easy to use and human-readable(JSON in tex
9、t mode).5/16 pNodeID:C001CAFE01234567,#data item pNodeName:Smart Thermostat,Sensor:#group rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:#subset Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:#overlay mLive:sEnable:true,sInterval
10、_s:1 Semantic Data ModelMain ObjectivesSchema-less and self-explanatory:All essentialinformation can be retrieved from the device itself.Easy to use and human-readable(JSON in text mode).Compact footprint(CBOR and numeric IDs in binarymode).5/16Data ItemsPrefixDescriptioncconstant itemrread-only ite
11、mwwrite-able itemsstored itempprotected itemttimestampxexecutable itemSubsetsPrefixDescriptionaattribute subseteevent subsetmmetrics subsetGroups and OverlaysNo prefix,starting with upper-case letter.Data Object Prefixes6/16Message layout +-+-+-+byte|0|1.n|n+1.m|+-+-+-+|function|endpoint|CBOR/JSON|c
12、ode|/status|payload|+-+-+-+Report/Desire function codesTextBinaryDescription0 x1DDesire#0 x1FReportRequest/Response function codesTextBinaryDescription?0 x01/0 x05GET/FETCH=0 x07UPDATE+0 x06CREATE-0 x04DELETE!0 x02EXEC:0 x80-0 xFFResponse+codeAccess Protocol7/16 pNodeID:C001CAFE01234567,pNodeName:Sm
13、art Thermostat,Sensor:rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:mLive:sEnable:true,sInterval_s:1 GET all Sensor values:?Sensor:85 rRoomTemp_degC:18.3,rHumidity_pct:60.2UPDATE ta
14、rget temperature:=Control sTargetTemp_degC:20:84DELETE humidity sensor from live metricssubset:-mLive Sensor/rHumidity_pct:82Request/Response Examples8/16 pNodeID:C001CAFE01234567,pNodeName:Smart Thermostat,Sensor:rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,
15、mLive:Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:mLive:sEnable:true,sInterval_s:1 Report of Sensor group:#Sensor rRoomTemp_degC:18.3,rHumidity_pct:60.2Report of live metrics subset:#mLive Sensor:rRoomTemp_degC:18.3,rHumidity_pct:60.2,Control:rHeaterOn:trueDesire to chan
16、ge target temperature:Control sTargetTemp_degC:20Report/Desire Examples9/16Network TopologyDeviceDeviceGatewayState DBMobile App.DeviceBluetoothDeviceGatewayMQTTBrokerTime SeriesDatabaseGrafanaThingSet BackendSerial/CAN/LoRaWANIP networkWebSocketServerDeviceDevice.Modbus/.WebFrontendThingSet NodeFor
17、eign Protocol/Service IntegrationCoAPServiceGatewayDesktopApp/CLISerial/CANNative ThingSet Service/ApplicationDirection to initiate connection10/16TransportsMessage-oriented,bi-directional and reliablecommunication channels to exchangeThingSet messages transparently.WebSocketCAN(with ISO-TP)Serial(w
18、ith optional CRC)Bluetooth LE(with packetization)SMSTransports&Mappings11/16TransportsMessage-oriented,bi-directional and reliablecommunication channels to exchangeThingSet messages transparently.WebSocketCAN(with ISO-TP)Serial(with optional CRC)Bluetooth LE(with packetization)SMSMappingsThingSet me
19、ssages are translated into thenative format required by the protocol.Not allfeatures of ThingSet may be supported.MQTTLoRaWANCoAPTransports&Mappings11/16Firmware ModulesThingSet node libThingSet SDKApplicationzcborZephyr RTOS:Peripherals&CommsZephyr Integration12/16Firmware ModulesThingSet node libT
20、hingSet SDKApplicationzcborZephyr RTOS:Peripherals&CommsUsed Zephyr featuresIterable SectionsWork queuesPeripheral driversUART/USB serialCAN&ISO-TPBluetoothShell subsystemCustom logger backend.Zephyr Integration12/16Zephyr RTOS v3.4Nordic nRF52840 DKBosch BME680 SensorThingSet App(Flutter)Demo Time!
21、13/16 pNodeID:C001CAFE01234567,pNodeName:Smart Thermostat,Sensor:rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:mLive:sEnable:true,sInterval_s:1 Summary14/16 pNodeID:C001CAFE01234567
22、,pNodeName:Smart Thermostat,Sensor:rRoomTemp_degC:18.3,rHumidity_pct:60.2 ,Control:rHeaterOn:true,sTargetTemp_degC:22.0 ,mLive:Sensor/rRoomTemp_degC,Sensor/rHumidity_pct,Control/rHeaterOn ,_Reporting:mLive:sEnable:true,sInterval_s:1 Data Model+ThingSet Zephyr SDK=Summary14/16Roadmap and Outlook1.Rel
23、ease v1.0 spec till end of 202315/16Roadmap and Outlook1.Release v1.0 spec till end of 20232.Grow a community around ThingSet15/16Roadmap and Outlook1.Release v1.0 spec till end of 20232.Grow a community around ThingSet3.Improve ThingSet SDK and app features15/16Roadmap and Outlook1.Release v1.0 spec till end of 20232.Grow a community around ThingSet3.Improve ThingSet SDK and app features4.Support for other programming languages15/16ContactMartin Jger|martinlibre.solar|LinkedInResourcesLibre Solar:libre.solar|