Search

Register

Thanks for signing-up! You will receive an email with further instructions to activate your account!

username already taken
You already have an account? .

Login

Forgot password?
Don't have an account yet? Register now for using the UI-Designer and the forum or creating projects.
Login to create topics and posts!



Possible BUG with UDP and event based commands

#1 Nov. 15, 2018 00:04:44 by bimbo385

Possible BUG with UDP and event based commands

Hi,

I have discovered the following issue.

https://netioapp.com/editor?config=33705

The example just contains two switches with an UDP event based connection.
It is running on my Huawei Android 7.0 Tablet. The counterpart (for testing) is my Win 10 Notebook running Hercules.

When I switch one of the switches on the tablet I always receive the corresponding string (e.g. SWA 0).

But when I send something always the first command after touching an item on the tablet is ignored. The second command and all the following are recognized well.

An example:
Hercules is running on UDP Tab, listening to the correct IP and Port of my tablet.
I turn on the NetIO App
Switch a switch and the corresponding string is received by Hercules
“SWA 1” was the last string sent, and the upper switch is on
I send “SWA 0<LF>” by hercules and nothing happened
I send the same string again and the upper switch turns off
Now I send “SWA 1<LF>” and the switch turns on again
I send “SWA 0<LF>” again and the switch becames off
Now I turn the switch on on the tablet
Wait some seconds
I send “SWA 0<LF>” again and the switch won't turn off
I send “SWA 0<LF>” a second time and the switch turns off.


Maybe that could be a problem with a string buffer in your app or something like that. Could you please check it?

Best,
Bimbo385

#2 Nov. 21, 2018 21:51:21 by bimbo385

Possible BUG with UDP and event based commands

Could I get any support here or is this not supported anymore?

The Android App is not cheap and this might be a real bug in the app…

Best,
Bimbo385

#3 Nov. 21, 2018 22:51:53 by mcgiver0510

Possible BUG with UDP and event based commands

Kalle and I are the only ones here to answer any questions at the moment. But since we are just users - we can't know everything about the APP.
But the Andoid version works fine.
To judge what doesn't work for you -
you would have to post the NetIO-Config and the program - here in the attachment.

The IOS version of the APP has BUGS.

lg
kalli

#4 Nov. 22, 2018 00:42:34 by mcgiver0510

Possible BUG with UDP and event based commands

now I have tested the switch under android with my TCP server.

it works absolutely correctly.

I think that you have an error in your program or your NetIO config.
If you have Python on your computer I can provide you with a working NetIO config and a TCP server.
But I only work with Linux - whether the server runs under Windows - don't know.

But Kalle will test him.

lg
kalli

Edited mcgiver0510 (Nov. 22, 2018 15:50:19)

#5 Nov. 22, 2018 21:11:02 by bimbo385

Possible BUG with UDP and event based commands

Hey, this is the json config:

{
"type": "NetIOConfiguration",
"version": 2,
"connections": [
{
"name": "Yoga",
"host": "192.168.164.134",
"port": 16491,
"protocol": "udp",
"timeout": "3.0",
"format": "string",
"sendTermination": "\n",
"receiveTermination": "\n",
"eventBased": true
}
],
"pages": [
{
"name": "page",
"label": "page",
"connection": "Yoga",
"fitToScreen": true,
"items": [
{
"top": 20,
"left": 20,
"width": 120,
"height": 50,
"type": "switch",
"onValue": "1",
"onSend": "SWA 1",
"offSend": "SWA 0",
"offColor": "45,45,45",
"onColor": "65,65,65",
"knobColor": "55,55,55",
"offValue": "0",
"requiresSendReponse": false,
"parseResponse": "(?<=SWA ).*",
"formatResponse": "{0}",
"connection": "Yoga"
},
{
"top": 100,
"left": 20,
"width": 120,
"height": 50,
"type": "switch",
"onValue": "1",
"onSend": "SWB 1",
"offSend": "SWB 0",
"offColor": "45,45,45",
"onColor": "65,65,65",
"knobColor": "55,55,55",
"offValue": "0",
"requiresSendReponse": false,
"parseResponse": "(?<=SWB ).*",
"formatResponse": "{0}",
"connection": "Yoga"
}
],
"width": 320,
"height": 480
}
],
"device": "iPhone",
"orientation": "portrait",
"name": "UDP test",
"description": "this is an empty configuration for starting from scratch",
"navigation": "fix",
"pagebuttonwidth": "static",
"style": "flat",
"theme": "dark",
"preventSleep": false,
"switchOnSwipe": true
}

I don't use a self written program on the other side. https://www.hw-group.com/software/hercules-setup-utility is a terminal tool for network connections. So you can see exactly what is sent and received.

LG,
Bimbo385

LG? Wir können uns auch gerne auf Deutsch unterhalten

Edit: I've made a second test with my Smartphone (Samsung Galaxy S7), same result. After touching/changing a button on the smartphone the next UDP command from the PC is ignored.

Edited bimbo385 (Nov. 22, 2018 21:23:58)

Attachments:
attachment UDP test.json (1.6 KB)

#6 Nov. 23, 2018 02:58:00 by mcgiver0510

Possible BUG with UDP and event based commands

Hi,
habe nun deine Config mit PacketSender ausprobiert.
PacketSender gibt es für Linux und Windows.

Deine Config funktioniert meiner Meinung nach einwandfrei.

Das Phänomen - welches du oben beschreibst konnte ich nachvollziehen -
ist aber wohl ein Gedankenfehler….

Warum ???
Im Prinzip passiert ja folgendes :
— wenn du den Switch auf dem Handy/Tablet betätigt - sendest du ja einen Befehl zur HardWare…
— nach dem Senden wartet die APP auf ein “ACK” das kann auch ein nur “\n” sein…
— erst wenn die APP dieses erhält - macht sie weiter.

Und so wie es aussieht hast du ganau das nicht zur APP geschickt.

Sendest du der APP ein “\n” bevor du den Switch schaltest z.b. “SWA 0\n” klappt es…

Also folgendes Szenario :
— du schaltest den Switch manuell auf dem Handy/Tablet auf “ON”
— nun sendest du von deinem Netzwerktool ein “\n” zur APP
— erst jetzt kannst du den Switch umschalten “SWA 0\n”

Das kannst du in der DOKU nachlesen : How does the app work?

Achso - Positive Lookbehinds oder Lookaheads etc. brauchst du für die APP garnicht.
Du kannst im Prinzip immer einen FullMatch machen - da die APP auch CaptureGroups kann.
( allerdings nur wenn du deine eigenen Strings zusammenbauen kannst )

z.b. so :
parseResponse : SWA(.*)          <-- die runde Klammer erzeugt die CaptureGroup1
formatResponse : {0.1}

Wäre schön, wenn du auch nochmal testen - und dieses bestätigen könntest.

lg
kalli



Edited mcgiver0510 (Nov. 23, 2018 03:36:09)

#7 Dec. 6, 2018 05:44:06 by mcgiver0510

Possible BUG with UDP and event based commands

@ bimbo385

ich bin ein User genau wie du…

ich habe versucht dir zu helfen….und meine Freizeit geopfert…

hiermit :
Wäre schön, wenn du auch nochmal testen - und dieses bestätigen könntest.
… habe ich dich gebeten mir zu antworten….

solltest du in den nächsten 14 Tagen nicht antworten - wirst du in Zukunft keine Hilfe
mehr von mir erwarten können.

Vielleicht fragt sich der Eine oder Andere warum ich so reagiere :

ja - nicht nur die Autoren - auch ich habe mittlerweile die Schnauze voll von solchen Leuten...
es werden Bugs unterstellt - die keine sind...
das Problem liegt im Verständnis der Leute...
es wird eine gewisse Hilfestellung geleistet - und bekommt nicht einmal eine Antwort darauf...
so etwas ist mehr als unhöflich ...

Wenn man einen Fehler gemacht hat - sollte man auch so viele " Eier in der Hose " haben - um ihn zuzugeben

lg
kalli

Edited mcgiver0510 (Dec. 6, 2018 06:37:30)