Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SAM Element authored Jun 21, 2019
1 parent 9f81437 commit b75a5e7
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions examples/WirelessDoorBell_Toyosaki/WirelessDoorBell_Toyosaki.ino
Original file line number Diff line number Diff line change
Expand Up @@ -119,27 +119,27 @@ void initPublish()
{
if (client.connected())
{
client.publish(MQTT::Publish(obj.constructTopic("$state"), "init").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$sammy"), "1.0.0").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$name"), "Wireless Bell").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$model"), "SAM-WDB01").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$mac"), WiFi.macAddress()).set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$localip"), WiFi.localIP().toString()).set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$fw/name"), "WDB01").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$fw/version"), "1.00").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$reset"), "true").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$restart"), "true").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$nodes"), "bell").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$state"), "init").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$sammy"), "1.0.0").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$name"), "Wireless Bell").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$model"), "SAM-WDB01").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$mac"), WiFi.macAddress()).set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$localip"), WiFi.localIP().toString()).set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$fw/name"), "WDB01").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$fw/version"), "1.00").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$reset"), "true").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$restart"), "true").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("$nodes"), "bell").set_retain(false).set_qos(1));

//define node "bell"
client.publish(MQTT::Publish(obj.constructTopic("bell/$name"), "Bell").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/$type"), "Bell-01").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/$properties"), "button").set_retain().set_qos(1));

client.publish(MQTT::Publish(obj.constructTopic("bell/button/$name"), "Bell Button").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/button/$settable"), "true").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/button/$retained"), "false").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/button/$datatype"), "boolean").set_retain().set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/$name"), "Bell").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/$type"), "Bell-01").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/$properties"), "button").set_retain(false).set_qos(1));

client.publish(MQTT::Publish(obj.constructTopic("bell/button/$name"), "Bell Button").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/button/$settable"), "true").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/button/$retained"), "false").set_retain(false).set_qos(1));
client.publish(MQTT::Publish(obj.constructTopic("bell/button/$datatype"), "boolean").set_retain(false).set_qos(1));
}
}

Expand Down

0 comments on commit b75a5e7

Please sign in to comment.