Freematics Hub - Windows Issues

Discussion about software developed by Freematics, including Freematics Hub, Freematics Builder, Freematics Emulator GUI
Post Reply
m1ckyb
Posts: 1
Joined: Sun Jul 05, 2020 1:27 am

Freematics Hub - Windows Issues

Post 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
zghreg
Posts: 1
Joined: Sat Jan 30, 2021 6:59 pm

Re: Freematics Hub - Windows Issues

Post 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
  // ...
}
stanley
Site Admin
Posts: 868
Joined: Sat Mar 01, 2014 3:15 am

Re: Freematics Hub - Windows Issues

Post 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.
Post Reply