Turn on lights via http url??

Is it possible to create a bookmark with a url that would turn on light switch via http?

I ask because when I am home, I absolutely hate fumbling into the interface to do a simple task. I just want to make an icon on my iPhone that would turn on the lights.


You can use this to turn a binary light on:



You will need to know what forward server you are on e.g. fwd1 or fwd2 for UI4 firmware.

change the following:

john = your mios username
tokyo = your mios password
10266 = your vera unit number
= change this to the device number of the light you want to turn on
TargetValue=1 1 = on 0 = off

For local access:


Change the following:

= the ip address of vera
= change this to the device number of the light you want to turn on
TargetValue=1 1 = on 0 = off

To toggle a device on/off depending on their state:



john = your mios username
tokyo = your mios password
10266 = your vera unit number
= change this to the device number of the light you want to turn on



Change the following:

= the ip address of vera
= the device to change the toggle state

  • Garrett

Thanks Garrett! This would be handy when it comes to creating custom UI controls!

What if I am port forwarding my Vera? Is is possible to do this?

I realize that it says “File not found.” is the data_request in a different folder?

If you forward an external port to Vera’s port 3480, it should work.

<Insert usual warning about port forwarding here. I’d go through the cp.mios.com tunnel as indicated by @garrettwp, or your own VPN, etc.>

Not working for me. Did this access get discontinued between 2011 and now?

I just tried curl ‘https://fwd2.mios.com/UnRealVera1/redacted/50017623/data_request?id=lu_action&DeviceNum=14&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1’ and it failed with “Invalid user/pass.”

I happen to have two veras and each with their own separate usernames and passwords, and they both failed the same way. Passwords were copied and pasted out of lastpass so i don’t think I got those wrong.

Does this API require urlencoding of passwords, or forbid certain characters be in passwords? One of the passwords had a lot of punctuation, the other just underscore, which I tried replacing with %5f to no avail.

My unit number looks pretty far off from yours, so maybe I have that wrong. If I got the unit number wrong, should I expect an error message like “you’re not authorized to controll that unit” or will it tell me “Invalid user/pass.”, which would technically be false.

Interesting I wasn’t even aware you could send HTTP commands to Vera without port forwarding.

I wonder if the new Ezlo Api has this ability also.

Are you wanting to send the command remotely from outside of your home network?

Or send it locally from within your home network?

You can’t that was removed

I see the same.

fwdX.mios.com is the old Mios UI5 portal gateway / relays, that no longer works, as @ElCid just found a link for in the Wiki.

I’m wanting to put a little bookmarklet in my browser that will work no matter what network I’m on or where I physically am. I’d rather not think about networks when I just want to turn on a light.

Is the only way for me to (securely) do that, for me to write my own API server, host it on the same lan as my vera, and forward a port to it from outside? can’t be.

The android app works securely from any network, so how does it do that? What ever mechanism the app uses, is what I need my bookmark to use.

The android app goes through ezlo’s server.

To set a request to vera over the web you will have to do one of these things

  1. forward the port from the router to the local ip of the vera, not the most secure way.
  2. set up a vpn tunnel from your phone to your home lan, secure.
  3. use an app like tasker or automate, you would need an android device at home all the time. this acts as a server, you can then send cloud messages from your phone, via browser bookmarks, to the android device at home. This then converts the cloud message to a http request and forwards it to vera.(this is the method i use)

hmm. Well, i appreciate the options, but it would be easier to walk through the dark house using my phone’s flashlight than set up all that. I hate regressions. Taking that functionality away reminds of of the Google/Nest thermostat saga. It kind of defies the idea of home automation being a helpful thing vs. a controlled sales channel.

I don’t understand why I can’t use api-cloud.ezlo.com or cloud.ezlo.com like the app does. I wonder if there’s some problem with ezlo’s protocol that Ezlo doesn’t want folks to find out about so they try to keep people out of it, but that’s not what https is for.

I imagine I can probably put an organizational root CA cert on my phone and MITM my own connection to see how it works, but that’s also an awful lot of work.

While you have your phone in your hand for the flashlight you could always use the Vera app to turn the lights on? On the other hand true home automation isn’t clicking a bookmark in a browser, true home automation wouldn’t let you wander in the dark in the first place :wink:


Bit easier using Imperihome app on Android you can create a home screen widget to directly run a Vera scene.

Ezlo should look at adding that functionality for their Vera / Mios app.

I agree. For what’s not automated, I find voice control a better choice over my phone. I rarely use it.

I have a couple of shortcuts for the gates for when I’m out (biking, walking) - or for when I used to. I had to write a relay in order to do it. Their solution would probably be cumbersome, involving expiring tokens and such. It’s not easy to build secure features for the masses.

Using Automate was easy, All cloud messages go through google firebase, and are https. I can encrypt and decrypt my messages so google does not see the message. I can also just press a sequence of hardware key on phone and fire of a command to vera. Take a look if you need to see examples of server i can give you a link to an automate flow.

Actually same for me, I raise my hand and tell my watch what I want to do/happen/know. It’s not Vera native but that’s how our family do things overriding automations :slightly_smiling_face: