Skip to content

Commit 029adc7

Browse files
committed
push configurable params to device shadow in examples
1 parent a5629f9 commit 029adc7

File tree

12 files changed

+93
-9
lines changed

12 files changed

+93
-9
lines changed

examples/ESP32/ActionsHandling/ActionsHandling.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,14 @@ void setup() {
9292

9393
setupWifi();
9494
syncTimeFromNtp();
95-
95+
96+
// setting up the device info i.e to be seen in the device shadow
97+
Bytebeam.status = "Device is Up!";
98+
Bytebeam.softwareType = "actions-handling-ino";
99+
Bytebeam.softwareVersion = "1.0.0";
100+
Bytebeam.hardwareType = "ESP32 Dev Module";
101+
Bytebeam.hardwareVersion = "rev1";
102+
96103
// begin the bytebeam client
97104
if(!Bytebeam.begin()) {
98105
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/BasicOTA/BasicOTA.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ void setup() {
6060

6161
setupWifi();
6262
syncTimeFromNtp();
63-
63+
64+
// setting up the device info i.e to be seen in the device shadow
65+
Bytebeam.status = "Device is Up!";
66+
Bytebeam.softwareType = "basic-wifi-ota-ino";
67+
Bytebeam.softwareVersion = "1.0.0";
68+
Bytebeam.hardwareType = "ESP32 Dev Module";
69+
Bytebeam.hardwareVersion = "rev1";
70+
6471
// begin the bytebeam client
6572
if(!Bytebeam.begin()) {
6673
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/BasicOTA_GSM/BasicOTA_GSM.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ void setup() {
129129

130130
setupModem();
131131
syncTimeFromNtp();
132-
132+
133+
// setting up the device info i.e to be seen in the device shadow
134+
Bytebeam.status = "Device is Up!";
135+
Bytebeam.softwareType = "basic-gsm-ota-ino";
136+
Bytebeam.softwareVersion = "1.0.0";
137+
Bytebeam.hardwareType = "ESP32 Dev Module";
138+
Bytebeam.hardwareVersion = "rev1";
139+
133140
// begin the bytebeam client
134141
if(!Bytebeam.begin(&modem)) {
135142
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/CloudLogging/CloudLogging.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,14 @@ void setup() {
9595

9696
setupWifi();
9797
syncTimeFromNtp();
98-
98+
99+
// setting up the device info i.e to be seen in the device shadow
100+
Bytebeam.status = "Device is Up!";
101+
Bytebeam.softwareType = "cloud-logging-ino";
102+
Bytebeam.softwareVersion = "1.0.0";
103+
Bytebeam.hardwareType = "ESP32 Dev Module";
104+
Bytebeam.hardwareVersion = "rev1";
105+
99106
// begin the bytebeam client
100107
if(!Bytebeam.begin()) {
101108
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/EspTouch/EspTouch.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ void setup() {
131131

132132
setupWifi();
133133
syncTimeFromNtp();
134-
134+
135+
// setting up the device info i.e to be seen in the device shadow
136+
Bytebeam.status = "Device is Up!";
137+
Bytebeam.softwareType = "esp-touch-ino";
138+
Bytebeam.softwareVersion = "1.0.0";
139+
Bytebeam.hardwareType = "ESP32 Dev Module";
140+
Bytebeam.hardwareVersion = "rev1";
141+
135142
// begin the bytebeam client
136143
if(!Bytebeam.begin()) {
137144
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/PublishChipTemperature/PublishChipTemperature.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ void setup() {
131131

132132
setupWifi();
133133
syncTimeFromNtp();
134-
134+
135+
// setting up the device info i.e to be seen in the device shadow
136+
Bytebeam.status = "Device is Up!";
137+
Bytebeam.softwareType = "publish-chip-temp-ino";
138+
Bytebeam.softwareVersion = "1.0.0";
139+
Bytebeam.hardwareType = "ESP32 Dev Module";
140+
Bytebeam.hardwareVersion = "rev1";
141+
135142
// begin the bytebeam client
136143
if(!Bytebeam.begin()) {
137144
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/PushData/PushData.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ void setup() {
124124

125125
setupWifi();
126126
syncTimeFromNtp();
127-
127+
128+
// setting up the device info i.e to be seen in the device shadow
129+
Bytebeam.status = "Device is Up!";
130+
Bytebeam.softwareType = "push-data-ino";
131+
Bytebeam.softwareVersion = "1.0.0";
132+
Bytebeam.hardwareType = "ESP32 Dev Module";
133+
Bytebeam.hardwareVersion = "rev1";
134+
128135
// begin the bytebeam client
129136
if(!Bytebeam.begin()) {
130137
Serial.println("Bytebeam Client Initialization Failed.");

examples/ESP32/SetupClient/SetupClient.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ void setup() {
6868
// Your other application setup stuff goes here
6969
//
7070

71+
// setting up the device info i.e to be seen in the device shadow
72+
Bytebeam.status = "Device is Up!";
73+
Bytebeam.softwareType = "setup-wifi-client-ino";
74+
Bytebeam.softwareVersion = "1.0.0";
75+
Bytebeam.hardwareType = "ESP32 Dev Module";
76+
Bytebeam.hardwareVersion = "rev1";
77+
7178
// This method will initialize and start the bytebeam client
7279
// You can over-ride the default file system, file name and library logging options, if needed
7380
// eg. Bytebeam.begin(BytebeamArduino::LITTLEFS_FILE_SYSTEM, "/my_device_config.json", BytebeamLogger::LOG_INFO)

examples/ESP32/SetupClient_GSM/SetupClient_GSM.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ void setup() {
137137
// Your other application setup stuff goes here
138138
//
139139

140+
// setting up the device info i.e to be seen in the device shadow
141+
Bytebeam.status = "Device is Up!";
142+
Bytebeam.softwareType = "setup-gsm-client-ino";
143+
Bytebeam.softwareVersion = "1.0.0";
144+
Bytebeam.hardwareType = "ESP32 Dev Module";
145+
Bytebeam.hardwareVersion = "rev1";
146+
140147
// This method will initialize and start the bytebeam client
141148
// You can over-ride the default file system, file name and library logging options, if needed
142149
// eg. Bytebeam.begin(BytebeamArduino::LITTLEFS_FILE_SYSTEM, "/my_device_config.json", BytebeamLogger::LOG_INFO)

examples/ESP32/ToggleLED/ToggleLED.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ void setup() {
168168

169169
// setup the gpio led
170170
setupLED();
171-
171+
172+
// setting up the device info i.e to be seen in the device shadow
173+
Bytebeam.status = "Device is Up!";
174+
Bytebeam.softwareType = "toggle-led-ino";
175+
Bytebeam.softwareVersion = "1.0.0";
176+
Bytebeam.hardwareType = "ESP32 Dev Module";
177+
Bytebeam.hardwareVersion = "rev1";
178+
172179
// begin the bytebeam client
173180
if(!Bytebeam.begin()) {
174181
Serial.println("Bytebeam Client Initialization Failed.");

0 commit comments

Comments
 (0)