Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Finally, a HC2 / HCL Workaround to RTSP / H.264 IP Cameras - 100% Working solution


dimae

Recommended Posts

Hi all,

 

I would like to share a 100% working solution for HC2 / HCL users that want to use new IP cameras working with RTSP, H.264.

 

Problem: as you know Fibaro doesn't respect too much users demands. Fibaro only supports old IP cameras working with old streaming methods like MJPEG, using basic authentification... This is very bad, because it forces us to use old and unsecure technology. The best solution is that Fibaro supports newer protocols, RSTP, H.264, SSL authentication... But as you know, taking care of users is not the main Fibaro interest.

 

Workaround solution: using an old Android phone (or tablet) as a webserver proxy using 

Please login or register to see this link.

awesome app (3,5 EUR cost). The main idea is that tinyCam Monitor PRO connects to your cameras, serving at real-time MJPEG streams that Fibaro can watch perfectly fine :-) 

Yes, it sounds too naif but for me, it toke me years in order to find this solution...

 

In my example we will use Foscam C1

Please login or register to see this spoiler.

 

  • You should take care of user, password, IP including port (the same that you setup at tinyCam Monitor PRO Webserver)
  • JPG path: axis-cgi/jpg/image.cgi?camera=1
  • MJPG path: axis-cgi/jpg/image.cgi?camera=1
  • Check [ JPG ] 3 s. and Show it on main screen and [ v ] Send STOP
  •  

    If you have more than one camera, you need to add another IP Camera on Fibaro with exact configuration, but you should change in JPG and MJPG paths, camera=2, camera=3... and so on

     

    That's all!

     

    I hope you like it and it helps you :-)

    • Like 9
    Link to comment
    Share on other sites

    The topic has been moved from "

    Please login or register to see this link.

    " to "

    Please login or register to see this link.

    ".

     

    Temat został przeniesiony z "

    Please login or register to see this link.

    " do "

    Please login or register to see this link.

    ".

    Link to comment
    Share on other sites

    Finally a feasible solution. @dimae, u are absolutely right that support for modern IP Cams are way lacking in HC2/HCL. MJPEG is so obsoleted, and those security risks you have mentioned.

     

    I had trouble to include UniFi Video Cameras to HC2 without causing serious issues that I have to take the UVCs out from HC2.

    Link to comment
    Share on other sites

    15 hours ago, dimae said:

    Hi all,

     

    I would like to share a 100% working solution for HC2 / HCL users that want to use new IP cameras working with RSTP, H.264.

     

     


    Someone please give him an award!  @dimae

    • Thanks 1
    Link to comment
    Share on other sites

    hi!

     

    alternative solution - use own web server (for example rpi)

     

    create php file with content

    Please login or register to see this code.

    192.168.1.32 your rtsp cam

     

    Please login or register to see this attachment.

     

    • Like 1
    Link to comment
    Share on other sites

    Hi @10der do you mind to elaborate for non programmer like me?
    How do i create an php file to decode rtsp into mjpeg?

    in the example seems like it is converting into jpeg instead of mjpeg

     

     

    192.168.1.32 your rtsp cam
     

    192.168.1.28  = rasp ip?


    what if there's more than 1 camera?

    Thanks in advance =)

    Link to comment
    Share on other sites

  • Topic Author
  • 31 minutes ago, jamietang said:

    Hi @10der do you mind to elaborate for non programmer like me?
    How do i create an php file to decode rtsp into mjpeg?

    in the example seems like it is converting into jpeg instead of mjpeg

     

     

    192.168.1.32 your rtsp cam
     

    192.168.1.28  = rasp ip?


    what if there's more than 1 camera?

    Thanks in advance =)

    I guess you could create 2 files, camera1.php, camera2.php and so on... However this method requires more skills, too hard for me ;-)

     

    36 minutes ago, 10der said:

    hi!

     

    alternative solution - use own web server (for example rpi)

     

    create php file with content

    Please login or register to see this code.

    192.168.1.32 your rtsp cam

     

    Please login or register to see this attachment.

     

     

    thanks for sharing it! Can you please share how to stop/start services, what is required? where to put camera.php and so?

    Thanks!

    Link to comment
    Share on other sites

    1 hour ago, jamietang said:

    Hi @10der do you mind to elaborate for non programmer like me?
    what if there's more than 1 camera?

    Thanks in advance =)

    3

     

    :)

     

    dnZCjyfg4S.png

     

    foscam

     

     

    http://192.168.1.28/camera.php?usr=admin&pwd=admin&ip=192.168.1.15

     

    btw

     

    foscam have a native command 

     

    http://192.168.1.15:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=admin

     

     

    Please login or register to see this attachment.

    Edited by 10der
    Link to comment
    Share on other sites

    • 2 weeks later...

    Is it possible to run this on a Synology NAS, Docker?

    Link to comment
    Share on other sites

    Just now, Sjekke said:

    Is it possible to run this on a Synology NAS, Docker?

    it works on my QNAP without docker

    Link to comment
    Share on other sites

  • Topic Author
  • On 7/5/2018 at 8:34 PM, 10der said:

    it works on my QNAP without docker

    very interesting! 

    so you need to php running, what else? I asked you before... and I am asking today again :-), if you don't mind, could you please share it? I mean, what software is needed? Php? codec? any libs? 

     

    super thanks

    Edited by dimae
    Link to comment
    Share on other sites

     

     

    here is script

     

    Please login or register to see this code.

     

    here is how to use

     

    its' Xiaomi Ants Xiaoyi Smart Camera Night Vision with RSTP only protocol

     

    Please login or register to see this image.

     

    fields user and password pass-thru via basic auth to script 

     

    JPG path. and MJPG path.

     

    /camera.php?ip=192.168.1.32:554&endpoint=ch0_1.h264

     

    notice:

     

    Please login or register to see this code.

     

     

     

    Edited by 10der
    • Thanks 2
    Link to comment
    Share on other sites

  • Topic Author
  • WoW! Thanks!

    I will try it for sure. Thank you

    Link to comment
    Share on other sites

    • 4 weeks later...
    On 5/11/2018 at 8:13 PM, dimae said:

    WoW! Thanks!

    I will try it for sure. Thank you

    Hi @dimae

     

    did you tried it?

    Link to comment
    Share on other sites

  • Topic Author
  • On 6/3/2018 at 10:11 PM, Sjekke said:

    Hi @dimae

     

    did you tried it?

    no chance for experiments yet :-(

    Link to comment
    Share on other sites

    • 2 weeks later...
    On 4/23/2018 at 1:40 PM, dimae said:

    Hallo zusammen,

     

    Ich möchte eine 100% -ige Arbeitslösung für HC2 / HCL-Benutzer freigeben, die neue IP-Kameras verwenden möchten, die mit RSTP, H.264 arbeiten.

     

    Problem : Wie Sie wissen, respektiert Fibaro nicht zu viele Benutzeranforderungen. Fibaro unterstützt nur alte IP-Kameras, die mit alten Streaming-Methoden wie MJPEG arbeiten, mit einer grundlegenden Authentifizierung ... Das ist sehr schlecht, weil es uns zwingt, alte und unsichere Technologie zu verwenden. Die beste Lösung ist, dass Fibaro neuere Protokolle, RSTP, H.264, SSL-Authentifizierung unterstützt ... Aber wie Sie wissen, ist die Pflege der Benutzer nicht das wichtigste Interesse von Fibaro.

     

    Workaround-Lösung: Verwenden Sie ein altes Android-Telefon (oder Tablet) als Webserver Proxy mit 

    Please login or register to see this link.

    App (3,5 EUR Kosten). Die Hauptidee ist, dass der tinyCam Monitor PRO mit Ihren Kameras verbunden ist und Echtzeit-MJPEG-Streams bereitstellt, die Fibaro perfekt überwachen kann:-) 

    Ja, es klingt zu naiv, aber für mich hat es mich Jahre gekümmert, um diese Lösung zu finden ...

     

    In meinem Beispiel werden wir Foscam C1 verwenden

    Please login or register to see this link.

     

    Tinycam Monitor Pro Konfiguration:

     

    1. Installieren Sie

      Please login or register to see this link.

      auf Ihrem alten Android-Telefon im selben Netzwerk wie Ihre HC2 / HCL und stellen Sie sicher, dass Ihr Telefon rund um die Uhr funktioniert, wie es bei Ihren Kameras der Fall ist .u9U1qxL.png
    2. Konfigurieren Sie Ihre Kamera wie gewohnt
    3. Gehe zu tinyCam Monitor PRO / menu / Einstellungen / Web Server, setze ein starkes Admin-Passwort und wähle einen Port (ich benutze den Standard-Port 8083).
    4. Gehen Sie zu tinyCam Monitor PRO / menú / Aktivieren Sie den Webserver und überprüfen Sie die Nachricht: "Der Webserver läuft unter http://192.168.1.10:8083"
    5. Testen Sie es in Ihrem Computerbrowser, Google Chrome als Beispiel und melden Sie sich mit Ihrem Admin / Passwort von Schritt 3 an. Sie werden einen Begrüßungsbildschirm mit einigen Informationen sehen können. Ich empfehle, dass Sie "Hintergrund-Modus" und "Power-Safe-Modus" aktivieren. In meinem Fall habe ich 2 x RSTP H.264 IP-Kamera und verwendet etwa 30% CPU (2014 Android-Handy).

     

    Fibaro HC2 Konfiguration:

     

    1. Fügen Sie eine neue IP-Kamera hinzu, wählen Sie als Modell  Axis Generic und gehen Sie zur Registerkarte Erweitert

      Please login or register to see this link.

    2. Sie sollten sich um Benutzer, Passwort, IP einschließlich Port kümmern (das selbe, das Sie auf dem tinyCam Monitor PRO Webserver eingerichtet haben)
    3. JPG-Pfad: axis-cgi / jpg / image.cgi? Kamera = 1
    4. MJPG-Pfad: axis-cgi / jpg / image.cgi? Kamera = 1
    5. Überprüfen Sie [JPG] 3 s. und Zeige es auf dem Hauptbildschirm und [v] Sende STOP

     

    Wenn Sie mehr als eine Kamera haben, müssen Sie eine weitere IP-Kamera auf Fibaro mit genauer Konfiguration hinzufügen, aber Sie sollten in JPG und MJPG Pfaden ändern, Kamera = 2, Kamera = 3 ... und so weiter

     

    Das ist alles!

     

    Ich hoffe es gefällt dir und es hilft dir :-)

    Hallo,

    wenn ich die =Kamera 2 einstelle habe ich immer Bild von der ersten Kamera

    Gibt es da eine Lösung?

    Grüße

    Link to comment
    Share on other sites

    Guest Sebdb66

    Is there a version of TinyCam Monitor Pro (or some other software) that would run on a Raspberry PI , so the conversion could look a little more professional than having an always on Android phone ?

    Link to comment
    Share on other sites

    4 hours ago, Sebdb66 said:

    Is there a version of TinyCam Monitor Pro (or some other software) that would run on a Raspberry PI , so the conversion could look a little more professional than having an always on Android phone ?

    FFMPEG. Plenty of tutorials on the Web. Here is a good start: 

    Please login or register to see this link.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...