http request via MiOS server and two units with one login

We all know that in order to use the forwarder service for http requests, we can use a URL in a certain format. This URL contains the user name, password and unit serial number. It seems to work OK. Also if I have two units with the same user name and password, by using the unit serial numbers I am able to get data from different units.

Until… one unit goes down. In such case http request for the unit that is down returns a result of the other unit! So whatever I put in the unit serial number, I get the same result - the data of the remaning unit. Imagine I have some devices with identical IDs and start operating in remotely, for one location. And the controller there is down. So the command will be sent to another location! This is very, very wrong…

Yes, sure, the response like sdata and user_data has the unit serial number and it is correct, so I sent a request for and it returns a response for but the response itself contains serial number, so potentially I can check that. But it means I cannot trust MCV forwarders at all and have to check if the unit is alive by making sdata requst and comparing the serial numbers before sending every command? I see the only workaround in having different MiOS account, one per unit. But this is pretty ugly.

Are you positive this is the case and you are not getting cache data from the browser?

  • Garrett

Absolutely. How can this be in cache is the URL is different? However, today’s observation is that after the unit is offline for quite some time, the request is returning an empty result. But yesterday, when the unit just went offline, I did many tests and I got the data from another unit.