Presentation of local sensor with GatewayESP8266MQTTClient seems to fail
-
Hi MySensors,
I was doing some tests yesterday with an ESP8266-01 as an MQTT Client Gateway. Really impressive work from you Henrik and the rest of the team.
When trying to add a local sensor to the ESP8266MQTTClient Gatway, the Presentation part doesn't seems to work. Nothing is being sent to the MQTT Broker.
#include <ESP8266WiFi.h>
#include <MySensor.h>MyMessage msg(1,V_TRIPPED);
void setup() {
}void presentation() {
// Present locally attached sensors here
sendSketchInfo("Test", "1.0");
present(1, S_DOOR);
}If I add the same commands to the loop they're being sent forward to the Broker.
void loop() {
// Present locally attached sensors here
sendSketchInfo("Test", "1.0");
present(1, S_DOOR);
wait(5000);
}I'm using ESP8266-01 for my tests without any radio (NRF24L01/RFM69) attached.
The rest is working great, so far.// Enables and select radio type (if attached)
//#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69I'm using the development branch, and it's up-to date.
-
Hmm.. that has probably been forgotten for the MQTT client gateway...
Could you try adding:
if (presentation) presentation();
-
@hek
Yes, that fixed the issue. Thanks.
Suggested Topics
-
Code for beta-testing?
Controllers • 24 Mar 2014, 20:48 • andriej 9 Aug 2014, 10:44 -
Missing "__libc_init_array();" wenn using samd without USB
Bug Reports • 6 Jul 2022, 08:36 • ltigges 7 Jul 2022, 22:43 -
ACK -aka ECHO beeing missed by Serial Gateway with RF24 radios. V2.3.2
Bug Reports • 15 Apr 2023, 06:27 • GaryStofer 21 Apr 2023, 17:34 -
Boards esp8266 v3.1.0 or Newer Doesn't Work with MySensors
Bug Reports • 21 Feb 2023, 01:55 • d-smes 25 Feb 2023, 19:37 -
sleep(0) in V2.1 doesn't sleep indefinitely anymore. Used to powerdown and sleep in V1.5
Bug Reports • 22 Nov 2019, 00:35 • GaryStofer 15 Apr 2023, 05:50 -
Making WiFiManager compatible with MySensors 2.3.2
Bug Reports • 12 Feb 2020, 21:43 • pihome 1 Jun 2022, 16:02