Page 1 of 1

Freematics Hub - Windows Issues

Posted: Sun Jul 05, 2020 1:38 am
by m1ckyb
Hi,

I have downloaded the Freematics Hub software for windows ver 0.9.9

I installed it and run it, when i run the simulator it says login failed, and the hub webgui says it is in maintenance mode when i try loggin in as a deviceid, saw in another post that that changing a line in config.js as follows fixes some issues

Code: Select all

from: const serverURL = window.require ? "http://localhost:8080/api/" : (window.location.href.indexOf("localhost") > 0 ? "/api/" : "hub/api/");
to: const serverURL = window.require ? "http://localhost:8080/api/" : (window.location.href.indexOf("localhost") > 0 ? "/api/" : "/api/");
Now i got the simulator to login, but as soon as i go to the webgui and put in the simulator deviceid, it says no such user, even though in the data directory the simulator deviceid's data is there.

Any help would be greatly appreciated, Thanks

Re: Freematics Hub - Windows Issues

Posted: Sat Jan 30, 2021 7:04 pm
by zghreg
I had the same issue, and it was resolved after changing the simulator device id from the default SIMULATOR to other ID such as test. There's some tricky/buggy code in portal.js that the ID is treated as user if its length is longer than 8:

Code: Select all

if (input.length <= 8 && input.indexOf("@") < 0 && input.indexOf("#") < 0) {
  // treat as device ID
  // ...
} else {
  // treat as user name
  // ...
}

Re: Freematics Hub - Windows Issues

Posted: Tue Feb 23, 2021 12:59 pm
by stanley
Yeah that's a bug. Because actual device ID is no longer 8 characters at the moment. Will publish a new release soon.