Elimination of bugs

User avatar
pzygmunt
Posts: 18324
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

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
User avatar
pzygmunt
Posts: 18324
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

.... 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
AnatoliyRome
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
AnatoliyRome
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/
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

I use a double-stable relay
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Failure can occur without any intervention. Sory for my englisc
AnatoliyRome
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;
}
}
User avatar
pzygmunt
Posts: 18324
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Is your problem solved?
AnatoliyRome
Posts: 47
Joined: Sat Mar 04, 2017 7:34 pm

Yes ! reboot after Connection fail. Server: svr2.supla.org
Post Reply

Return to “General discussion”