avin / blynk-web-client

Web Client for Blynk
http://blynk-client.surge.sh/
49 stars 23 forks source link

Web Client not actively showing changes in display widgets, without browser refresh. #4

Open Gun-neR opened 5 years ago

Gun-neR commented 5 years ago

NO device pushed action is automatically registered in this Web Client, I must refresh web page to see changes in display widgets from virtualWrite() setProperty(), etc.

avin commented 5 years ago

Yup, there is a problem, because I'm using device-API (and the server recognizes me as a device). I will try to dig in into blynk protocol to resolve this problem. Currently this is the biggest problem of this client :(

Gun-neR commented 5 years ago

No problem... I am not being nitpicky, I had just noticed that no one else seems to be posting anything, so I figured I can beta test for you :P

avin commented 5 years ago

I did not find any official API method to subscribe for pin values changes, so I made temporary solution with Sync button (it uses SYNC_HW under the hood) and AutoSync timer to do sync operations automatically.

Gun-neR commented 5 years ago

1 second+ refresh is perfect for my typical uses. Looking great!

One minor glitch I noticed after the first second of operation (regardless of set sync time), the UTF-8 image gets garbled. Sync related?

screenshot 2019-02-07 12 31 17 screenshot 2019-02-07 12 31 17 2

avin commented 5 years ago

I'll check it. First time I get values from a project object, and when syncing - it comes from websockets in a binnary format, may be while I convert it - something goes wrong

avin commented 5 years ago

Seems like it is blynk-server problem. First time i created this widget - it was OK, but today I see the problem and wrong data comes from server :\

image

Gun-neR commented 5 years ago

Hmm, originally I was using code to generate the symbol, which worked for the first display, just not after... It is on a 1 second timer.

Blynk.virtualWrite(V7, String(WiFi.RSSI()) + String(" \xF0\x9F\x93\xB6"));

Then I changed it to the same emoticon, but picked from the phone and placed in the Labeled Display Widget, and that works fine every second.

Blynk.virtualWrite(V7, String(WiFi.RSSI()));

image

image

Go figure :D

avin commented 5 years ago

Seems like it is a floating problem :\