No protocol version during PRESENTATION
-
Hi
I just upgraded all my sensors/gateway to the new version and I don't see protocol version of my sensors during PRESENTATION message.
It worked before (1.4.1)
I compiled my sketches using master.zip file in download sectionHere is full log of my controller (agocontrol) during temperature sensor startup:
=> 22:21:11 2015/08/05 RECEIVING: 0/0;INTERNAL;0;I_LOG_MESSAGE;read: 110-110-0 s=255,c=0,t=17,pt=0,l=3,sg=0:1.5 => 22:21:11 2015/08/05 RECEIVING: 110/255;PRESENTATION;0;S_ARDUINO_NODE;1.5 => 22:21:11 2015/08/05 RECEIVING: 0/0;INTERNAL;0;I_LOG_MESSAGE;read: 110-110-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0 => 22:21:11 2015/08/05 RECEIVING: 110/255;INTERNAL;0;I_CONFIG;0 => 22:21:11 2015/08/05 SENDING: 110;255;3;0;6;M => 22:21:11 2015/08/05 RECEIVING: 0/0;INTERNAL;0;I_LOG_MESSAGE;send: 0-0-110-110 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M => 22:21:13 2015/08/05 RECEIVING: 0/0;INTERNAL;0;I_LOG_MESSAGE;read: 110-110-0 s=255,c=3,t=11,pt=0,l=18,sg=0:Temperature S => 22:21:13 2015/08/05 RECEIVING: 110/255;INTERNAL;0;I_SKETCH_NAME;Temperature Sensor => 22:21:13 2015/08/05 RECEIVING: 0/0;INTERNAL;0;I_LOG_MESSAGE;read: 110-110-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0 => 22:21:13 2015/08/05 RECEIVING: 110/255;INTERNAL;0;I_SKETCH_VERSION;1.0 => 22:21:13 2015/08/05 RECEIVING: 0/0;INTERNAL;0;I_LOG_MESSAGE;read: 110-110-0 s=0,c=0,t=6,pt=0,l=0,sg=0: => 22:21:13 2015/08/05 RECEIVING: 110/0;PRESENTATION;0;S_TEMP;
As you can see S_ARDUINO_NODE reports (line2) its version 1.5 but the S_TEMP presentation (last line) reports nothing in payload.
The only sensor that reports correctly its version is the repeater node.Here is my sketch:
#include <MySensor.h> #include <SPI.h> #include <DallasTemperature.h> #include <OneWire.h> #define TIMEOUT 600000 //10 minutes #define ONE_WIRE_BUS 4 // Pin where dallase sensor is connected unsigned long SLEEP_TIME = 150000; // Sleep time between reads (in milliseconds) OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); MySensor gw; // Initialize temperature message MyMessage msg(0,V_TEMP); void setup() { // Startup OneWire sensors.begin(); // Startup and initialize MySensors library. Set callback for incoming messages. gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Temperature Sensor", "1.0"); gw.present(0, S_TEMP); } void loop() { // Process incoming messages (like config from server) gw.process(); // Fetch and round temperature to one decimal float temperature = static_cast<float>(static_cast<int>(sensors.getTempCByIndex(0)) * 10.) / 10.; sensors.requestTemperatures(); gw.send(msg.set(temperature,1)); //sleep gw.sleep(SLEEP_TIME); }
Is this an issue or I missed something?
Thank you for your help.
Tang
-
gw.present(0, S_TEMP);
Version is only sent to the S_ARDUINO_NODE now.
The present() method now supports a 3rd argument, a device title which will show instead of version if controller supports it.
E.g.
gw.present(0, S_TEMP, "Temp Living Room");
-
Ok thanks for the precision