How do find device IP address based on its MAC address

In order to create a string that will be passed to Web1.Url (followed by Web1.get) for switching on or off your sonoff device, you need:

  1. Add your sonoff device to ewelink App in normal and NOT in DIY mode
  2. Create an applet in IFTTT:
    2.1. Add in "if this" a service called WEBHOOKS, choosing after an option "receive a web request"
    2.2. Enter the name of the event for example Sonoff_ON (remember this name because it will be used in the final string) and create a trigger
    2.3 add in "then that" a new service called Ewelink smart home
    2.4 choose from proposed options "Turn 1 - channel plug on or off"
    2.5 choose from proposed channels your ewelink device (that was register in point 1) and choose an action ON (you wil need to repeate the same procedure and create another exactly the same applet but with action OFF and with a different name , for example Sonoff_OFF).
    2.6. Finishing the creation of the applet, go to the page ifttt.com/maker_webhooks and then click on "Documentation" in webhooks integration page.
    2.7 in this page you can copy your own string with a call to maker.ifttt.com that has to be passed to web1.url in your app Inventor project (in this string you have only to include the name of the event from point 2.2).
    2.8 setting web1.url to this string and calling web1.get in your app Inventor project - your sonoff device will be turned ON.
    Good luck!
3 Likes