Foscam Universal Internal Device Type (HD\Non-HD with Alarm\LED\PTZ Control)

No signature of method: script1431464699863659316672.metadata() is applicable for argument types: (script1431464699863659316672$_run_closure1) values: [script1431464699863659316672$_run_closure1@299a7402] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Getting this error, any suggestions?

After I installed thatā€¦my picture is at the bottom of the app screen instead of at top. Weird or intended? Everything works though!!

I noticed this device type mysteriously stopped working for me today. It turns out the code no longer works as expected when evaluating a boolean comparison to a string. i.e. hdcamera == ā€œtrueā€ now evaluates to false even when hdcamera holds a boolean true. Or perhaps hdcamera which came from preferences was a string before but is now a boolean, which I suspect is more likely the case.

I had to change all places to treat hdcamera as a real boolean rather than a string. Not sure what changes on the smartthings side happened, but I imagine there could be lots of other problems elsewhere with other code. Also wondering if Iā€™m possibly the only one experiencing this new phenomenon.

1 Like

@herbcarroll Iā€™m experienced the same thing, I figured out the same issue that you did. I changed them all to bool as well, and it is working for me.

You would only noticed it on the hdcamera or flipping or mirroring the display.

I put up my changes and submitted them @skp19 githubā€¦

You can see my patch here

it was simple and seems to be working well.

Iā€™m having the same experience with a FI8910W as @Ron, where the ST app will stick on ā€˜Takingā€™, and none of the controls seem to actually work. Iā€™ve made sure to use the latest code found in this thread for the device but I canā€™t seem to get it to actually do anything with the camera (ie, none of the pan/tilt controls work, it never captures images). Iā€™ve probably spent a week tooling around with this thing and while it works fine from its own webpage, I canā€™t get it integrated into ST and Iā€™m really frustrated. Any advice out there?

@reacean I had the same problem but I just had to update because the boolean were being evaluated differently.

What are you getting in your log when you do the Take button?

I see events in the log for the camera device that indicates it is sending commands to the camera, but the camera logs indicate no activity whatsoever.

Date Source Type Name Value User Displayed Text Changed
2015-06-30 1:56:09.083 PM UTC
moments ago COMMAND take take command was sent to Basement Cam true
2015-06-30 1:56:08.982 PM UTC
moments ago DEVICE hubactionMode local Basement Cam hubaction mode is local true
2015-06-30 1:56:08.574 PM UTC
moments ago DEVICE hubactionMode s3 Basement Cam hubaction mode is s3 true

And hereā€™s from the live logging when trying to pan right (login info censored):
c4daed89-782c-4f83-bf3a-c96bddcd509b 9:52:11 AM: debug /decoder_control.cgi?command=4&onestep=1&user=&pwd=
c4daed89-782c-4f83-bf3a-c96bddcd509b 9:52:11 AM: debug Executing hubaction on 192.168.1.40:12312
c4daed89-782c-4f83-bf3a-c96bddcd509b 9:52:11 AM: debug Device Network Id set to c0a80128:3018

Iā€™m relatively new to SmartThings, so Iā€™m just not sure where the disconnect is here. ST is acting like itā€™s talking to the device, instead of failing with errors I can actually follow up with.

@reacean What code are you using for your devicetype? Can you send me the link to what the latest you are using? Iā€™ll compare to mine and see if i can figure out why you are getting the error.

You are using a Foscam 8910W right?

1 Like

@thrash99er I am using the code you posted just above my first reply. And yes, it is a 8910W.

Ok @reacean let me try and test it out.

@reacean What is the Live Logging say when you try and take a picture? Also, are you using the internal IP of the camera or DNS name?

@thrash99er Using the internal IP, is that not correct?

Here is the live logging when attempting to take a picture:
c4daed89-782c-4f83-bf3a-c96bddcd509b 2:15:52 PM: debug /snapshot.cgi?user=****&pwd=*****
c4daed89-782c-4f83-bf3a-c96bddcd509b 2:15:52 PM: debug Executing hubaction on 192.168.1.40:88
c4daed89-782c-4f83-bf3a-c96bddcd509b 2:15:52 PM: debug Device Network Id set to c0a80128:0058
c4daed89-782c-4f83-bf3a-c96bddcd509b 2:15:52 PM: debug Taking Photo

(note, Iā€™ve changed ports since my last post in my many attempts to fix this)

@reacean Before the taking photo log, are you getting something like

Parsing ā€˜index:01, mac:E8ABFA01A2BF, ip:0A6162A6, port:1F9A, requestId:4b3f45d9-2ed8-491f-99ec-c9d32d2f4546, headers:SFRUUC8xLjEgMAwIE9LDQpTZXJ2ZXI6IEJvYS8wLjk0LjEzDQpEYXRlOiBUdWUsIDMwIEp1biAyMDE1IDIyOjM2OjE4IEdNVA0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluDQpDb250ZW50LUxlbmd0aogNA0KQ2FjaGUtQ29udHJvbDogbm8tY2FjaGUNCkNvbm5lY3Rpb246IGNsb3Nl, body:b2suCg==ā€™

and after the snapshot.cgi something like this

3:35:51 PM: debug Parsing ā€˜index:01, mac:E8ABFA01A2BF, ip:0A6162A6, port:1F9A, requestId:c7717362-6ec6-446d-a2b3-372cd712a71d, bucket:smartthings-device-conn-temp, key:c2f0fbb2-58f7-4c19-b8e7-3a96f7d5157ā€™

@reacean Also, is the user you are trying to take the snapshot as, a Visitor, Operator or Administrator on the Foscam Camera?

I am not, and the account Iā€™m trying to use is set as an ā€˜operatorā€™ level. I was going to try bumping it to admin but I donā€™t think Iā€™m even getting communication between the hub and the camera, and confused why that is the case.

EDIT: I deleted everything and re-entered it all (again), and now it seems to be (mostly) working. The alarm does not seem to function, but snapshots, panning and tilting, etc seem to.

Thanks @thrash99er. I committed your changes on github.

Iā€™ve been out for a little but wanted to come in and check out whatā€™s going on. Iā€™m a little bummed to see other people are forcing donations and using other peopleā€™s code while just adding a little to it. I guess to each his own.

ive donated regardless as i think its great work, downloaded and installed and thought id try my luck with seeing if it worked with a TENVIS IPROBOT3 (they are essential foscams rebranded like most) but no luck . . . any chance of a tweak to make it work for IPROBOT3 ? :slight_smile: :slight_smile: :slight_smile: :slight_smile:

@xneo1 - did you have any luck getting an IPROBOT3 to work in the SmartThings app?

@AutomateEverything if the API is the same then it should work. I did a quick search and it looks similar. Do you have any error messages in the logs?

Hi! Iā€™m pretty new (certainly to this thread), but I pick up on things quickly.

Iā€™ve added a new device using @thrash99erā€™s code and was able to add the device and attempt to configure. I cannot get a picture to show unfortunately. I am working with a Foscam 8910w.

When editing preferences, should the ip be my no-ip.org address or my local IP (192.168.1.XX)? When entering user and password, I tried an admin account and a guest accountā€¦ neither do anything differently.

Any ideas or direction on where I can go next with this? I did update the ST app to the latest versionā€¦ is that the culprit?