I have barcode scanner which is scanning the barcode and currently i'm sending it's value to a text file in RPI also I have used spreadsheet.odb(excel) file.
My problem is when i scan a barcode it is written in text/odb file but in node red the File node can not give me result unless and until I save the file.
So for every barcode scan i can not get it's latest value. (because i have to save the file and also I don't know what should i do after saving that)
I have seen many option out there but nothing works out, Can any one suggest that how can i Read the text file/spreadsheet and get the latest value and close it with save.
Are you sending it to the file in node-red or by some other means.
So my text editor is open always that why my barcode value is written.
For getting latest value i have to close the text editor with save and when I inject in node red I will get latest value
with out saving it will only gives me previous values
So I thought let nodered create one text file and open it so if i scan barcode its value will be there and after node red will close the text file and it will save it, so i will fetch the latest value it in node red.
But there is also be a condition that the values need to be deleted so only one value is there all the time.
I don't know is this easy solution or not?
Please suggest me
You might be better to use a dashboard text node to scan into, then it will all be under the control of node-red.
I tried it also but the problem is
- I have to click on dashboard text widget for getting data,(so cursor can blink there)
But For end application I will not have any screen to click on that text box.
- I also have to clear that textinput so that new text can be entered it.
without deleting it will write with previous one, and I don't how to do it with this.
So what will be the solution for that?
As suggested in the other thread you could provide your own text input field using html in a template, you will have to research about html for that. As for clearing the field after actioning it that can be done in node-red by sending it an empty string.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.