Upgrade guide from v1 to v2
This is an upgrade guide to upgrade your Homie devices from v1 to v2.
New convention¶
The Homie convention has been revised to v2 to be more extensible and introspectable. Be sure to check it out.
API changes in the sketch¶
Homie.setFirmware(name, version)
must be replaced byHomie_setFirmware(name, version)
Homie.setBrand(brand)
must be replaced byHomie_setBrand(brand)
Homie.registerNode()
must be removed, nodes are now automagically registered- If you've enabled Serial logging,
Serial.begin()
must be called explicitely in your sketch - Remove the
HOMIE_OTA_MODE
in your event handler, if you have one - The
Homie.setNodeProperty()
signature changed completely. If you hadHomie.setNodeProperty(node, "property", "value", true)
, the new equivalent syntax isHomie.setNodeProperty(node, "property").setRetained(true).send("value")
. Note thesetRetained()
is not even required as messages are retained by default. - TODO