- Posts: 41
- Karma: 2
- Thank you received: 8
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);
}
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
}
}
}
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
Please Log in or Create an account to join the conversation.
//Auto-assignemnt of Node ID
//gw.begin(incomingMessage, AUTO, true)
//Hardcoded Node ID
gw.begin(incomingMessage, [MY NEW ID], true)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.