Elimination of bugs
-
pzygmunt
- Posts: 20302
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
- Been thanked: 59 times
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
SUPLA.... Nareszcie w domu.
-
pzygmunt
- Posts: 20302
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
- Been thanked: 59 times
.... 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
SUPLA.... Nareszcie w domu.
-
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
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;
}
}
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;
}
}
-
AnatoliyRome
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
Yes ! reboot after Connection fail. Server: svr2.supla.org
