dony1971
(Dony)
June 27, 2019, 1:13am
21
I have same issue as well, get “image not available” in GUI
I can tell this happens after I update firmware
Debug log shown:
2019-06-26 18:15:54 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2759530000] Sending {‘id’: 16, ‘success’: False, ‘error’: {‘message’: ‘Unable to fetch image’, ‘code’: ‘image_fetch_failed’}, ‘type’: ‘result’}
2019-06-26 18:15:54 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.2759530000] Sending {‘id’: 15, ‘success’: False, ‘error’: {‘message’: ‘Unable to fetch image’, ‘code’: ‘image_fetch_failed’}, ‘type’: ‘result’}
marcoparco
(marcoparco)
August 7, 2019, 10:42am
22
I have FI9900P in my system works, this is my configuration
- platform: foscam
name: Resede
ip: 192.168.1.xxx
username: !secret foscam_user
password: !secret foscam_pswd
port: 88
vormsty
(Vormsty)
October 28, 2019, 1:24pm
23
Hello,
Is that a way to have a moving detection as a home assistant sensor ?
Is that a part of Foscam integration ?
Best regards
Thierry
finity
October 28, 2019, 6:13pm
24
No the Foscam integration only provides the camera stream.
You have to create a motion sensor yourself with a command-line sensor.
Here are two examples using two different cgi command formats. Use the one that matches your camera.
sensor:
- platform: command_line
name: "Kitchen Camera Motion"
command: curl -k --silent "http://192.168.1.51:8001/get_status.cgi?user=your_username&pwd=your_pwd"
value_template: >-
{% set status = value | regex_findall_index('alarm_status=(\d+);') %}
{%- if status == "0" -%}
None
{%- elif status == "1" -%}
Detected
{% else %}
Not Determined
{%- endif -%}
scan_interval: 3
- platform: command_line
command: curl -k --silent "http://192.168.1.52:8002/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=your_user&pwd=your_pwd"
name: "Garage Camera Motion"
value_template: >
{% set status = value | regex_findall_index('Alarm>(\d+)</motion') %}
{% if status == "0" %}
Disabled
{%- elif status == "1" -%}
None
{%- elif status == "2" -%}
Detected
{% else %}
Not Determined
{%- endif -%}
scan_interval: 3
3 Likes
fizzasist
(Randy C Carr)
December 15, 2020, 6:25pm
25
I have a Foscam FI8918W and cannot get it to work with HA. My code is very similar to marcoparco above but it’s not working for me. Any ideas?
fizzasist
(Randy C Carr)
December 15, 2020, 6:27pm
26
I have the ip, port and username/PW correct. It shows up as “idle” with a broken frame on the dashboard. Also says it does not have a unique ID (not sure if that is why it’s not working or not)
aceindy
(Aceindy)
December 15, 2020, 7:10pm
27
I used mjpeg url to get mine working😉
# Setup Mjpeg video stream for Foscam
camera:
- platform: mjpeg
name: "babycam"
mjpeg_url: !secret foscam_video_url
where secret is like
foscam_video_url: “http://192.168.1.11/videostream.cgi?user=foscamusr&pwd=545664 ”
fizzasist
(Randy C Carr)
December 15, 2020, 7:20pm
28
Thanks! That is similar to what got me going! Now to add PTZ controls…fingers crossed
aceindy
(Aceindy)
December 15, 2020, 7:26pm
29
# Motion detection
- platform: command_line
name: "Motion"
command: !secret foscam_status_url
value_template: >-
{% set status = value | regex_findall_index('alarm_status=(\d+);') %}
{%- if status == "0" -%}
None
{%- elif status == "1" -%}
Detected
{% else %}
Not Determined
{%- endif -%}
scan_interval: 3
where
foscam_status_url: curl -k --silent “http://192.168.1.11/get_status.cgi?user=foscamusr&pwd=528352773 ”
oh…PTZ is not patrol zone is it?
if you ment getting the camera to move…never managed to do that
I tried though…
fizzasist
(Randy C Carr)
December 15, 2020, 7:37pm
30
Yea I’d like to get those arrows to work
aceindy
(Aceindy)
December 15, 2020, 7:44pm
31
if you figured it out, let me know!