filipvh / hass-nhc2

Niko Home Control II Home Assistant Integration
MIT License
36 stars 26 forks source link

NHC Videophone (Videobuitenpost NHC) #42

Closed KRi570F closed 2 years ago

KRi570F commented 2 years ago

Videophone integration

it would be cool having this integrated into home assistant, by your module hass-nhc2

williammorren commented 2 years ago

you can just add it as a generic camera inside of home assistant.

KRi570F commented 2 years ago

Hi,

Thank you for letting me know. I’m almost completely new to Home Assistant. That generic camera doesn’t help ☹ can you please assist? IP: 10.27.0.53 Username: user Password: empty

@.***

@.***

@.***

Thank you in advance

Regards Kristof

Mvg Kristof

Van: @.> Verzonden: zondag 3 april 2022 14:43 Aan: @.> CC: @.>; @.> Onderwerp: Re: [filipvh/hass-nhc2] NHC Videophone (Videobuitenpost NHC) (Issue #42)

you can just add it as a generic camera inside of home assistant.

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffilipvh%2Fhass-nhc2%2Fissues%2F42%23issuecomment-1086860706&data=04%7C01%7C%7C3468c8ce147149ab424208da156f7e1b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637845865843114771%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=n8mFZlD2Ss2zIlioc6BUEhjHIyNUU%2BqXV1ZwZwrXuQ4%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA37WOBH35BKX44KXPGWGM3VDGG5LANCNFSM5QNQAF5A&data=04%7C01%7C%7C3468c8ce147149ab424208da156f7e1b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637845865843114771%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=aI5KGdoa%2FkKZy2q5Jk3rVykarUA9TcIMyiOxKe69jcs%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

SonnyBBQ commented 2 years ago

Try this by adding a generic camera through the UI ('generic' integration)

Still image: leave blank Stream source URL: add http://username:password@10.27.0.53:15110/pbhelper/stream.mjpeg?width=720&height=576?quality=80 RTSP transport:tick HTTP Authentication: basic Username: user Password: your password Verify SSL: untick

Note in the URL, you should update with your username, password and IP. Leave the port number at 15110

jonas87 commented 2 years ago

Try this by adding a generic camera through the UI ('generic' integration)

Still image: leave blank Stream source URL: add http://username:password@10.27.0.53:15110/pbhelper/stream.mjpeg?width=720&height=576?quality=80 RTSP transport:tick HTTP Authentication: basic Username: user Password: your password Verify SSL: untick

Note in the URL, you should update with your username, password and IP. Leave the port number at 15110

I can't get this to work. Does this only work for the default user? My username is my email address. Basically my username and password that work for https://mynikohomecontrol.niko.eu/ do not work for me to set up the camera. I had a similar problem that I could not get the NHC2 hass integration to work through the default user, but it worked through the hobby account. How do you even reset the password for the default account? I can only find instructions to reset the password for the email address linked account.

SonnyBBQ commented 2 years ago

The user and password for the camera are different then those of your NHC account. Default login is user: admin and password: 123qwe

Try accessing your camera first by going to the IP of your NHC installation, followed by port 15110. So example: http://10.27.0.53:15110 You should then be able to login with the above details.

NOTE - you can change the admin password through the camera link, but then it won't work within your NHC app anymore. NOTE 2 - When you change the password, it is capped to 14 characters (this is not stated anywhere)

KRi570F commented 2 years ago

well @SonnyBBQ and @jonas87 thanks for the feedback the two things comebined let it work for me i used the amdin account and the link without port :-)

http://username:password@ipaddress/pbhelper/stream.mjpeg?width=720&height=576?quality=80 username: admin password: 123qwe ipaddress: your ip address of the NHC Videophone

thomas-svrts commented 2 years ago

@KRi570F

did you use http://admin:qwe123@ip..... or did you use your email address? not very clear to which password you are referring because the 'generic camera' integration also asks a separate password. Already tried a lot of variations, in my access control app I use an email address as user.

image

SonnyBBQ commented 2 years ago

Hi Thomas, try a different solution...

add a MJPEG IP camera integration through the UI

Still image: http://10.27.0.53:15110/pbhelper/stream.mjpeg Stream source URL: http://10.27.0.53:15110/pbhelper/stream.mjpeg Username: admin Password: 123qwe Verify SSL: untick

Note in the URL, you should update with your IP. If it doesn't work, try removing the port number 15110 from the URL.

davidvf commented 1 year ago

Hi all,

Anyone else noticed that port 15110 is no longer available after upgrading to 2.16? It worked perfectly with 2.15... I had frigate running on top of the stream to detect persons or cars on my driveway, but that seems no longer possible now.. :(

anvarit commented 1 year ago

Can you do a network scan against the IP address to see if the port hasn't changed? You can use nmap (command line) or if on Windows zenmap https://phoenixnap.com/kb/nmap-scan-open-ports

After seeing this I'm not going to upgrade myself as this a integral part in my environment.

davidvf commented 1 year ago

Tried to reboot the controller, but no luck… nmap port scan is also not showing the port anymore :frowning:

Nmap scan report for xxxxx.iot (x.x.x.x) Host is up (0.00084s latency). Not shown: 65526 filtered ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https 3580/tcp open nati-svrloc 4443/tcp open pharos 5060/tcp open sip 5061/tcp open sip-tls 8883/tcp open secure-mqtt 8884/tcp open unknown

SonnyBBQ commented 1 year ago

I'm still on 2.15 and an NMAP scan is not showing the 15110 directly. Try scanning for the exact port: sudo nmap -p 15110 x.x.x.x

The difference in my ports versus your list is that I don't show the 8883 and 8884. Could you also try connecting to port 8884 (since tcp open unknown) and see if that gives you access to the camera?

davidvf commented 1 year ago

Connecting on 8884 using http gives me err_connection_reset. Using https err_empty_response

Starting Nmap 7.80 ( https://nmap.org ) at 2022-11-09 13:43 CET
Nmap scan report for xxxx.iot (x.x.x.x)
Host is up (0.00059s latency).

PORT      STATE    SERVICE
15110/tcp filtered unknown

Nmap done: 1 IP address (1 host up) scanned in 0.29 seconds
bccrew commented 1 year ago

image

Does this still work? Can you test the mjpeg URL on port 443?

The videophone is in fact a Robin SV

https://support.robintele.com/download_attachment.php?kb_att=306

davidvf commented 1 year ago
[david@owl:~ $] curl -u admin:xxxxx "http://x.x.x.x/camera/frame.jpeg"
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>404 Not Found</title>
 </head>
 <body>
  <h1>404 Not Found</h1>
 </body>
</html>
mherwege commented 1 year ago

8883/tcp open secure-mqtt 8884/tcp open unknown

8883 is the secure mqtt port used between the controller and the touch panels. 8884 is the secure mqtt port for the hobby api.

If the videophone is in your normal LAN address range, you may still be able to access it directly without the port number (so not the IP of the controller, but of the videophone). But it could be Niko close the port forwarding useful if the videophone is connected directly to the controller. Honestly, this was a potential security risk. Anyone mistakenly exposing the controller and port would be able to access the camera, as it has default passwords. Changing the password made it impossible to use it in the Niko system.

bccrew commented 1 year ago

The videophone is connected directly to one of the ports of the controller right? Does it receive an IP address in a private subnet different from your LAN? I believe it was like that. If you connect a laptop or switch on that port, do they also receive an IP address or is this DHCP server limited to certain mac address prefixes?

I remember that someone attached a 2nd NIC of a synology NAS in the VLAN of the video port of the controller to be able to access the video feed and record directly on his synology

davidvf commented 1 year ago

In my case the videophone is indeed directly connected to the controller. So it receives an IP from that controller, which is out of my reach. I haven't tried to connect a laptop to the controller, but i suppose it would probably work. I guess that is how the electrician initially did the programming of the controller before i moved in.

bccrew commented 1 year ago

I believe the connected controller does not do NAT to the IP address of the videophone in some way. In other words, you can not reach the subnet from your LAN. What you can try to do is find out which IP address is handed out to your videophone and try to put a switch in between and make a bridge to your LAN.

anvarit commented 1 year ago

Correct, the best way to receive the image / videos from the videophone is to put it on a seperate switch. As example, my video unit is on a POE switch and gets an IP out of my IoT network. Then my NVR reads out the videounit through RTSP with the following string rtsp://ip/rtsp/video.av on port 554 The NHC2 controllers finds videounit without any problems

PS: my NVR is BlueIris, that is integrated in HASS

slecompt commented 1 year ago

Just a small question to get some insight into the above solution. Does this mean you effectively connect the videophone to the WAN port of the Controller instead of using port 1,2 or 3? I also see that there is an option in the NHC programming software to configure port 3 to connect the Controller to an 'integrated' (IoT) home network, it seems the DHCP function is disabled in that case. I assume that only the switching function is left over in that configuration? Maybe connecting your home network directly (with your own DHCP server) to port 3 also provides the same functionality in that case? I tried this however and I didn't get any new devices visible in my subnet. Maybe the videophone was still using the old subnet and IP it got from the NHC DHCP server...

bccrew commented 1 year ago

WAN is only meant for internet connectivity and most likely uplink to your home router or network switch. Port 1, 2 and 3 normally function as an internal network that the NHC Controller uses to communicate with the controller. Although I have never tried it myself, you could try to see if your laptop receives a DHCP address when you hook it up to the port where your videophone is connected. If another port (1-2-3) has the same result, you can reach the video stream that way. Only thing left to do is find a way to integrate that subnet into your own LAN :)

slecompt commented 1 year ago

Correct, the best way to receive the image / videos from the videophone is to put it on a seperate switch. As example, my video unit is on a POE switch and gets an IP out of my IoT network. Then my NVR reads out the videounit through RTSP with the following string rtsp://ip/rtsp/video.av on port 554 The NHC2 controllers finds videounit without any problems

PS: my NVR is BlueIris, that is integrated in HASS

@anvarit, I assume in your solution the NHC2 controller finds the video unit through the WAN port?

davidvf commented 1 year ago

So i have hooked up my homeassistant server with a secondary interface to port 1 of the connected controller. Got an IP in the range 10.69.55.0/24 (port 2 is used for my video unit). The WAN interface is still connected to my LAN switch, otherwise i cannot use the hobby API anymore.

From there i was able to pick up the stream again. FYI port scan on the videophone

#nmap 10.69.55.228
Starting Nmap 7.80 ( https://nmap.org ) at 2022-12-15 14:12 CET
Nmap scan report for nikovds.fifthplay.com (10.69.55.228)
Host is up (0.0044s latency).
Not shown: 996 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
80/tcp  open  http
443/tcp open  https
554/tcp open  rtsp

connection to the stream is still working as before: http://admin:xxx@10.69.55.228/pbhelper/stream.mjpeg

Glad my frigate setup is up and running again :)

raftheunis87 commented 1 year ago

So i have hooked up my homeassistant server with a secondary interface to port 1 of the connected controlle

I'm trying to connect to my outdoor video doorbell using rtsp. I'm currently using VLC to keep it simple.

I did a nmap that gave me following results:

~ ❯ nmap 192.168.0.26 15:08:40 Starting Nmap 7.93 ( https://nmap.org ) at 2023-01-24 14:31 CET Nmap scan report for 192.168.0.26 Host is up (0.0055s latency). Not shown: 995 closed tcp ports (conn-refused) PORT STATE SERVICE 554/tcp open rtsp 6666/tcp open irc 8000/tcp open http-alt 8200/tcp open trivnet1 9010/tcp open sdr

Then I tried to connect to rtsp://192.168.0.26:554 in VLC and get a prompt for a username and password. I tried the admin:123qwe combo, but that doesn't seem to work :( Anyone else knows where I can get the credentials from?

raftheunis87 commented 1 year ago

@davidvf , Does it still work for you? I'm having this video doorbell btw from Niko: https://www.niko.eu/en/products/door-communication/digital-solutions/video-kit-2-wire-with-access-control-module-external-and-internal-video-unit-productmodel-niko-65aa624b-007c-5e06-8224-a11f834d7233

I just can't get it to work. It keeps prompting for a username and a password.

davidvf commented 1 year ago

@raftheunis87, for me it still works. I have this one: https://www.niko.eu/en/article/550-22001

This is the path i am using for my frigate instance: - path: http://admin:123qwe@10.69.55.228/pbhelper/stream.mjpeg?width=1280&height=720

From hass, i just do the frigate integration and it works flawlessly. I guess you can try the mjpeg stream like i do.

thomas-svrts commented 1 year ago

You have both different video doorbells. The one @raftheunis87 has doesnt work.

anvarit commented 10 months ago

Sadly, enough that is known issue. My installation suffers from the same. The product sets up a VOIP channel to the Niko Cloud system but it seems if you more then one stream running then it suffers from delays.

I didn't find a solution yet.


From: threster @.> Sent: Tuesday, October 17, 2023 18:29 To: filipvh/hass-nhc2 @.> Cc: Thomas Baetens @.>; Mention @.> Subject: Re: [filipvh/hass-nhc2] NHC Videophone (Videobuitenpost NHC) (Issue #42)

I have the niko videophone (videobuitenpost) and touchscreen connected to my switch. Connected controller with the WAN port is linked to the same switch. They find each other, no problem. In this way I can use Synology surveillance station as NVR to do motion detection, and record even if people don't actually ring the bell.

Problem is that after enabling surveillance station, when someone rings the bell and you pick up (either on the niko touchscreen or on mobile phone), the audio is stopped from both sides after about one second. Video on touchscreen or mobile app is fine. In surveillance station, I get notifications it lost connection to the videophone when someone rings the bell and it reconnects about 2 minutes later.

Having no usable audio in the niko app or touchscreen is a problem for me. Anyone having similar problems, solutions?

— Reply to this email directly, view it on GitHubhttps://github.com/filipvh/hass-nhc2/issues/42#issuecomment-1766769086, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHWG3CSPRWCG6KTKAR73L3X72W7RAVCNFSM5QNQAF5KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZWGY3TMOJQHA3A. You are receiving this because you were mentioned.Message ID: @.***>

flimofly commented 3 months ago

Sorry for reopening this old issue but has anyone had any success in opening the door through Home Assistant?

I have video door station 550-22011 (https://www.niko.eu/en/products/niko-home-control/ip-products/external-video-unit-productmodel-niko-9d1cdb0b-fada-4f48-ac40-1d796d583578)

In the 2019 API manual for the Robin video door station (https://www.robintele.com/images/downloads/How-To_The_Robin_API_v3.6.0_NL.pdf) there are commands for opening the door:

curl -u admin:<password> "http://<address>/api/v1/dooropener_open"

The same action is available via the web interface of the door station.

However, the result of this command is not actually to open the door, like in the Niko Home Control mobile app. One just hears a short ringtone while the relay is supposed to toggle but the relay does not actually move.

Could it be that the doorbell was wired wrong? But I would assume that in that case opening the door wouldn't work via the Niko Home Control mobile app either?