It's not working.
Can I change also something in Config.h ?
It's not working.
Can I change also something in Config.h ?
Hello
I'm writing program for work with my waterpump.
If the waterlevel is rich I would to turn on relay and (maybe in background_ I would like to send information to domoticz.
Normally it works fine but if it a problem with connection to the gateway the program don't start...
I cut code about Pump to make it easy to understand . I should see in console: "PUMP WORK" and "START"
I get in console:
Starting sensor (RNNNA-, 2.0.0)
TSM:INIT
TSM:RADIO:OK
TSP:ASSIGNID:OK (ID=1)
TSM:FPAR
TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:FAIL
!TSM:FAILURE
TSM:PDT
My code:
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
// Enabled repeater feature for this node
//#define MY_REPEATER_FEATURE
#include <SPI.h>
#include <MySensors.h>
//#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
#define MY_TRANSPORT_DONT_CARE_MODE
#define CHILD_ID 1 // turn on pump
MyMessage msg(CHILD_ID,V_LIGHT);
void setup()
{
//Serial.begin(115200);
Serial.println(" START ");
}
void presentation() {
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Pump", "1.0");
// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID, S_LIGHT);
}
void loop() {
////......SOME CODE
Serial.println("PUMP WORK");
send(msg.set(true), true);
}