• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with TOP-201 webcam
#1
Hi all!

I already signed up for the forum at 17/04/01, posted one question and got a reponse from pilino1234. But mysterically the account and the thread have vanished. So once more:

I'm new to pilight and really appreciate what you have achieved.

I use v7.0 and tried to connect a TOP-201 webcam. This is a cheap china device with virtually no documentation, but I've found the URL to get a jpeg as:

http://xxx.xxx.xxx.xxx/webcapture.jpg?co...&channel=1

Entering this in config.json works fine for the first time. But after the first update the picture is missing.

I've checked github for the source and found the update in pilight.js, line 601. To make the URL unique and prevent the webserver of the webcam from delivering an old picture from cache, the current time is appended to the URL separated by a ? or @.

The problem with my webcam is that it does not accept any unknown CGI-Parameter and in that case returns URL not found. Thanks to the advice from pilino1234 I changed the line in my local installation to use [ as a separator instead of @. Now everything works fine. I propose to make the delimiter before the appended time a parameter in config.json, so it can be adapted to the webcam.

Uli
 
Reply
#2
There was a hardware failure on the server more details.

Can you issue a Pull Request with the proposed changes via github ?
 
Reply
#3
Thanks for your response. Unfortunely I cannot issue a pull request and post a change, because I have no working tool chain to build and test pilight.

As far as I understand the code, a new optional option "separator" should be added in genericWebcamInit() in Webcam.c

In createWebcamElement() in pilight.js starting by line 601 the option should be questioned and if not empty used as separator instead of ? or & in building obj.attr

I have it now hardcoded in my local pilight.js. But I think this could be useful for other people working with webcams that use this strict syntax. It might be a good idea to mention the appending of datetime in the documention as well

Uli
 
Reply
#4
If there is demand for this, I could make a pull request for this feature. But I would like to hear from a couple of users who are able to test this with devices that require this first Smile
 
Reply
#5
Hi pilino1234!

Thanks for your reply. No problem for me, as i changed it in my local pilight.js.

In case you do a pull request, IMHO the german text's for shutter up/down should be changed from + and - to

56 up: "Hoch",
57 down: "Runter",

as this is clearer.

Uli
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Possible problem leaving ports open when connecting with python Tommybear1979 1 1,526 06-10-2016, 12:00 PM
Last Post: pilino1234
  Problem with DATE_ADD fleisch 1 1,545 03-28-2016, 02:48 PM
Last Post: Niek
  Problem on config.json aXpi 14 8,196 10-14-2015, 09:13 PM
Last Post: curlymo
  problem with pthread_setschedparam() martinr 1 2,623 02-04-2015, 12:02 PM
Last Post: curlymo
  Little Problem finding files suchalaugh 9 4,275 01-09-2015, 11:35 PM
Last Post: suchalaugh
  dht22 with wiringPi Problem splaxter 16 14,741 12-15-2014, 11:40 PM
Last Post: curlymo
  Problem with universal command cybersyx 0 1,495 11-04-2014, 03:26 PM
Last Post: cybersyx
  elro problem Bram 80 33,963 01-23-2014, 06:23 PM
Last Post: dmnkhhn
  installation problem 19roland70 9 9,826 11-16-2013, 09:42 PM
Last Post: creamers

Forum Jump:


Browsing: 1 Guest(s)