Elimination of bugs
Is your relay work with some time ? I hear two clicks. It looks like relay turn back to the base position after short time.
I my observation is right then you should send current state to the system using method
void channelValueChanged(int channel_number, char v);
v == 1 for hi and 0 for lo
But first you must move line
https://github.com/SUPLA/arduino/blob/m ... vice.h#L93
to public section... for example here
https://github.com/SUPLA/arduino/blob/m ... ice.h#L154
I my observation is right then you should send current state to the system using method
void channelValueChanged(int channel_number, char v);
v == 1 for hi and 0 for lo
But first you must move line
https://github.com/SUPLA/arduino/blob/m ... vice.h#L93
to public section... for example here
https://github.com/SUPLA/arduino/blob/m ... ice.h#L154
.... also try add debug lines here
https://github.com/SUPLA/arduino/blob/m ... e.cpp#L809
Serial.println(channel);
Serial.println(value);
Serial.println(DurationMS);
and try observ what happens
https://github.com/SUPLA/arduino/blob/m ... e.cpp#L809
Serial.println(channel);
Serial.println(value);
Serial.println(DurationMS);
and try observ what happens
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
The system works very well. This can be seen on the first video. Sometimes there is a failure. Failure I was able to simulate actions like on video 2 and 3. Thank you for your work
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
First video ( To understand where a double click) https://www.facebook.com/anatoly.antono ... 040930498/
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
Failure can occur without any intervention. Sory for my englisc
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
YEEES!!
if ( !Params.cb.svr_connect(Params.server, 2015) ) {
supla_log(LOG_DEBUG, "Connection fail. Server: %s", Params.server);
Params.cb.svr_disconnect();
delay(2000);
void(* resetFunc) (void) = 0; // Reset MC function
resetFunc(); //вызов
return;
}
}
if ( !Params.cb.svr_connect(Params.server, 2015) ) {
supla_log(LOG_DEBUG, "Connection fail. Server: %s", Params.server);
Params.cb.svr_disconnect();
delay(2000);
void(* resetFunc) (void) = 0; // Reset MC function
resetFunc(); //вызов
return;
}
}
Is your problem solved?
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
Yes ! reboot after Connection fail. Server: svr2.supla.org