Values change slow with TCP connection

Hello everyone,

I’ve a question to my TCP connection. The values of color or color temperature or brightness are updating slow when I set them. But only when the Home Remote app “things” it’s connected to the ESP8266.
I found out that the problem not seem to be my Arduino code, because the values in the app also update slow when it’s not connected (but shows not that it’s not connected). But when I’m powering off the ESP while it worked, the app says that it’s not connected and then the values are updating fast while setting them.
I hope someone can understand me and has an idea. PollinInterval of plugin is set to default (0ms). Maybe it’s something in the plugin? I also deleted the labels which are showing the values in case that it takes much time to update them, but it’s not as you can see in the GIFs. I added two GIFs which show the problem (1. slow updating values with connection, 2. fast updating values without connection).
My problem with that is when I set e.g. the color for my WS2812B, it’s not smooth but only changes the colors in “steps”. I also attach the .hrp and Arduino code as .txt. Maybe someone has an idea for faster updating TCP data.
Thanks in advance and best regards,
Thorsten.
PS: Sorry for my bad code so far.
slow updating values
fast updating values
test home remote TCP.hrp (2.6 MB)
Arduino code ESP8266 THR.txt (791 Bytes)

Based on the error you are seeing, it’s probably because you keep dropping the connections. You need to get that “TCPClient is not connected” issue resolved 1st. I’d recommend looking at the log window to see if it shows anything explaining the dropped connection. That log window is only available in the Designer. You won’t be able to check it on your iPhone.

Do you have multiple connections open to this?

Many TCP devices only support 1 concurrent connection. Maybe that’s your issue.

I notice you are not utilizing the log at all in the file you attached. When you are debugging issues like this you need to be using that. It’s going to be very difficult to find out what’s exactly going on without. There’s only so much help I’m going to be able to provide in troubleshooting plugin issues. Logging is your most helpful tool.

The log window is located in the lower left corner of the Designer.

Hallo Bill,

first of all thanks to your help!
I‘m sorry for not make it clear enough. The „TCP client is not connected“ is not my problem as I tried to explain. I intentionally cutted the connection to show the fast changing of the values in the second GIF. The TCP connection is working. My problem is the refresh rate of the values when I set them. When you compare the two GIFs you‘ll see that they „jump“ or make „spteps“ in the first GIF and in the second one they update immediately and show more values in the same time. Maybe it‘s easier to understand my first post with this in mind. When I change the color with the color wheel, there is no smooth color change because of that.
Best regards,
Thorsten.

Decrease the default ChangeInterval of 250 to 0. You haven’t specified the ChangeInterval in your project so it is using the default 250 milliseconds.

plugin.ChangeInterval = 0;

There’s code built-in that tries to limit the burden on your Arduino service by skipping “unnecessary” requests. When you are moving the Slider very quickly from 0 to 100, for example, it may skip values in between that change like say 47, 53, etc. Based on your question, it sounds like you would like to disable this feature. What you should do is set the ChangeInterval of the plugin to 0. That will remove the internal delay.

1 Like

Hello Bill,

great, it works! :slight_smile:
Now I have to speed up my Arduino code…

Best regards,
Thorsten.