Hi,
How does this work when your gateway also have local sensors? I tried to merge the Humidity sensor (DHT11) with the SerialGateway but it seems that presentation is not called after uploading the sketch. This is what I have:
void setup() {
// Setup locally attached sensors
dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN);
metric = getConfig().isMetric;
}
void presentation() {
// Present locally attached sensors
sendSketchInfo("My Gateway", "1.0");
present(CHILD_ID_HUM, S_HUM);
present(CHILD_ID_TEMP, S_TEMP);
}
And the output is:
0;255;3;0;14;Gateway startup complete.
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
0;1;1;0;0;28.0
0;0;1;0;1;59.0
If I put the "present" lines at the setup() then I got the expected lines:
0;255;3;0;14;Gateway startup complete.
0;255;3;0;11;My Gateway
0;255;3;0;12;1.0
0;0;0;0;7;
0;1;0;0;6;
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
0;1;1;0;0;28.0
0;0;1;0;1;59.0
Is this expected or I missed something? I'm trying to use this gateway with homeassistant and it seems that homeassistant expect those presentation lines. There's a issue with the use of node "0" id too, but i should leave it to another topic.