Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modbus Flex FC - Loading Codes Issue #448

Open
innoagg opened this issue Mar 4, 2024 · 6 comments
Open

Modbus Flex FC - Loading Codes Issue #448

innoagg opened this issue Mar 4, 2024 · 6 comments
Assignees
Labels
bug problem pull request welcome send your pull request and contribute to the project Stale

Comments

@innoagg
Copy link

innoagg commented Mar 4, 2024

Which node-red-contrib-modbus version are you using?

5.30.0

What happened?

Trying to use the Modbus Flex FC node. I want to define my own map file and load it into the UI. I am not having success. The drop down never populates.

Server

None/This is related to a node that doesn't connect to a server

How can this be reproduced?

Ensure a codes.json file exists in the search path defined in the node:

image

A valid file exists but the function code selection does not populate.

What did you expect to happen?

No response

Other Information

No response

@innoagg innoagg added the bug label Mar 4, 2024
@biancode biancode added problem pull request welcome send your pull request and contribute to the project labels Mar 22, 2024
@biancode
Copy link
Contributor

@grewek can you check that for us?

@grewek
Copy link

grewek commented Mar 26, 2024

See the post below this one :)

@grewek
Copy link

grewek commented Mar 27, 2024

Hi,

here is a little workaround for the issue, i will of course fix the issue as soon as i can. You can put the file inside the current working directory (cwd) of NODE-Red (the place where you started Node-Red). The issue is that we don't have access to the filesystem only to files that are under the cwd as far as i know.

So for example

#Create a example directory where we will start node-red
$ mkdir node-red-cwd
#Get into that directory with cd
$ cd node-red-cwd
#Create a customMaps folder where we will put our codes.json file
$ mkdir customMaps
#Copy the file over into the customMaps directory
$ cp some_custom_codes.json customMaps/codes.json
#Run node-red, the executable has now access to the customMaps folder
$ node-red

You can then access the file by putting an relative path into the path textbox of the node:
./customMaps

You can also put the file directly into the cwd then a . is sufficient for the path textbox

Hope that helps for now.

@innoagg
Copy link
Author

innoagg commented Apr 8, 2024

Thanks for the above. I did try this with no success. Permissions are correct. Perhaps some UI feedback when you are able to push a fix so we can see what errors are raised if any.

@grewek
Copy link

grewek commented Apr 23, 2024

The new version (5.31.0) should fix this issue, NOTE: In version 5.31 you need to supply a absolute path a relative will only work if the file you are looking for is in your current directory or reachable from the path you are at. Also you need to supply a filename as well i.e. "/home/myuser/codes/my_awesome_codes.json" would be what you put in the Path textbox in the new version.

Copy link

This issue is stale because it has been open 60 days with no activity. It will be closed in 30 days, but can be saved by removing the stale label or commenting.

@github-actions github-actions bot added the Stale label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug problem pull request welcome send your pull request and contribute to the project Stale
Projects
None yet
Development

No branches or pull requests

3 participants