Tag: http

  • “Unable to load stream. Please make sure port 7446 is open on your NVR.”

    In case you are seeing the error message “Unable to load stream. Please make sure port 7446 is open on your NVR.” when trying to watch the live camera stream on your Unifi Video NVR system from Ubiquiti, then the solution is rather simple.

    The error is caused by the self-issued certificate that comes by default with the Unifi NVR. As Mozilla Firefox has strict SSL (HTTPS) rules making sure that one does not connect to the wrong or fake website as could happen in e.g. a phishing attempt. I have not tried myself but from what I have read apparently Google Chrome does not enforce this in the same manner making the stream work out of the box in Chrome.

    The solution is to open the URL to the video stream directly in a separate tab or window so that you can accept the self-signed certificate for the session:

    https://NVR_IP_address:7446

    The page itself will return an error after the certificate is accepted but that is fine, it is simply to accept the certificate. After that simply reload the NVR interface and the HTTPS video stream will work fine

    Please note that if you are accessing the NVR from an external network you may have a firewall instance blocking the actual port. This instead would require port forwarding to be set up and that is a different story.

  • Google Analytics XHTML compliance

    I had to add the Google Analytics code snippet to this site and had some issues with it validating as XHTML 1.1 and MIME type application/xhtml+xml which were solved at the end.

    The snippet is divided into two pieces of <script> tags and the first part is simply a feature to avoid getting warning messages from your browser if your page was server over SSL (https://). If your site serves pages in both HTTP and HTTPS then you can achieve the same through e.g. a server side scripting language such as PHP.

    The snippet needs to be changed to the following on HTTP pages:

    <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>

    and of course on HTTPS pages use this piece:

    <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></script>

    Now the second part of the code needs to be put between CDATA tags to properly isolate it. The code will now look like this except you need to introduce your own Google Analytics ID:

    <script type="text/javascript">
    //<![CDATA[
    var pageTracker = _gat._getTracker("UA-1234567-8");
    pageTracker._initData();
    pageTracker._trackPageview();
    //]]>
    </script>

    Now you can safely run the W3 Validator without any errors caused by Google Analytics.