Retention of Value display item - Printable Version +- Virtuino Forum (https://virtuino.com/forum) +-- Forum: Virtuino (https://virtuino.com/forum/forumdisplay.php?fid=1) +--- Forum: Virtuino IoT (https://virtuino.com/forum/forumdisplay.php?fid=2) +--- Thread: Retention of Value display item (/showthread.php?tid=999) |
Retention of Value display item - driaan - 07-28-2022 I receive data from a remote IO unit which only has on publish topic. I thus get different messages for different data types which the unit publishes every 'x' seconds. For example it will publish Digital input statuses, then digital output statuses, then Analog inputs etc. An example of the Analog input message that gets published is: { "devId": "493C220314031120", "msgType": "aiValueRpt", "data": { "AI1": "8580" }, "timestamp": "1659010523" } The topic is /iot/pub My value for JSON path that I select is data/AI1 and this gives me the correct reading. When a new message comes through without a data/AI1 path, for example the following: { "devId": "493C220314031120", "msgType": "rs485ValueRpt", "data": "0203140002004E0041000500650000000213EE000300C08051", "timestamp": "1659010685" } My value display goes to 0 because I assume it tries to read the value in each message published to the topic. Is there a way for me to retain the value until a new message gets published which actually contains the data/AI1 path and ignore all other messages if it isn't present? RE: Retention of Value display item - iliaslamprou - 07-29-2022 Hi, are you sure the widget displays the zero value? it should show a blank. Anyway I think that the correct function is to cancel the incomming value as you correctly mention in the message. I wll fix it on the next update 0.0.14. RE: Retention of Value display item - driaan - 07-31-2022 (07-29-2022, 09:18 PM)iliaslamprou Wrote: Hi, Hi Ilias, yes you're 100% correct, it just shows a blank not 0, I was mistaken. Thanks for your reply. These units are giving me some trouble with regards to parsing the messages so I've got another question, but I'll put that in a seperate thread with a correct heading. I will also experience this same problem with the second message but as you mentioned an update should fix it. |