We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13736
    • 345 Posts
    Maybe someone here has some experience to lead to a possible solution.

    I have a client that sells security systems some of those have web access through the customers internet connection. Most of those customers don’t own a static IP nor do they really want to pay the price for occasional internet access to their security cameras (especially the home users).

    So the security company wants to explore the idea of taking the security camera servers for each customer (current brands or possibly something new if needed) and having it report it’s external IP address much the same way DirectUpdate and similar utilities do. Then attaching that to the customers login ID on MODx (or another CMS if necessary) and link directly to their camera feed.

    The trick I suppose is getting a camera server or possibly a router than can accept a plugin or already has the IP reporting feature built in. Then the question is how to link it into MODx. Third, how would we link the MODx login into the camera servers login to alleviate the need for a double login process (once for MODx then once for the cameras).

    On the MODx side of things, I presume that WebLoginPE could have a few custom fields added to store the ID, password and the dynamic ip address. But filling in that dynamic IP address automatically would have to be worked out. And then sending the users ID/Password to the camera server when that page is accessed would be the second hurdle.

    Anyone have any experience with security system or have a clue where I should even start to get all the pieces to fit together?

      • 33372
      • 1,611 Posts
      You don’t have to use the MODx user system for this if it’s not the simplest way to do it. You could easily write a simple snippet to protect the pages that the camera needs to log into based on whatever login data the camera is already programmed to send. Then if you like you could log the camera into a web user account via the snippet once its credentials are established, but that may or may not add something to the system.

      So if the camera already sends some identifying info, you could just set up TVs with that info on a page with a snippet that displays different content depending upon whether the login credentials match. You can get the camera’s current ip address on the MODx end easily enough just by consulting the PHP server array, so I don’t think that the camera needs to send that to you. You could set another TV to the correct ip address for cameras with static addresses, but for dynamic ones you could leave that blank and not require that it match (or you could require that it be on the same subnet if that remains constant).

      There is a dusty old front-end manager snippet in the repository that does something similar (but with MODx manager logins). Your login code would be completely different, of course, but the essential logic is the same. If the credentials match, show this content, and if not let em talk to the hand.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 13736
        • 345 Posts
        I’m not sure the camera is sending any login info. That might be something I’ll have to work out.

        As it currently works, the customer uses a static IP and types that into the web browser. Then the camera acts like a normal web server and puts up a page with a UserID/Password field. You enter your ID information and it gives you a web page with the video feeds from each camera.

        So with the new plan (to avoid requiring a static IP) the questions I have are

        • how to transmit the customers dynamic IP to MODx
        • how to attach that IP to the proper MODx user account
        • how to embed the camera’s web page into MODx (this one’s easy)
        • and if possible how to send preset camera UserID/Password to the camera’s login page for auto login.

        1 - So transmitting the dynamic IP to any place might will be our first hurdle. If the camera can’t send the IP then maybe someone makes a standalone hardware device that sits on the network to transmit the IP. And the least favorite option is to have another computer running to send out the data using one of the many available Windows utilities.

        2 - Once we get the IP sent out to MODx I’m not sure how to tell MODx what to do with it. I assume the IP would be transmitted with some kind of user identification code. I don’t know how that normally works. Then MODx could match that up to the users account every 10 minutes or whatever.

        Is this sort of method prone to getting hijacked somehow and a false IP inserted?

        3 - Embedding a web page from the camera into MODx should be pretty easy.

        4 - But to have an auto login option for the camera page based on predefined data in MODx might be the tricky part.

        ZAP, did I negate anything you said with my expanded comments?

          • 33372
          • 1,611 Posts
          I don’t think that you necessarily negated anything I said, but you did make your situation and goals more clear to me and that might cause me to change my answers...

          I thought that what you were dealing with was primarily the cameras logging into MODx, when it actually seems like that’s not a major factor. I’m pretty sure that you can find cameras that identify themselves one way or another using a dynamic ip, since they sell a ton of these to people with regular DSL and cable modem accounts and they just seem to work. I’ve never actually used one myself, however, so I’ll let someone who has (or your local web camera dealer) explain exactly how they work.

          So once you have a way to identify the cameras on your network, all you need to do is to group the right ones on a specific user’s page(s). So for that you can use WebLoginPE for the user account info and the MODx web user account/document groups system for access control. I think that you could store all of the specific info for each user’s page (camera info and ip addresses, status messages, etc.) as regular TVs or in the content itself, since each user would have their own page(s) and be forwarded there after login.

          So I guess that your only technical issue is figuring out how to reliably connect to the cameras that have dynamic ips, and that is likely an issue with a simple solution of which I’m ignorant. The rest is the usual setup for an access-controlled site with custom user pages, for which there are lots of tutorials and helpful posts in the forums. The WebLoginPE forum has been very active lately, and I’m sure that folks there would give you pointers based on their experience with it.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options