Clever way to remotely monitor dynamic IP with a Wyze camera? #781
Replies: 8 comments 7 replies
-
Can you access the cam via ssh? Commands like the following will get you the IP address if you are solely using wireless:
Are you wanting a script that notifies you on an IP change? I don't believe there is anything currently built into wz_mini with that feature but it would be simple to add it yourself as a custom command. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/shauntarves/wyze-sdk is a reverse engineered access to wyze’s web api. in particular, wyze_sdk.client.cameras: for interacting with Wyze Camerasprovides access to each camera’s current IP address among other parameters. RobOn Jul 28, 2024, at 3:38 AM, endertable ***@***.***> wrote:
Can you access the cam via ssh? Commands like the following will get you the IP address if you are solely using wireless:
ifconfig wlan0 | grep -o 'inet addr:[^ ]*' | awk -F: '{print $2}'
cat /proc/net/fib_trie | awk '/32 host/ { print f } {f=$2}' | tail -1
Are you wanting a script that notifies you on an IP change? I don't believe there is anything currently built into wz_mini with that feature but it would be simple to add it yourself as a custom command.
I am trying to figure out what the PC or Pi at the remote location are used for and how they are telling you the IP.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
bah. premature sendulation.I have Starlink as well but use TP-LINK deco routers instead of the Starlink wifi. Thus i can enable address reservation for my dhcp iot devices which maintains a consistent ip. Alternately you could run a cron job on several or all cameras for redundancy that does a loop through all ip in your dhcp range with a ‘ping -c 1’, then captures the output of ‘arp -a’ and beams that off somewhere. bit clunky but effective.I am presuming you wish to remotely do a per camera keep-alive?RobOn Jul 28, 2024, at 5:44 AM, rob currie ***@***.***> wrote:https://github.com/shauntarves/wyze-sdk is a reverse engineered access to wyze’s web api. in particular, wyze_sdk.client.cameras: for interacting with Wyze Camerasprovides access to each camera’s current IP address among other parameters. RobOn Jul 28, 2024, at 3:38 AM, endertable ***@***.***> wrote:
Can you access the cam via ssh? Commands like the following will get you the IP address if you are solely using wireless:
ifconfig wlan0 | grep -o 'inet addr:[^ ]*' | awk -F: '{print $2}'
cat /proc/net/fib_trie | awk '/32 host/ { print f } {f=$2}' | tail -1
Are you wanting a script that notifies you on an IP change? I don't believe there is anything currently built into wz_mini with that feature but it would be simple to add it yourself as a custom command.
I am trying to figure out what the PC or Pi at the remote location are used for and how they are telling you the IP.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I think I am super close but missing something. I was able to use wyze_sdk to e.g. get the mac address and state of the cameras. I'm using code like: [client = Client(token) try: This only works if I know the attribute e.g. mac. I guessed ip was an attribute and it is -- from it I get the local IP address of the device. But I also want to get the IP address of starlink. How do I get a list of all the attributes available? Attempting to iterate over items in device returns 'device is not iterable.' |
Beta Was this translation helpful? Give feedback.
-
I may be wrong, but I don't think you'll get that from the cameras, unless they track the external IP somehow. I wouldn't think they need that information, but the Wyze servers would. |
Beta Was this translation helpful? Give feedback.
-
I since managed to get all the attributes of the cameras, and you are certainly right that the cameras don't contain the WAN IP as an attribute. But the only way the Wyze servers know where my cameras are is if the cameras tell them by connecting, because when starlink gets a issues a new IP, it is abrupt. So I figure this information is somewhere in the Wyze SDK. I'll try there. Thanks for putting me onto the wyze sdk. Just getting the local IP addresses is a win. |
Beta Was this translation helpful? Give feedback.
-
likely you can get both ip with the sdk. i was focused on getting the lan ip for the cameras. i really think that disabling the starlink wifi and adding your own wifi router with dynamic dns capability and ip reservation would be easier, have better coverage if mesh and be more robust. also look into the starlink mini option, it might be cheaper. good luck. RobOn Jul 28, 2024, at 10:36 AM, Preston McAfee ***@***.***> wrote:
First, the wyze-sdk is worth knowing about and I will definitely explore.
I am trying to use wyze cameras attached to a starlink in a location where I am not running a PC when I am away. The cameras identify their location (not just their local IP but also the IP of the starlink itself) to Wyze because they are always visible through the Wyze app. So is there a way with the Wyze-sdk to grab both IP addresses? I can use python code to cycle through the local IPs (though this assignment seems pretty stable and starlink restarts) if necessary, but getting starlink's ip -- a trick Wyze has mastered, probably because the cameras send a message to Wyze's home IP identifying themselves -- is my goal.
If I ran a PC 24/7 at the remote location, I could just use a dynamic DNS service to keep track of starlink's IP. I am trying to monitor these cameras from a remote location without using a PC at the remote location.
I think the starlink IP changes every time the satellite switches, that is, every six minutes or less, based on watching when I am there.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I set up the Wyze app with cameras on two WAN networks, and it shows them fine. One of these is starlink, whose WAN IP changes frequently. Thus there must be individual camera reporting of the network IP to Wyze, because otherwise Wyze wouldn't be able access the cameras. I see that Wyze_mini_hacks has a scripting language, so perhaps a script could ping a specified receiver to update the WAN IP, but I am a monkey-at-a-typewriter for concocting such a script. |
Beta Was this translation helpful? Give feedback.
-
First, I love wz_mini_hacks! I monitor Wyze v3 with blue iris and it works great!
Now to my question: in a remote location I have starlink, which changes the IP frequently. I could use a solution like Dynu DNS to monitor the IP, but I am wondering if there is a way to have the Wyze cameras themselves reveal their IP via wz_mini, so that I would not need to run a PC or Pi at the remote location 24/7, just for the purpose of telling me the IP.
The cameras natively tell Wyze their IP, so somewhere this functionality exists, and I am hoping to access it remotely so that I can monitor the RTSP stream.
Beta Was this translation helpful? Give feedback.
All reactions