Skip to content

Commit 8f49ef4

Browse files
authored
Merge pull request #11 from oracle-devrel/iot
Iot core demo
2 parents e8f3051 + fcfbdbd commit 8f49ef4

38 files changed

Lines changed: 2120 additions & 129 deletions

IoTSonnenUploader/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/.project
55
/.factorypath
66
/.classpath
7+
/OCISetup/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/jq-notes.txt
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
These files defint the various elements of the digital twin process for the Oracle IoT cloud service
2+
They are written in the Digital Twin Definition Language v3 (DTDLv3)- see the specification at https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v3/DTDL.Specification.v3.md
3+
Identifiers are based on the Digital Twin Modeling Identifier (DTMI) - see https://github.com/Azure/opendigitaltwins-dtdl/tree/master/DTMI
4+
Items that do not use a full DTMI identifier are the elements defined in standard schemas at https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v3/DTDL.Specification.v3.md#standard-schemas
5+
Note that the context may use extentions, see the list of extensions at https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v3/DTDL.v3.md#language-extensions
6+
7+
the reference data for the configuration is
8+
{"softwareVersion":"1.18.4","timeOfUseSchedule":"[{\"start\":\"23:30\",\"stop\":\"00:00\",\"threshold_p_max\":22500},{\"start\":\"00:00\",\"stop\":\"05:30\",\"threshold_p_max\":20000}]","timestamp":"2025-11-18T16:47:32.900336Z[Europe/London]"}
9+
10+
the reference data for the status is
11+
{"consumptionAvgWattsLastMinute":339,"consumptionWattsPointInTime":333,"currentBatteryCapacityPercentage":59,"currentBatteryCapacitySystemPercentage":62,"gridConsumptionWattsPointInTime":41,"operatingMode":2,"remainingBatteryCapacityWattHours":9102,"reservedBatteryCapacityPercentage":5,"solarProductionWattsPointInTime":131,"time":1763981430279,"timestamp":"2025-11-24T10:50:30.279369Z[Europe/London]","batteryCharging":false,"batteryDischarging":true}
12+
13+
Note that these will be updated over time. to get this data use a loval mqtt server and set the property mqtt.monitorreference.enabled to true (if missing it defaults to false.
14+
Then as the status and configuration are published they wil be displayed as the contents string
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
{
2+
"@context": [
3+
"dtmi:dtdl:context;3",
4+
"dtmi:dtdl:extension:historization;1",
5+
"dtmi:dtdl:extension:quantitativeTypes;1",
6+
"dtmi:com:oracle:dtdl:extension:validation;1"
7+
],
8+
"@id": "dtmi:com:oracle:demo:timg:iot:homebattery;1",
9+
"@type": "Interface",
10+
"contents": [
11+
{
12+
"@type": [
13+
"Telemetry",
14+
"Historized"
15+
],
16+
"displayName": "Status Data timestamp",
17+
"name": "StatusTimestamp",
18+
"schema": "dateTime"
19+
},
20+
{
21+
"@type": [
22+
"Telemetry",
23+
"Historized"
24+
],
25+
"displayName": "Battery Operating Mode",
26+
"name": "OperatingMode",
27+
"schema": "string"
28+
},
29+
{
30+
"@type": [
31+
"Telemetry",
32+
"Historized",
33+
"Validated"
34+
],
35+
"displayName": "Current Battery Charge Percentage",
36+
"name": "CurrentChargePercentage",
37+
"schema": "integer",
38+
"minimum": 0,
39+
"maximum": 100
40+
},
41+
{
42+
"@type": [
43+
"Telemetry",
44+
"Historized",
45+
"Validated"
46+
],
47+
"displayName": "Reserved Battery Charge Percentage",
48+
"name": "ReservedChargePercentage",
49+
"schema": "integer",
50+
"minimum": 0,
51+
"maximum": 100
52+
},
53+
{
54+
"@type": [
55+
"Telemetry",
56+
"Historized",
57+
"Energy"
58+
],
59+
"displayName": "Remaining Power In Battery",
60+
"name": "CapacityRemaining",
61+
"schema": "integer",
62+
"unit": "wattHour"
63+
},
64+
{
65+
"@type": [
66+
"Telemetry",
67+
"Historized"
68+
],
69+
"displayName": "Battery Is Charging",
70+
"name": "BatteryCharging",
71+
"schema": "string"
72+
},
73+
{
74+
"@type": [
75+
"Telemetry",
76+
"Historized"
77+
],
78+
"displayName": "Battery Is Discharging",
79+
"name": "BatteryDischarging",
80+
"schema": "boolean"
81+
},
82+
{
83+
"@type": [
84+
"Telemetry",
85+
"Historized",
86+
"EnergyRate"
87+
],
88+
"displayName": "Battery Power Supplied 1 min average",
89+
"name": "DischargeRateAvgLastMinute",
90+
"schema": "integer",
91+
"unit": "watt"
92+
},
93+
{
94+
"@type": [
95+
"Telemetry",
96+
"Historized",
97+
"EnergyRate"
98+
],
99+
"displayName": "Battery Power Supplied Point In Time",
100+
"name": "DischargePower",
101+
"schema": "integer",
102+
"unit": "watt"
103+
},
104+
{
105+
"@type": [
106+
"Telemetry",
107+
"Historized",
108+
"EnergyRate"
109+
],
110+
"displayName": "Grid Consumption Point In Time",
111+
"name": "GridFlowPointInTime",
112+
"schema": "integer",
113+
"unit": "watt"
114+
},
115+
{
116+
"@type": [
117+
"Telemetry",
118+
"Historized",
119+
"EnergyRate"
120+
],
121+
"displayName": "Solar Power Production Point In Time",
122+
"name": "SolarGeneration",
123+
"schema": "integer",
124+
"unit": "watt"
125+
},
126+
{
127+
"@type": [
128+
"Telemetry",
129+
"Historized"
130+
],
131+
"displayName": "Configuration Data timestamp",
132+
"name": "ConfigurationTimestamp",
133+
"schema": "dateTime"
134+
},
135+
{
136+
"@type": [
137+
"Telemetry"
138+
],
139+
"displayName": "Software Version",
140+
"name": "SoftwareVersion",
141+
"schema": "string"
142+
},
143+
{
144+
"@type": [
145+
"Telemetry"
146+
],
147+
"displayName": "Time Of Use Schedule",
148+
"name": "TimeOfUseSchedule",
149+
"schema": "string"
150+
},
151+
{
152+
"@type": [
153+
"Telemetry"
154+
],
155+
"displayName": "Command Demo Placeholder",
156+
"name": "CommandDemoPlaceholder",
157+
"schema": "string"
158+
}
159+
]
160+
}

0 commit comments

Comments
 (0)