V_LIGHT - Error sendRoute. Route node not found

6 years 2 months ago #1895 by hjfabius
Hi,
for couple of weeks I'm playing with Arduino, nRF24 and different sensors.
I found the EasyIoT framework very appealing and so far I didn't had any problem.
I was able to create 3 different notes. Each one with PIR, temperature and humidity.

I'm now adding to one of the node an additional sensor: an IR transmitter to turn on and off my led strip.
I used as basis this example:
www.mysensors.org/build/ir


My setup on arduino is:
void setup()  
{ 
  gw.begin(mySensorsIncomingMessage);
  dht.setup(DIGITAL_INPUT_DHT_SENSOR, dht.DHT11); 
  pinMode(DIGITAL_INPUT_PIR_SENSOR, INPUT);      /

  // Send the Sketch Version Information to the Gateway
  gw.sendSketchInfo("EASYIOT_TEMP_PIR_IR", "4.0");

  // Register all sensors to gw (they will be created as child devices)
  gw.present(CHILD_ID_HUM, S_HUM);
  gw.present(CHILD_ID_TEMP, S_TEMP);
  gw.present(CHILD_ID_PIR, S_MOTION);
  gw.present(CHILD_ID_IR_TX, S_LIGHT);
}

while my interrupt is:
void mySensorsIncomingMessage(const MyMessage &message) 
{
  Serial.println("Message from gateway received.");
  if (message.type==V_LIGHT) 
  {
     int intMessageValue = message.getInt();
     if (intMessageValue == 1) 
     {
           Serial.println("Led Strip - On");
           irsend.send(NEC,0xF7C03F, 32);   //Led Strip - On
     } 
     else 
     {
           Serial.println("Led Strip - Off");
           irsend.send(NEC,0xF740BF, 32); //Led Strip - Off
     }
  }
}

I was easily able to register the new node. the 4 sensors has been captures by EasyIoT.: Humidity, Temperature, PIR and IR (Digital Output - N0S3).

Now, when from the WebInterface I select Node N0S3 switch and I click either ON or OFF, in the EasyIot log I've
2015-07-06T23:51:10.4069180+02:00       INFO    EasyIoTWebinterface     EasyIoTControl  Module  MySensors       /Api/EasyIoT/Control/Module/MySensors/N0S3/ControlOn//
2015-07-06T23:51:10.4277610+02:00       DEBUG   MySensors                               Send address:N0S3, property:Sensor.DigitalValue, value:1
2015-07-06T23:51:10.4356710+02:00       ERROR   MySensors                               Error sendRoute. Route node not found

and obviously nothing is captured on Arduino side.
Any suggestion for the investigation?

Please Log in or Create an account to join the conversation.

6 years 2 months ago #1898 by hjfabius
Hi,
finally I make it. I tried several time to remove the node and re-add it without success.
I finally re-burn my sensor hardcoding a new Node ID in the sutup of the gateway
   //Auto-assignemnt of Node ID
   //gw.begin(incomingMessage, AUTO, true) 

   //Hardcoded Node ID
   gw.begin(incomingMessage, [MY NEW ID], true) 

Once added, all the components start to work without any problem.

Please Log in or Create an account to join the conversation.

5 years 1 month ago #3440 by jl277013
Wow! Good call on the hard coding of the Node ID to get this to work. My test RelayActuator would not show any incoming traffic in the debug messages of the serial output. The node was AUTO assigned N0S0 and I changed it to N10S0. That did the trick! There must be a serious bug somewhere. I looked at the ./config directory in the Gateway as well as the EasyIoTDatabase.sqlite and I did not see any odd references remaining to N0S0. I was thinking some form of corrupt data was the issue, but perhaps it is code level?

Please Log in or Create an account to join the conversation.

Time to create page: 0.234 seconds