Wansview camera support

I was unsuccessful in using Generic MJPEG IP camera option to display using the following string.

.http://192.168.x.xx/mjpeg/videostream.cgi?chn=0&user=XXX&pwd=XXX

This format is used with Wansview camera and ran in my browser with no problems.

Hello,

do you already find the solution?

thanks

  1. In configuration.yaml

camera:

  • platform: local_file
    file_path: /home/pi/Pictures/snap.jpg
    name: Street
  1. create wainsview.sh file

while true;
do wget -r /home/pi/Pictures -A cgi http://admin:[email protected]/mjpeg/snap.cgi;
cd /home/pi/Pictures;
cp /home/pi/Pictures/192.168.2.110/mjpeg/snap.cgi snap.jpg;
sleep 10;
done

  1. make the file executable: chmod +x wainsview.sh

4)sudo nano /etc/rc.local

_IP=$(hostname -I) || true
if [ “$_IP” ]; then
printf “My IP address is %s\n” “$_IP”
fi
sudo hass -c /home/pi/.homeassistant &
sleep 20
sudo /home/pi/.homeassistant/wainsview.sh &
exit 0

  1. Obviously you can alter the subdirectories to suit your needs

I’m now using the generic platform and it’s still working:

Looking for the WANSVIEW camera support

This works for me:

camera:
  - platform: ffmpeg
    ffmpeg_bin: /usr/bin/avconv
    name: Dining Room
    input: -rtsp_transport tcp -i rtsp://USER:PASS@HOST:554/live/ch1
    extra_arguments: -pred 1 -q:v 2

I’ve got it streaming video.

1 Like

Hi. This was a 2-phase problem for me.
First off, I had to install ffmpeg on my raspberry pi ( v2)
then I had to add the correct entry to the configuration.yaml

I installed the ffmpeg easily enough:

sudo apt-get install ffmpeg

Then the configuration.yaml entry needs to look like:
camera:

this works now for me after weeks of searching. Thanks!

Hey guys,

i have an wansview w2 and the configuration above was not working for me (HassOS 2.12).
Here is my Solution (Important: it takes a little bit to work, may because of installing ffmpeg):

configuration.yaml

ffmpeg:

camera:
  - platform: mjpeg
    name: name of camera
    mjpeg_url: http://IP:PORT/mjpeg/stream.cgi?chn=0
    still_image_url: http://IP:PORT/mjpeg/snap.cgi?chn=0
    username: username
    password: password
    authentication: digest
    verify_ssl: false

Hi All

Does Anyone have a definitive answer to the wansview cameras as I still cannot get mine to work with any of the solutions above

many thanks

Paul

Hey Paul,

my config from janurary is still working. The Picture isn’t always shown in the overview, but when you click on it, you see the stream.

I use the “Picture Entity”, here is my Config for the card.

aspect_ratio: 50%
camera_image: camera.NAME
entity: camera.ENTITY_cam
hold_action:
 action: more-info
show_name: false
show_state: false
type: picture-entity

wansview have released an firmware update, try to update and after there is a rtsp link to use.

Like this

Hi All

Thanks for the replies

I got them up and running with the help of all the above

Many thansk

Paul

For the record, just managed to configure a wansview Y1 using the ONVIF integration (after enabling it using the vendor Android app). Commands (e.g. IR light toggle or reboot button) do not seem to work but the stream does.

Note that these cloud-oriented devices do not offer any web UI anymore. They seem to even hardcode a fallback DNS server because blocking DNS does not prevent them from appearing in the vendor app, but if your router does not allow you to block outbound traffic (like my ISP’s) it is possible to reconfigure the camera gateway IP to a dysfunctional one (by clicking on the device IP in the app) and then the device is cut off from the cloud; doing so will require a factory reset for reconfiguration though.

So, dirt cheap (25€) but not privacy friendly at all…

Note that if you cut it from the Internet, it will stop synchronizing it’s clock using NTP (and it drifts quite quickly), so enabling the “use wall clock as timestamp” is needed (otherwise the rtsp stream starts dropping).

For the record, i also managed to configure my Wansview Y1 with the generic camera integration, with the following options:

Still URL: http://IP:8899/api/v1/snap.cgi?chn=0
Stream URL: rtsp://IP:554/live/ch0 (this is H265, 2304x1296@15 fps capped around 1 Mbps)
Use wallclock as timestamp: True

Because rtsp://IP:554/live/ch0 is H265, it may not work on your browser (e.g. Linux based), another stream is available at rtsp://IP:554/live/ch1 and this one is H265 640x360@15 fps capped at around 360 kbps).

NB: the still URL port requires ONVIF to be enabled on the device – the same request on port 80 just fails with an HTTP 200 OK that returns unsupported process !! in the body), the port 8899 above is not a typo.