Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Wget dhcp leases

    Scheduled Pinned Locked Moved webGUI
    10 Posts 4 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Apathia
      last edited by

      I'm trying to write a script in raspbian to connect to my pfsense to check to see a device is online or not but I'm not sure how to go about it since the device has a static IP and always shows up in dhcp leases. Anyone have any tips?

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Why are you trying to check another device's status via pfSense? Talk with the device itself, not with the pfSense box.

        1 Reply Last reply Reply Quote 0
        • A
          Apathia
          last edited by

          Pinging my phone results in unreachable destination, and even if I were able to ping it, it'd take it out of sleep mode and drain the battery because I'd be pinging it every minute or so.

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            Getting the leases file doesn't indicate that the device is active.
            Just that it a asked for a DHCP lease at the moment mentioned in the file.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • A
              Apathia
              last edited by

              I'm just trying to write a script to stop my security camera from recording movement when I'm home, and currently the lease time is 2 hours but I could make it less.

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                "I'm just trying to write a script to stop my security camera from recording movement when I'm home"

                Should you be able to do that from the camera software?  You could prob do it with the APP if this than that.. Prob hooks to your camera software, etc.  You can have it do stuff like open your garage when get close to your house.. Would think it could do something with your camera's etc..

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • A
                  Apathia
                  last edited by

                  No it's just a rasberry pi with a camera, no advanced settings like that unless you make them yourself.

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    Well ok.. Can you setup your pi to check for an email  And if there is a email turn off the camera or if there is an email turn on the camera?  Like I was saying the IFTTT app has some real power to it.  You can setup geo location events.  So for example your phone enters geofence around your home do X.. When leaves does Y, so you could then have your pi check for these things and either turn on the camera or turn off the camera motion detection, etc.

                    http://www.howtogeek.com/221555/how-to-create-geographic-event-triggers-with-your-smartphone-and-ifttt/

                    Take a look at the maker channel. https://ifttt.com/maker

                    Should be simple enough to have a geofense setup for your home, and then if you leave or enter talk to your pi and tell it camera or not to camera, etc.  This might give you an idea to get you started
                    http://www.makeuseof.com/tag/ifttt-connect-anything-maker-channel/

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • A
                      Apathia
                      last edited by

                      Looks promising, thanks!

                      1 Reply Last reply Reply Quote 0
                      • johnpozJ
                        johnpoz LAYER 8 Global Moderator
                        last edited by

                        You can also do stuff when it joins a specific wifi network.. So for example when you get home and your phone joins your network, the IFTTT app could do something that turns off your camera, etc.

                        There are always multiple ways to skin the cat ;)  Sometimes people get 1 method in their heads and get stuck doing it only that way..

                        Which is why its always a good idea to give the details of what your actually trying to accomplish as the end goal, so that other methods of skinning that cat can be explored..

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 24.11 | Lab VMs 2.8, 24.11

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.