Author Topic: Tenvis IP camera  (Read 8643 times)

0 Members and 1 Guest are viewing this topic.

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Tenvis IP camera
« on: March 02, 2015, 12:26:36 PM »
Hey guys,

Not sure if this is technically a feature request as I imagine there is already a way to do this. (Although a Tenvis plugin would be awesome.)

Sooooo... I have a Tenvis IP camera which has can be turned on and off and set to focus on a particular stored location amongst other things. You can do this by visiting it's IP with a browser, logging in and using one of the several methods therein activex mode, server push mode, and VLC plugin mode.

I'm interested in controlling most of those aspects using vox but mostly the ability to turn motion detection on and off (the camera has built in functionality to email you images without the PC being turned on) and it does so whenever it detects movement.

Question is, has anyone used Vox to do any of the above? I can foresee it being really useful to extend my alarm system project.

It's one of these:  http://www.amazon.co.uk/gp/aw/d/B00H759YXA/ref=aw_wl_ov_dp_1_7?colid=11KM16IONPSKC&coliid=I2YFMCJ2EBTT14&vs=1

You know what I'm like, I'm pretty good at manipulating stuff but pretty shoddy when it comes to anything else. Is there something in vox that can tap in to one of these "modes"? I'm guessing it's probably something straight forward but any advice would be appreciated.  I can think of all sorts of cool things I could do with it with some help from one of you fine gents / ladies.

Thanks,

-P
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Tenvis IP camera
« Reply #1 on: March 02, 2015, 12:55:57 PM »
Most likely it is just a matter of figuring out the correct scrape url to use.  You are the most likely candidate for figuring this out since you actually have the camera to play with.

If there is a web interface, start by looking at the html and what kind of stuff happens when you click on a button.  With my camera the video feed used activeX but the actual controls were regular html.

Worst case scenario you would need to get wireshark running so you can eaves drop on what the web interface is sending to the camera.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Tenvis IP camera
« Reply #2 on: March 02, 2015, 01:37:12 PM »
Options may be similar to those discussed here for the FOSCAM IP camera: http://voxcommando.com/forum/index.php?topic=932.0

If you can't figure out the URLs to use, you could set up RoboBrowser to interact with your camera's web page. (It can do this visibly or invisibly.)
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Tenvis IP camera
« Reply #3 on: March 02, 2015, 02:15:41 PM »
Doesn't look like it's happening :(

There's no change in the URL when clicking around.

Found this, but none of those URLs work for me, and none of them are the functionality I was looking for anyway: http://forum.tenvis.com/viewtopic.php?f=13&t=8723

Annoyingly a browse around the camera's URL doesn't actually have any way to turn the camera on and off anyway so that's likely out the window regardless.  Something to switch the motion detection on and off is what I'm really interested in but whichever mode I choose the URL just stays the same when ticking the box and/or when pressing submit.  Right clicking doesn't give me the option to copy the URL so I presume that means I won't find it the easy way, if I view source on the page there's barely anything there so I presume it is coded in some way that my little brain is unlikely to ever fathom.

I've never used wireshark.  Is it easy enough to use and is it likely I'll find an answer with it?

-P

xxx



Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Tenvis IP camera
« Reply #4 on: March 02, 2015, 02:32:15 PM »
I've never used wireshark.  Is it easy enough to use and is it likely I'll find an answer with it?


It would require some time and determination.  Without a fair measure of both I'd say that success is less than likely.  You might have more luck Googling around a bit to see if someone out there has figured some of this out already (which I guess you've already done to some extent).

With RoboBrowser though, you can automate the clicking of things to some extent, even if you can't figure out the underlying structure.

Turning motion detection on and off would likely be an administrative task so some sort of authentication would be involved.  That doesn't make it impossible but might complicate things.  I never tried to figure out how to do it on mine, but it would likely be a challenge.  Why not just leave it on all the time, and turn on/off whatever command responds to the events?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Tenvis IP camera
« Reply #5 on: March 02, 2015, 02:39:01 PM »
Also, instead of "viewing source" it is usually a good idea to use Chrome and "inspect element".  Most likely it is calling some javascript so you'd need to figure out what it is calling and try to look at that.  Not always easy...

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Tenvis IP camera
« Reply #6 on: March 02, 2015, 02:50:48 PM »
The alert function of the camera is independent of the PC.  If I switch it on it immediately starts emailing me whenever the camera itself detects motion and won't stop doing so until I log in to the GUI and turn it off.  My hope is to have Vox turn it on when I leave the house and then the PC's can go into standby and I will still get alerts if there is movement because the camera does all the work.  When I come home I will use Tasker to bring the PC's back out of standby as I pull on to the driveway so I can then tell Alexander to turn the alert function off again.

I tried inspect element on your suggestion.  I've found this under 'event listeners' for the "Upload image on alarm" tick box...

handler: function subiaoanxia()
isAttribute: true
lineNumber: 355
listenerBody: "function subiaoanxia()↵{↵   subiao = true;↵}"
node: document
sourceName: "http://192.168.0.241:82/alarm.htm"
type: "mousedown"
useCapture: false

Something tells me that isn't a huge help

Robo browser sounds like it could be a huge help and useful for me in other scenarios too!  I took a look at the wiki and I've installed the plugin, restarted vox and gone to edit...

I added a command called RoboB Camera motion and I seem to be stuck at the first hurdle thereafter.  As a test I added RoboB.Navigate and put the action in as http://www.bbc.co.uk

I pressed Save and execute but it seems to do nothing.  Am I doing it wrong, or is it doing something invisible to me?  If so how do I make it visible?

xxx
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Tenvis IP camera
« Reply #7 on: March 02, 2015, 03:02:29 PM »
Did you read this part of the wiki page that you looked at? http://voxcommando.com/mediawiki/index.php?title=RoboBrowser#Other_Notes
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Tenvis IP camera
« Reply #8 on: March 02, 2015, 03:11:38 PM »
looks like there may be a way to switch the motion alarm on and off using something along the lines of

Code: [Select]
/cgi-bin/hi3510/param.cgi?cmd=setmdalarm&-switch=off
The problem would be to figure out how to authenticate.  There are some "broad stokes" explanation of how to do that on the link you provided earlier, but it's obviously something that would take some time, motivation, and experimentation to figure out.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Tenvis IP camera
« Reply #9 on: March 02, 2015, 03:26:32 PM »
Do you have your IP cam user set up as an administrator account? From what I'm reading online, apparently the http commands won't work unless you're an admin user.

Probably a long shot, but if you're set up as an admin account, you could try the following URL in your browser to see what it shows:

Code: [Select]
http://YOURCAMIP:YOURCAMPORT/cgi-bin/hi3510/param.cgi?username=YOURADMINUSERNAME&userpwd=YOURADMINPWD&cmd=getmdalarm
« Last Edit: March 02, 2015, 03:38:49 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Tenvis IP camera
« Reply #10 on: March 02, 2015, 04:09:47 PM »
Hahaha. Evidently I didn't read the article very well.

Thanks guys, this all sounds promising.

The woman has now commandeered the PC to watch 'Suits' so I'll give all of this a go when I get chance and let you know how I get on.

Xxx
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Tenvis IP camera
« Reply #11 on: March 02, 2015, 05:39:22 PM »
Hi Paul, this camera looks really similar to my Foscam. Did you tried the commands from the post which nime5ter suggest?
***********  get excited and make things  **********

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Tenvis IP camera
« Reply #12 on: March 29, 2015, 07:07:18 AM »
Hi all,

Finally got round to taking another look at this.

Sadly the URLs you guys suggested just come back with file not found.  I wondered if I was at least authenticated so I tried navigating to the normal url from there but it immediately asks for username and password.  I suddenly realised Ispy must be authenticating so dug through its settings and found this...

http://192.168.0.241:82/videostream.asf?user=admin&pwd=*****&resolution=32&rate=0

So I tried that in Internet explorer and it launches Media Player (though isn't able to display anything), I presume therefore that this is the format required to authenticate on to the camera, but Windows just doesn't know how to handle the feed thereafter.

I don't know what to change the above to in order to send it a command though.  I took a few guesses...

http://192.168.0.241:82/user=admin&pwd=*****&cmd=getmdalarm 
404 not found

http://192.168.0.241:82/user=admin&pwd=*****&cmd=setmdalarm&-switch=off
404 not found

http://192.168.0.241:82/user=admin&pwd=*****/cgi-bin/hi3510/param.cgi?cmd=setmdalarm&-switch=off
404 not found

http://192.168.0.241:82/cgi-bin/hi3510/param.cgi?cmd=setmdalarm&-switch=off/user=admin&pwd=*****
404 not found


Help me Obi Wan Kenobi, you're my only hope.

-P

xxx
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Tenvis IP camera
« Reply #13 on: March 29, 2015, 08:01:39 AM »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)