FUXA icon indicating copy to clipboard operation
FUXA copied to clipboard

the falshing tags

Open serite opened this issue 2 years ago • 16 comments

when I sub two topic mqttclient json object, the json item count over 20,the device tags allway falshing, where I connect the outtxt with the tags(any one of them) on the view ,the outtxt allway show the mqtt value and "NaN". 1 2 4 3

is a device only sub one topic ?

serite avatar Jun 12 '22 15:06 serite

Hi, I tested with over 50 json items in my local mosquitto broker without problem. can you try to investigate so that I can reproduce the problem?

unocelli avatar Jun 14 '22 19:06 unocelli

image

superkalt avatar Jun 14 '22 21:06 superkalt

https://user-images.githubusercontent.com/44277174/173689973-dbbbbf86-d55d-4ccd-b1da-fc0b6113d71f.mp4

superkalt avatar Jun 14 '22 21:06 superkalt

sorry i have to update the docker container

superkalt avatar Jun 14 '22 21:06 superkalt

I used the newest docker fusa. I am rebuild the device tags,until the value not flashing. step1:sub a mqttclint json msg.(over 20 item, it is always happen) step2:make all item to tags . step3:save project ,the tags value always blank ,a few secends then the values appear. if the values always flash (maybe depend on the device interval setting). the I delete all tags on this device, redo all the steps; until the values not flash .

maybe the project save operator tigger the bugs. some times ,i redo it over five times.

serite avatar Jun 19 '22 14:06 serite

prj.zip in the dev_3 (devices settings). the fusa load err prj ,it happend again. the ok prj is ok! topic /t03/data { "DLType": "207", "DLsAddr": "6401", "HistoryFileType": "2", "MutateReportType": "0", "ParamsAddr": "8001", "SendPrio": "0", "YCReportCyc": "0", "YCTransType": "0", "YCType": "13", "YCsAddr": "4001", "YKsAddr": "6001", "YXType": "1", "YXsAddr": "1", "bgScanTime": "0", "csuAddr": "1", "csuAddrLen": "2", "infoAddrLen": "3", "linkAddr": "1", "linkAddrLen": "2", "mainIP": "0.0.0.0", "mainPort": "2404", "protocolType": "2", "resIP": "192.168.2.1", "t0": "30", "t1": "15", "t2": "10", "t3": "20", "transCauseLen": "2" }

serite avatar Jun 19 '22 15:06 serite

Hi, I also got this kind of issues with MQTT ans json lists. (i to test FUXA I use json output from tasmota devices)

ouinouin avatar Jun 25 '22 11:06 ouinouin

Hi, in mqtt fuxa make subscription on the topics and will receive a callback with values that will be buffered, the polling look to the buffer and send to the frontend. I propose you to add a console.log to look what will be received in 'server/runtime/devices/mqtt/index.js line 339: console.log(topicAddr + ' = ' + msg);

unocelli avatar Jun 30 '22 20:06 unocelli

I add the console.log("...") into index.js ,when i pub the topic info ,as the same time the server log flash . but the web is still flashing per sec and the server log not contine . and in the chrome console is not any log been created. when i stop the docker ,the issues is not happen until i save the project again.

please upgrade frangoteam.github.io demo . meybe i can reshow the problem on it.

serite avatar Jul 03 '22 11:07 serite

hi Serite , about the flashing issue about mqtt problem , are there any fix ways?

top58525785 avatar Jul 04 '22 02:07 top58525785

hi Serite , about the flashing issue about mqtt problem , are there any fix ways? restart the docker ,it will ok .but if you modify same tags , it maybe happen again.

serite avatar Jul 06 '22 15:07 serite

I am looking but I cannot reproduce it

unocelli avatar Jul 07 '22 19:07 unocelli

@unocelli I didnt have a look yet, but could this issue have a link with the retain parameter of the mqtt ? are you doing a new subscribe each time you poll the data ? or is the mqtt communication running continuously and just buffers the latest data available ?

ouinouin avatar Jul 08 '22 11:07 ouinouin

http://121.36.211.235:1881/device or http://121.36.211.235:1881/home , you can test it any time. and sub a topic info on the mosquitto in this ip . i use mqtt.fx pub the topic only one time.

serite avatar Jul 10 '22 10:07 serite

hi, to add some infos even of low value... i tried to add the log line 339 ( console.log(topicAddr + ' = ' + msg);) then closed fuxa then rebooted, then i couldnt reproduce this bug.... i deleted the debug line , and the bug didnt reappear... dont know what to think about that.

ouinouin avatar Jul 17 '22 10:07 ouinouin

this is the way to deal this problem by me too. restart fuxa server .the bug is gone until the tags be modifed or rebuilded and save the project (not every time, meybe 30~50%). i think meybe the buffer been affected but the souce data is ok .

serite avatar Jul 19 '22 06:07 serite

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 #414 https://user-images.githubusercontent.com/49235335/194551536-e7553049-bfd5-480f-b8ea-328c15204308.mp4

ZhuNathan avatar Oct 07 '22 12: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