When I determine the active_server / fwd-server for my units, is there a chance that it will change over time? I could create a cronjob to get a list of active servers every week or so, but I don’t want to hammer mios’ servers more than necessary, so if they never change why bother.
I’d think static as long as the algorithm doesn’t (have to) change. Currently, the load is balanced based on serial number: odd → fwd1, even → fwd2, with the other server as secondary.
Actually we haven’t changed anything. Veras with even serial number have evt2, fwd2, etc. as primary servers and evt1, fwd1, etc. as secondary servers.
What’s the function of the primary server? Cause it seems to me, that I’m only able to access my boxes through their respective active_server, regardless of primary/secondary selection.
This means that the fwd1 server was not accessible. Otherwise the primary server would have been the active server.
Theoretically, the script that decides which server is the active one tries to connect to the primary server 3 times, and if it can’t connect to it, it tries to connect to the secondary server. If it manages to connect to the secondary server, it makes it the active server for a short time, making the primary server the active one after a while.
Practically, the primary server is set as the active one only if it cannot connect to the secondary server, but this will be changed so it will behave as intended.
[quote=“mcvflorin, post:10, topic:168426”]This means that the fwd1 server was not accessible. Otherwise the primary server would have been the active server.
Theoretically, the script that decides which server is the active one tries to connect to the primary server 3 times, and if it can’t connect to it, it tries to connect to the secondary server. If it manages to connect to the secondary server, it makes it the active server for a short time, making the primary server the active one after a while.
Practically, the primary server is set as the active one only if it cannot connect to the secondary server, but this will be changed so it will behave as intended.[/quote]
Okay thanks for clearing that up
Unfortunately this means that I’ll have to check the active_server for each of my boxes regularly, since I do a lot of scripting through the forward-servers. If I checked the active_server say a couple of times a week, maybe nightly - would that be okay?
The servers have good availability, which means that the active server should be pretty stable. Nightly checking should be enough (maybe a bit too often).
I’ve found that this is not always the case, so indeed I do have to check the forward-servers for all my boxes.[/quote]
I though fwd1 was used for Vera serials up to 12*** and fwd2 was used for vera 2*** upwards?
Could be mistaken or or 2 digits… open to amendments.[/quote]’
So where did i read the stuff on Vera’s up to 12xxx using one option and Veras 2xxxx and up using another?
Was it on the findvera servers and outdated info? (might have stumbled on it in the wiki, must try and re-locate that piece of info)
—edit–
Could it be that use of ra1.findvera.com & ra2.findvera.com are based on MIOS engine serials then? Is that where i read and misinterpreted? ra1 used for Vera 1’s starting with serial 1xxxx and RA2 used for Vera1 with serials starting with 2xxx?
Furthermore, as a reference for the wiki, does the findvera service still work and if so, only for cetain types? (vera 1?) and cp.mios.com works for all Vera’s? or just Vera2 hardware?
Maybe @mcvflorin can shed some light on this so i can update the howto wiki pages where needed.
I have another question regarding the locator_json.php
Am I supposed to be able to look up information on all Vera boxes through that script?
I’m using that page to validate whether a given username is a valid MIOS Username, e.g. if the page returns something, the username is a valid MIOS login. But I have a couple of users that have valid MIOS logins, but for whom the locator-script does not return anything when querying.
What are the premises for using the sta1-locator script? Must the box be online when querying? Or must it have been online within a week, or how does it work? Should I be validating this some other way?
Oh by the way, one of the users in question is “kjeldsen”, serialnumber .
Best Home Automation shopping experience. Shop at Ezlo!