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) );
}
}
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login