The problem with spam, is necessary the help
-
I assembled the stand:
- A sensor - Arduino Pro Mini, the sketch DimmableLEDActuator
- Gateway - Arduino Pro Mini + CP2104 Serial Converter
- the controler - Raspberry Pi + the scripts on Python and PHP
Library of version 1.4
During tests from a Sensor data come to a Gateway without problems.
But when I send a request of data from the controler for a sensor, spam starts pouring continuously, I won't reboot a sensor or a Gateway yet.When I change a line in MyConfig.h on:
//#define DEBUG
After the first sending data from a Sensor in a Gateway spam begins.
LOG:
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=2,pt=2,l=2:0 - Sensor: send data
15;2;1;0;2;0
0;0;3;0;9;send: 0-0-15-15 s=2,c=1,t=3,pt=0,l=1,st=ok:0 - Gateway: send 15;2;1;0;3;0\n
0;0;3;0;9;read: 0-1-15 s=2,c=1,t=3,pt=0,l=1:0
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=3,pt=2,l=2:17
15;2;1;0;3;17 - Gateway: received data OK
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=2,pt=2,l=2:1 - Sensor: send data
15;2;1;0;2;1
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=3,pt=2,l=2:17 - SPAM!!!!
15;2;1;0;3;17
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=3,pt=2,l=2:17
15;2;1;0;3;17
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=3,pt=2,l=2:17
15;2;1;0;3;17
0;0;3;0;9;read: 15-15-0 s=2,c=1,t=3,pt=2,l=2:17
15;2;1;0;3;17
....
-
void incomingMessage(const MyMessage &message) {
if (message.type==V_LIGHT) {
// hek comment: Is this really nessesary?
gw.send( lightMsg.set(oldValue) );
}
if (message.type==V_DIMMER) {
// hek comment: Is this really nessesary?
gw.send( dimmerMsg.set(17) );
}
}
-
What happens if you update to the version I pushed yesterday to Github/master?
-
Thanks! With new version library such problem isn't present.
Spam isn't present