Jump to content

Foscam Alarm and ISY Variable?


ferdies

Recommended Posts

One option I am thinking of is by using ISY Variable, triggered by Foscam alarm directly to ISY.

 

Setting Variable to ON.

http://192.168.1.4/set_alarm.cgi?user=test&pwd=password&motion_armed=1&http=1&http_url=http://admin:password/192.168.1.2/rest/vars/set/2/88/1

 

My issue is on how to reset variable to ZERO once alarm has timed out. Is there a way to best possibly do this? Or should I wait for the bi-directional feature of ISY?

 

 

BTW - I am thinking of a simple way to do this instead of having a server in between. See this thread.

http://forum.universal-devices.com/viewtopic.php?f=51&t=8666&start=30

Link to comment

I haven't done this yet, but I would probably have a program (ProgramA) that triggers off the variable (VariableA) being set to 1 by the camera.

 

ProgramA immediately sets the variable back to 0, and starts another program, ProgramB.

 

ProgramB immediately sets VariableB to 1, then waits some set amount of time, and then sets VariableB back to 0.

 

Then you can key other programs off VariableB.

 

If motion happens and keeps happening, VariableB will be set to 1 and remain 1. When motion stops, after say 60 seconds, VariableB will go back to 0. In the meantime, the camera may set VariableA some number of times, but motion programs will only trip once.

Link to comment
Did this work for you? I cannot get the camera to work with alarm URLs containing a username and password.

 

Yes, I was able to do with Foscam on the URL and did not receive any error message. Checking the get_params.cgi, I got the results as per below. I am using FOSCAM with Device Firmware Version 11.37.2.56.

 

However, my ISY variable is not changing. Are you having the same issue?

post-3905-140474164548_thumb.jpg

Link to comment
  • 2 weeks later...
Did this work for you? I cannot get the camera to work with alarm URLs containing a username and password.

 

Yes, I was able to do with Foscam on the URL and did not receive any error message. Checking the get_params.cgi, I got the results as per below. I am using FOSCAM with Device Firmware Version 11.37.2.56.

 

However, my ISY variable is not changing. Are you having the same issue?

 

I was never able to get this working either after trying many options... http://foscam.us/forum/post44644.html#p44644

 

Sent from my Nexus 7 using Tapatalk

Link to comment

Don,

Thanks for trying to help with this, but it was acknowledged on the foscam forum link, and through many tests by myself and others on the other udi forum link I listed that the foscam firmware does not allow having a username and password embedded in the URL, and that is the only way the ISY will do authorization with the rest interface. So we are stuck with using a proxy.

 

Sent from my Nexus 7 using Tapatalk

Link to comment

I went one further - wireshark on a monitor port on my switch. The Foscam works as expected when a simple URL is present, however when the URL contains a username and password it does not even establish a TCP connection with a SYN packet. The camera just send to think the URL is invalid and refuses to use it.

Link to comment
I went one further - wireshark on a monitor port on my switch. The Foscam works as expected when a simple URL is present, however when the URL contains a username and password it does not even establish a TCP connection with a SYN packet. The camera just send to think the URL is invalid and refuses to use it.

 

Yes, you were the one I was referring to that did a lot of testing on this subject viewtopic.php?p=111432#p111432

 

 

 

Sent from my Nexus 7 using Tapatalk

Link to comment
Don,

Thanks for trying to help with this, but it was acknowledged on the foscam forum link, and through many tests by myself and others on the other udi forum link I listed that the foscam firmware does not allow having a username and password embedded in the URL, and that is the only way the ISY will do authorization with the rest interface. So we are stuck with using a proxy.

 

Sent from my Nexus 7 using Tapatalk

Here is my point.

 

First. Please remember that I have absolutely no idea of what you do or don't have access to.

 

Whatever HTTP URL you use could be used to pass that information to the URL you would like to use.

 

Meaning the HTTP URL launches some php/script URL that in fact actually does the formatting for the real URL.

 

So, when you say proxy. I think of a proxy as being located on another system vs. calling a URL on the same system that uses a the real URL that is failing directly from the camera.

 

I have no idea of what the ISY series supports.

 

Don

 

The ISY does not support what you suggest. It has to be done by a proxy as detailed in the other post.

 

Sent from my Nexus 7 using Tapatalk

Link to comment

Please see these:

 

http://wiki.universal-devices.com/index ... ver_Module

 

http://wiki.universal-devices.com/index ... er_Example

 

Your saying that what I am suggesting can't be implemented by using one of the above solutions?

 

Don

 

Yes that is what I am saying. The webserver does not have a way to do it, and the Rest interface requires username and password which is the original problem.

 

Sent from my Nexus 7 using Tapatalk

Link to comment

I agree. I don't think the Foscam will follow a 3xx redirect presented by the server. Nor do I think you can have the ISY username and password passed to the REST api of the ISY as parameters.

Link to comment
I agree. I don't think the Foscam will follow a 3xx redirect presented by the server. Nor do I think you can have the ISY username and password passed to the REST api of the ISY as parameters.

 

That is correct. If we could send username and password as parameters that would also solve the original problem. I think I requested UDI to support that...

 

Sent from my Nexus 7 using Tapatalk

Link to comment
Have you tried that? It contains Javascript which has to be run on the client side, which in this case is the camera, so I don't see how that will work.

 

Sent from my Nexus 7 using Tapatalk

My point is. That even using Java, please see the link I provided in my prior post. You should be able to launch something that can go to the "Real" URL without any need to included the User Id and Password in the HTTP URL in the camera.

 

I know absolutely "Nothing" about ISY hardware. That said. Even the Java example shown in my last link seems capable to do this. Without the need of a proxy.

 

Maybe some other ISY users with programming experience using the web/java interfaces has better suggestions on what methods should be used. But most likely there are methods that can be used. Without the need of a proxy.

 

Don

 

It's not Java. It's Javascript, which is very different... Neither the camera or ISY support Javascript so it's not possible the way you suggest. I appreciate you trying to help, but if you don't know the hardware/software supported by the ISY then it's not really helpful.

 

Sent from my Nexus 7 using Tapatalk

Link to comment

That's fine, but the Foscam can't run that.

 

The Foscam can only call a simple URL without a username or password, and a simple GET request.

 

Not much the ISY can do without a correctly supplied username and password. Hence the need for an intermediate script.

Link to comment

An understanding of your intentions you mentioned above would have been helpful. Both MWareman and myself are seasoned ISY user/programmer types along with others in the posts I mentioned above. It was confirmed by UDI that there didn't seem to be a way to do this without a proxy.

 

The easiest fix for this is for the foscam set_alarm to allow the URL with embedded username/password, or have the ISY REST interface allow passing the username/password as parameters.

 

It would be awesome to have a cleaner interface between foscam and ISY so any help you can provide would be appreciated.

 

Sent from my Nexus 7 using Tapatalk

Link to comment

We know that using a proxy like you mentioned with Google works, examples using a web server on a nas device were posted. To do it with Google opens a lot of security issues that I don't want to get into. I have requested a change for the ISY firmware, of course it is possible, but it was given low priority by UDI.

 

Sent from my Nexus 5 using Tapatalk

Link to comment

Hi jimsearle,

 

If you are trying to have the camera call ISY, the camera will need to include the HTTP Authentication header otherwise ISY will refuse it.

 

The format of the Authorization header is:

Authorization: Basic Base64(userid:password)

 

Where, base64 converts the string representation of userid followed by ‘:’ and followed by the password.

 

As an example, the Authorization header for userid=admin , password= admin is:

Base64(admin:admin) YWRtaW46YWRtaW4=

 

Therefore the Authorization header shall be:

 

Authorization: Basic YWRtaW46YWRtaW4=

 

 

With kind regards,

Michel

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...