You can use the new Ezlo “WIFI Device Generator” plugin to create virtual devices like virtual switches to send ON / OFF HTTP commands to IP devices and applications and services on your LAN and also to online services like IFTTT Webhooks (Maker Event).
Some examples might be for controlling local Shelly and Sonoff devices (Although there is now also a new plugin for Sonoff devices in the Marketplace). For controlling IP camera settings, or sending HTTP commands to Node-Red or to any device, service or application that supports receiving HTTP control commands really.
In this example I will be looking at IFTTT webhooks to start applets running on my IFTTT account. I have a consumer grade Ezviz PTZ indoor camera and it has a privacy mode that covers or un-covers the cameras lens.
So I linked my IFTTT account with the Ezviz service and setup two applets to turn this privacy mode ON or OFF.
I won’t go into full details of how to setup IFTTT Webhooks, but here are some screen shots for my two applets. You can also read the Webhooks FAQ here.
The Event name you enter, is what ends up being part of the HTTP request URL, see my example commands below.
Head to the Webhooks service page and click Documentation.
You will then see a page like this and you need to copy your key and make a note of it for later. (Not my real key).
With your key and the event names you created for your Webhooks “IF” you can then create your HTTP Request URLs.
My On command to run the applet
My Off command to run the applet
Note the WIFI Device Generator plugin doesn’t currently support HTTPS I don’t think.
Now you have the HTTP commands that will be sent to IFTTT you can start creating your virtual switch device on your Ezlo hub.
If you haven’t installed the WIFI Device Generator plugin on to your Ezlo controller yet, then you will need to go to the Marketplace and Copy it down to your My Private Plugins area first.
Then in your My Private Plugins area find the WIFI Device Generator plugin and press the “Manage Installations” button next to it.
Click the “Install” button next to your controller.
On the main menu on the left you can select the “WIFI Device Generator” and you should see a page like this, press the “Create New Configuration” button.
Give your template a name, for an ON / OFF switch select the following:
Device Type = Plug-switch
Category = Switch
Sub Category = Interior
Then on that same page press the “Add Capability” button and select “Switch” from the list. You will then see this:
In here we can now start creating our HTTP ON / OFF commands. Select the appropriate “HTTP Method” GET is fine for this example. Do this for both the ON and the OFF.
In the URL fields do NOT just paste in the entire HTTP command URL
You MUST only enter in the data portion of the HTTP command at this stage.
For example here are my two HTTP commands and I am only going to copy and paste the part I have highlighted in blue. So everything after
Add the ON HTTP command portion in to the ON URL field and the OFF HTTP command portion to the OFF URL field like this.
In this simple example I do not need to add anything in to the “Data” fields or the “Content Type” fields, so I have left them empty.
You can now click the “Save Model Template” button at the bottom right of the page.
You will then be taken back to this page, press the “Create device” button to now create your virtual ON / OFF switch.
You will then see this page.
Give your virtual switch device a name and fill in the IP and port number fields, like this. Do not enter
http:// before the
maker.ifttt.com and its port 80.
Now press the “Create Device” button.
On the main menu on the left you can then go to Settings and Devices and find your newly created virtual switch. In here you can edit its settings, assign it to a room or remove it.
To actually control this device and turn it ON / OFF you need to do that either in the Dynamic Dashboard in the web UI or look in your Vera mobile app.
Your IFTTT ON and OFF applets should now be ran.
You can also setup a WIFI Device Generator virtual switch to control some IP device or an application or service on your own local LAN.
I may add another example to this thread later, for setting up a WiFi Device Generator plugin virtual switch, for directly controlling something on my local LAN, maybe sending some HTTP commands to my local Node-Red installation.