FUXA icon indicating copy to clipboard operation
FUXA copied to clipboard

mqtt issue

Open top58525785 opened this issue 2 years ago • 13 comments

we have stop publish data to mqtt server long time but fuxa is not stopping refreshing data please check the picture and vedio 微信图片_20220623145755

https://user-images.githubusercontent.com/54358179/175235905-745759b9-4fcd-4a60-85e3-e37ca066c500.mp4

https://user-images.githubusercontent.com/54358179/175235925-7a8f46e7-b84c-43cf-a91f-14444f984993.mp4

top58525785 avatar Jun 23 '22 07:06 top58525785

Hi, ~~is it possible that the problem is that FUXA ask the data to the broker who responds with the value of the last publish?~~ FUXA polling read values from internal memory, the memory is updated by the subscription callback. if you deactivate the publish FUXA no longer receives callbacks but the old value is still in memory.

unocelli avatar Jun 25 '22 15:06 unocelli

maybe,it is the problem for fuxa mqtt loop data acquire time seettings? so how to fix it?

发自我的iPhone

------------------ Original ------------------ From: Umberto Nocelli @.> Date: Sat,Jun 25,2022 11:14 PM To: frangoteam/FUXA @.> Cc: top58525785 @.>, Author @.> Subject: Re: [frangoteam/FUXA] mqtt issue (Issue #414)

Hi, is it possible that the problem is that FUXA ask the data to the broker who responds with the value of the last publish?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

top58525785 avatar Jun 25 '22 15:06 top58525785

maybe I am misinterpreting the mqtt protocol, but if a sensor only publishes data if it has changes or every minute and for example fuxa process the display or script with logic in a 1-second interval, what value should it take?

unocelli avatar Jun 25 '22 16:06 unocelli

Actually fuxa should update and dispaly each data from the mqtt broker subscriber,not only the last data? it should be the real time data from the broker..you can have a test for mqtt if sensor data publish data faster..

发自我的iPhone

------------------ Original ------------------ From: Umberto Nocelli @.> Date: Sun,Jun 26,2022 0:30 AM To: frangoteam/FUXA @.> Cc: top58525785 @.>, Author @.> Subject: Re: [frangoteam/FUXA] mqtt issue (Issue #414)

maybe I am misinterpreting the mqtt protocol, but if a sensor only publishes data if it has changes or every minute and for example fuxa process the display or script with logic in a 1-second interval, what value should it take?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

top58525785 avatar Jun 26 '22 01:06 top58525785

this is a general question. Does fuxa also receive data when no user is logged on? I see fuxa as pure visualization. it is therefore only necessary to receive and process data when a user is logged on. MQTT has the "retain" function. If "Retain=true" the broker saves the last data transfer and when a new "client" logs in and subscribes to a "topic" he gets this last value. if "retain=false" it will not get any data until new data is sent again.

a visualization should really only display "real" data, i.e. no stored data. How should you deal with it if a sensor does not send regular data? We need some kind of "TimeOut" function. So Fuxa shows the last received value. It would be very good to display whether "all" data has really been updated in the last x seconds. A list of all "tags" that are colored. green = less than 60 seconds. orange = between 61 and 300 seconds, red = older than 600 seconds. gray = no data. Of course, the time values would have to be adjusted.

how does fuxa deal with "COV" on bacnet? this is the same problem!

superkalt avatar Jun 26 '22 10:06 superkalt

@superkalt I like your proposal, adding a configurable timeout, default 60 seconds:

  • timeout < orange < 5 * timeout
  • 5 * timeout < grey < 10 * timeout

unocelli avatar Jun 26 '22 12:06 unocelli

So Unocelli: How to fix the problem as vedio shows IT display realdata and then zero data?

top58525785 avatar Jun 27 '22 05:06 top58525785

So Unocelli: How to fix the problem as vedio shows IT display realdata and then zero data?

hmmm, come down.

superkalt avatar Jun 27 '22 17:06 superkalt

@superkalt I like your proposal, adding a configurable timeout, default 60 seconds:

  • timeout < orange < 5 * timeout
  • 5 * timeout < grey < 10 * timeout

perhaps a good time to separate the processing of the values from the visualization?

superkalt avatar Jun 27 '22 17:06 superkalt

this problem is same as #404

serite avatar Jul 03 '22 11:07 serite

@serite is the problem fixed?

top58525785 avatar Jul 04 '22 02:07 top58525785

I had this problem before, but I pulled the latest version and the problem was gone

jcxjcx123 avatar Jul 04 '22 02:07 jcxjcx123

I am looking but I cannot reproduce it

unocelli avatar Jul 07 '22 19:07 unocelli

I test this issue with v1.1.8, it will be normal after I creat the new mqtt tags, but the issue will happen after I click "Save Project", it just an appearance what I see, I didn't find the root, I hope it will be helpful for this issue fixing. same issue as #404 https://user-images.githubusercontent.com/49235335/194548008-0b5ea247-c768-4886-8aac-f32897bb142d.mp4

ZhuNathan avatar Oct 07 '22 12:10 ZhuNathan

Hi, Thanks for the report, so I could reproduce it and I think I fixed it, can you confirm me?

unocelli avatar Oct 08 '22 07:10 unocelli

Hi, Thanks for the report, so I could reproduce it and I think I fixed it, can you confirm me?

I test this in docker, it worked normally, that's wonderful!

ZhuNathan avatar Oct 08 '22 16:10 ZhuNathan

I am going to close this as resolved. let me know if you have any issues.

unocelli avatar Oct 12 '22 18:10 unocelli