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

users.js export then import does not work #26

Open
zsarosi opened this issue Oct 2, 2020 · 4 comments
Open

users.js export then import does not work #26

zsarosi opened this issue Oct 2, 2020 · 4 comments

Comments

@zsarosi
Copy link

zsarosi commented Oct 2, 2020

Exporting users.js has some issues. The Info description is the following

If you do not want to use the database integration but do want view the YAMon reports from multiple devices, click the export icon () and save the file to your router. NB - you must stop the yamon*.sh script on your router before replacing or editing users.js!

It is maybe not up to date, since it does not specify the path on the loca user where the file should be saved, it should be /opt/YAMon4/data/users.js
It also says that yamon*.sh script should be stopped, which I think does not exist in version 4.0.7, but instead /etc/init.d/yamon4 stop should be used, then after the update of the file /etc/init.d/yamon4 start .

Exporting users.js from the GUI then stopping yamon, replacing the file on the router and starting yamon does not work as expected. After this procedure the "Devices" tab does not work anymore.
I compared the format of the exported users.js and the local file on the router and they seems to be different.
The exported users.js contains lines like this:
ud_a({"mac":"un:kn:ow:n0:0m:ac","ip":"::/0,0.0.0.0/0","owner":"Unknown","name":"No Matching Device","colour":"","added":"2020-09-04 11:25:56","updated":"","last-seen":"undefined"})
and the local users.js file on the router looks like this:
mac2ip({ "id":"un:kn:ow:n0:0m:ac-0.0.0.0/0", "name":"No Matching Device", "active":"1", "added":"2020-09-04 11:25:56", "updated":"" })

@rlsolomon
Copy link

Same experience here - manually editing in the names in users.js appears to work, but haven't found how to add new groups either way. CORS error prevents using the database mode which is apparently the author's preferred mechanism.

@ingoratsdorf
Copy link

The description for the exporting of the "users.js" file is wrong and applies to version 3 only, not version 4.
For version 4 export, you have to select the other little icon next to it, a file symbol with ".JS" in it.
This will open the actual users.js file from your /opt/YAMon4/data/users.js.

The old export for the users.js file gives you unusable stuff with 'ud_a({"mac":"a0:56:f3:38:b7:cd","ip":'...

@pkerney
Copy link

pkerney commented Feb 9, 2022

Follow up question then. We can use the export button to get the list of devices as we have edited them including colors. But does the new user.js format support colors as well? The old version did. Really helpful with pie charts to see the bandwidth hogs.

@CanoeCanuck
Copy link

I had this same issue with exporting users try ecdye's working version info here. Worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants