Skip to content

THING ID becomes optional, as DEVICE ID is solely used for topic identifcation #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ArduinoIoTCloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class ArduinoIoTCloudClass
void push();
bool setTimestamp(String const & prop_name, unsigned long const timestamp);

inline void setThingId (String const thing_id) { _thing_id = thing_id; };
inline String & getThingId () { return _thing_id; };
inline void setThingId (String const thing_id) { _thing_id = thing_id; } __attribute__((deprecated("It is no longer necessary to configure a THING ID.")));
inline String & getThingId () { return _thing_id; } __attribute__((deprecated("It is no longer necessary to configure a THING ID.")));
inline void setDeviceId(String const device_id) { _device_id = device_id; };
inline String & getDeviceId() { return _device_id; };

Expand Down
8 changes: 4 additions & 4 deletions src/ArduinoIoTCloudTCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
bool _ota_req;
#endif /* OTA_ENABLED */

inline String getTopic_shadowout() { return ( getThingId().length() == 0) ? String("") : String("/a/t/" + getThingId() + "/shadow/o"); }
inline String getTopic_shadowin () { return ( getThingId().length() == 0) ? String("") : String("/a/t/" + getThingId() + "/shadow/i"); }
inline String getTopic_dataout () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/e/o") : String("/a/t/" + getThingId() + "/e/o"); }
inline String getTopic_datain () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/e/i") : String("/a/t/" + getThingId() + "/e/i"); }
inline String getTopic_shadowout() { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/shadow/o") : String("/a/t/" + getThingId() + "/shadow/o"); }
inline String getTopic_shadowin () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/shadow/i") : String("/a/t/" + getThingId() + "/shadow/i"); }
inline String getTopic_dataout () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/e/o") : String("/a/t/" + getThingId() + "/e/o"); }
inline String getTopic_datain () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/e/i") : String("/a/t/" + getThingId() + "/e/i"); }

State handle_ConnectPhy();
State handle_SyncTime();
Expand Down