How do find device IP address based on its MAC address

I need to pass an IP address of sonoff switch to it's DIY API but DHCP is assigning always a different IP address.
Maybe there is a method or an extension that permits to identify a current IP address of the device if you know it's MAC address?
Thank you

That is the way the server works - dynamic IP Addresses. The current IP of the device will be that dynamic IP. If you can't work with a dynamic IP, you could request a static IP from your network supplier.

Failing that, an extension that finds all MAC addresses and corresponding IP address on your network should be possible - there is an App on Google play that can do this and it's open source on Git Hub:

Try Suggesting this extension in the Extensions forum

Thank you Chris. Unfortunately sonoff device doesn't permit to set a static IP address in DIY mode and my Vodafone modem doesn't permit to fix an IP address for a certain Mac under DHCP (like it was possible with a modem of another internet provider).
Of course there is a possibility to find out IP address based on Mac address by reading an ARP table (I'm using already such a tool) but I was wondering if there is an app Inventor extension or a standard API that can be used.

Does this work?

I didn't find any method in this extension that returns an IP address based on Mac address (not your own smartphone or the rooter but any other device presented in the local network). Could you please suggest me the right approach?

I was not able to find any solution for finding out of IP address of the device based on its MAC address but i solved my problem by using an IFTTT WEBHOOK with eWelink service for controlling a Sonoff device.
Thanks for those who were trying to help

If you post your solution details we can add it to our web service FAQ

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

(added to FAQ)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.