Foscam app V2 (Appdaemon and HAdashboard)

in appdaemon.yaml
in the hadashboard section

  dash_compile_on_start: 1
  dash_force_compile: 1

lol Well I set that up and I’m still not able to see anything. When I access the filesystem with ssh I’m able to see the compiled directory but it’s sky blue and when I try to open it says that no such directory exists.

I’m getting this error in the appdaemon log, I know that I have the correct username and password set in the config though.

2018-02-13 13:43:39.726804 WARNING foscam: Access denied

so you get an acces denied from your camera.
that means that the ip, port, username or pasword is incorrect, or your cam uses different CGI statements.

The camera shows up in Home Assistant itself though. Everything else works, just not the camera feed in HADashboard

i am sorry but i am out of ideas.

I switched my whole home assistant up from a pi to a docker on my unraid server and ditched the hassio setup. Hopefully when I get appdaemon back up and running I’ll be able to get this working finally.

1 Like

Alright so I’m back! lol.
I finally was able to get everything set back up and was able to get appdaemon running on my unraid server in a docker container.

Everything was running great until I tried adding the foscam app. I’m getting these errors in the log and the app isn’t running.

2018-03-27 18:56:26.002494 WARNING AppDaemon: Unexpected error in worker for App foscam:

2018-03-27 18:56:26.002614 WARNING AppDaemon: Worker Ags: {'name': 'foscam', 'id': UUID('29a9fa53-d150-46ef-8f48-a93533c330a1'), 'type': 'timer', 'function': <bound method foscam.get_sensors of <foscam.foscam object at 0x146bd41d40f0>>, 'kwargs': {'interval': 10}}

2018-03-27 18:56:26.002695 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 18:56:26.002908 WARNING AppDaemon: Traceback (most recent call last):

File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 529, in worker
funcref(self.sanitize_timer_kwargs(app, args["kwargs"]))
File "/conf/apps/foscam.py", line 161, in get_sensors
data = self.send_command("getDevState")
File "/conf/apps/foscam.py", line 365, in send_command
response =requests.get(self.url + command,timeout=10)
AttributeError: 'foscam' object has no attribute 'url'

there must be more and other errors before that.
what did you set in your foscam.yaml?

what did you download, from where and when?

1 Like

From what I could tell the docker log just had that same error over and over.

This is what I have added in the apps.yaml

foscam:
  class: foscam
  module: foscam
  camsettings:
    camera_type: R2
    camera_name: livingroom
    host: 192.168.1.26
    port: '9013'
    user: myusername
    password: mypassword
  logsettings:
    loglevel: WARNING
    logsensorlevel: WARNING
    last_error_sensor: sensor.foscam_last_error
  picsettings:
    brightness_slider: input_number.foscam_brightness
    contrast_slider: input_number.foscam_contrast
    hue_slider: input_number.foscam_hue
    saturation_slider: input_number.foscam_saturation
    sharpness_slider: input_number.foscam_sharpness
    default_pic_settings_switch: input_boolean.foscam_default_picture_settings
    flip_switch: input_boolean.foscam_flip
    mirror_switch: input_boolean.foscam_mirror
    auto_infrared_switch: input_boolean.foscam_auto_infrared
    infrared_switch: input_boolean.foscam_infrared
  ptzsettings:
    left_right_slider: input_number.foscam_left_right
    up_down_slider: input_number.foscam_up_down
    start_cruise_select: input_select.foscam_preset_cruise
    stop_cruise_switch: input_boolean.foscam_stop_cruise
    zoom_slider: input_number.foscam_zoom
    preset_points_select: input_select.foscam_preset_points
  alarmsettings:
    motion_sensor: sensor.foscam_motion
    motion_switch: input_boolean.foscam_motion_detect
    soundalarm_sensor: sensor.foscam_sound_alarm
    sensor_update_time: '10'
  recordsettings:
    snap_picture_switch: input_boolean.foscam_snap_picture_now
    recording_sensor: sensor.foscam_recording
    save_snap_dir: /mnt/user/Data/Recordings
  dashboardsettings: 
    use_dashboard: True
    create_dashboard: True
    create_alarm_dashboard: True
    dashboard_file_name: livingroom_cam_dash
    alarm_dashboard_file_name: livingroom_cam_alarm_dash
    screen_width: 1024
    screen_height: 600
    show_full_screen_dashboard: True
    full_screen_alarm_switch: input_boolean.foscam_toon_alarm_dash
    time_between_shows: 60
    show_time: 30

I got the files from here that I just set up last night

thx.

you are using V2 that is only going to work with appdaemon V2
and my gut tells me that you are using appdaemon v3.

i already updated the app for that and you can find it here:

as i stated in the readme here:

in the near future i will change my apps to version 3

Foscam V1 (deprecated)
Foscam V2 (deprecated)
Foscam V3 (updated for appdaemon 3.0) GitHub - ReneTode/Foscam-app: An App for Appdaemon to control foscam cameras

1 Like

Ah yeah I didn’t even notice that I was on V3! So should I just use foscam.yaml instead of adding the lines to the apps.yaml now?

in V3 apps.yaml is a collection from every yaml file you have in your apps dir.
you can create 1 big apps.yaml or use a lot of small yaml files that go with every app.

but at least you need to use the right .py file :wink:

the big advantage from v3 is that we now can share complete apps including yaml and people dont need to edit other files anymore.
but we still need to get used to it :wink:

1 Like

Ok so I got the correct files in now and have control of the camera but am getting the same issue I had before with not being able to see the camera feed or turn on the motion detection.

I’m starting to suspect that it might be the camera itself. I just noticed I have the Foscam R2 V2 and not the original. Do you think that could have anything to do with it?

Here’s the log.

2018-03-27 21:04:51.990086 INFO AppDaemon Version 3.0.0 starting

2018-03-27 21:04:51.990237 INFO Configuration read from: /conf/appdaemon.yaml
2018-03-27 21:04:51.990699 INFO AppDaemon: Starting Apps
2018-03-27 21:04:51.997313 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-03-27 21:04:52.019172 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-03-27 21:04:52.019397 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-03-27 21:04:52.019564 INFO Starting Dashboards
2018-03-27 21:04:52.022841 INFO API is disabled
2018-03-27 21:04:52.055301 INFO AppDaemon: HASS: Connected to Home Assistant 0.65.6
2018-03-27 21:04:52.100877 INFO AppDaemon: Got initial state from namespace default
2018-03-27 21:04:54.114944 INFO AppDaemon: Reading config
2018-03-27 21:04:54.131737 INFO AppDaemon: /conf/apps/apps.yaml added or modified
2018-03-27 21:04:54.131854 INFO AppDaemon: /conf/apps/apps.yaml added or modified
2018-03-27 21:04:54.131925 INFO AppDaemon: App 'hello_world' added
2018-03-27 21:04:54.131996 INFO AppDaemon: App 'foscam' added
2018-03-27 21:04:54.132119 INFO AppDaemon: Adding /conf/apps to module import path
2018-03-27 21:04:54.132402 INFO AppDaemon: Loading App Module: /conf/apps/hello.py
2018-03-27 21:04:54.139751 INFO AppDaemon: Loading App Module: /conf/apps/foscam.py
2018-03-27 21:04:54.143299 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2018-03-27 21:04:54.208920 INFO hello_world: Hello from AppDaemon
2018-03-27 21:04:54.209701 INFO hello_world: You are now ready to run Apps!
2018-03-27 21:04:54.209780 INFO AppDaemon: Initializing app foscam using class foscam from module foscam
2018-03-27 21:04:54.435085 WARNING foscam: Access denied

2018-03-27 21:04:54.483122 WARNING foscam: motiondata couldnt be read

2018-03-27 21:04:54.530512 WARNING AppDaemon: foscam: Entity input_select.foscam_preset_points not found in AppDaemon

2018-03-27 21:04:54.530705 WARNING AppDaemon: foscam: Entity input_select.foscam_preset_cruise not found in AppDaemon

2018-03-27 21:04:54.532084 INFO foscam: App started without errors
2018-03-27 21:04:54.579241 INFO AppDaemon: App initialization complete
2018-03-27 21:05:37.662818 INFO HADashboard: New dashboard connected: Bedroom Dash
2018-03-27 21:06:16.136950 INFO Compiling dashboard 'livingroom_cam_dash'
2018-03-27 21:06:16.265847 WARNING Variable definition not found in CSS Skin variables: $i0n2468

2018-03-27 21:06:16.339194 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title_style

2018-03-27 21:06:16.339332 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title2_style

2018-03-27 21:06:16.339410 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_minvalue_style

2018-03-27 21:06:16.339515 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_maxvalue_style

2018-03-27 21:06:16.339609 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_value_style

2018-03-27 21:06:16.339716 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_slider_style

2018-03-27 21:06:16.339807 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_widget_style

2018-03-27 21:06:16.422802 INFO Loading custom widget 'custom_widgets.jpg'
2018-03-27 21:06:16.422955 INFO Loading custom widget 'custom_widgets_new.jpg'
2018-03-27 21:06:16.423099 INFO Loading custom widget 'custom_widgets_new2.jpg'
2018-03-27 21:06:16.423203 INFO Loading custom widget 'custom_widgets_new3.jpg'
2018-03-27 21:06:16.423314 INFO Loading custom widget 'heater.yaml'
2018-03-27 21:06:16.423420 INFO Loading custom widget 'iconsensor.yaml'
2018-03-27 21:06:16.423544 INFO Loading custom widget 'input_select.yaml'
2018-03-27 21:06:16.423656 INFO Loading custom widget 'light_with_brightness.yaml'
2018-03-27 21:06:16.423766 INFO Loading custom widget 'light_with_colorpicker.yaml'
2018-03-27 21:06:16.423875 INFO Loading custom widget 'new_input_slider.yaml'
2018-03-27 21:06:16.423982 INFO Loading custom widget 'radial.yaml'
2018-03-27 21:06:16.424100 INFO Loading custom widget 'readme.md'
2018-03-27 21:06:16.424218 INFO Loading custom widget 'temperature.yaml'
2018-03-27 21:06:16.424334 INFO Loading custom widget 'vertical_input_slider.yaml'
2018-03-27 21:06:16.424458 INFO Loading custom widget 'baseheater'
2018-03-27 21:06:16.424802 INFO Loading custom widget 'baseiconsensor'
2018-03-27 21:06:16.425117 INFO Loading custom widget 'baseradial'
2018-03-27 21:06:16.425430 INFO Loading custom widget 'baseselect'
2018-03-27 21:06:16.425763 INFO Loading custom widget 'baseslider_new'
2018-03-27 21:06:16.426087 INFO Loading custom widget 'baseslider_vertical'
2018-03-27 21:06:16.426410 INFO Loading custom widget 'basetemperature'
2018-03-27 21:06:16.426735 INFO Loading custom widget 'base_light_with_brightness'
2018-03-27 21:06:16.427060 INFO Loading custom widget 'base_light_with_colorpicker'
2018-03-27 21:06:16.566493 INFO function [get_dashboard] finished in 429 ms
2018-03-27 21:06:16.801770 INFO Compiling dashboard 'livingroom_cam_dash'
2018-03-27 21:06:16.844513 INFO HADashboard: New dashboard connected: camera
2018-03-27 21:06:16.932619 WARNING Variable definition not found in CSS Skin variables: $i0n2468

2018-03-27 21:06:17.005758 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title_style

2018-03-27 21:06:17.005902 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title2_style

2018-03-27 21:06:17.005985 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_minvalue_style

2018-03-27 21:06:17.006071 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_maxvalue_style

2018-03-27 21:06:17.006153 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_value_style

2018-03-27 21:06:17.006234 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_slider_style

2018-03-27 21:06:17.006315 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_widget_style

2018-03-27 21:06:17.089075 INFO Loading custom widget 'custom_widgets.jpg'
2018-03-27 21:06:17.089227 INFO Loading custom widget 'custom_widgets_new.jpg'
2018-03-27 21:06:17.089317 INFO Loading custom widget 'custom_widgets_new2.jpg'
2018-03-27 21:06:17.089431 INFO Loading custom widget 'custom_widgets_new3.jpg'
2018-03-27 21:06:17.089552 INFO Loading custom widget 'heater.yaml'
2018-03-27 21:06:17.089648 INFO Loading custom widget 'iconsensor.yaml'
2018-03-27 21:06:17.089750 INFO Loading custom widget 'input_select.yaml'
2018-03-27 21:06:17.089846 INFO Loading custom widget 'light_with_brightness.yaml'
2018-03-27 21:06:17.089946 INFO Loading custom widget 'light_with_colorpicker.yaml'
2018-03-27 21:06:17.090050 INFO Loading custom widget 'new_input_slider.yaml'
2018-03-27 21:06:17.090144 INFO Loading custom widget 'radial.yaml'
2018-03-27 21:06:17.090233 INFO Loading custom widget 'readme.md'
2018-03-27 21:06:17.090322 INFO Loading custom widget 'temperature.yaml'
2018-03-27 21:06:17.090410 INFO Loading custom widget 'vertical_input_slider.yaml'
2018-03-27 21:06:17.090508 INFO Loading custom widget 'baseheater'
2018-03-27 21:06:17.090802 INFO Loading custom widget 'baseiconsensor'
2018-03-27 21:06:17.091084 INFO Loading custom widget 'baseradial'
2018-03-27 21:06:17.091363 INFO Loading custom widget 'baseselect'
2018-03-27 21:06:17.091669 INFO Loading custom widget 'baseslider_new'
2018-03-27 21:06:17.091956 INFO Loading custom widget 'baseslider_vertical'
2018-03-27 21:06:17.092249 INFO Loading custom widget 'basetemperature'
2018-03-27 21:06:17.092542 INFO Loading custom widget 'base_light_with_brightness'
2018-03-27 21:06:17.092836 INFO Loading custom widget 'base_light_with_colorpicker'
2018-03-27 21:06:17.231324 INFO function [get_dashboard] finished in 429 ms
2018-03-27 21:06:52.057784 WARNING foscam: Access denied

2018-03-27 21:06:52.106534 WARNING foscam: Access denied

2018-03-27 21:06:52.164205 WARNING foscam: motiondata couldnt be read

2018-03-27 21:06:52.202875 WARNING foscam: motiondata couldnt be read

2018-03-27 21:08:12.772475 WARNING foscam: Access denied

2018-03-27 21:08:12.822906 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 21:08:12.823034 WARNING AppDaemon: Unexpected error in worker for App foscam:

2018-03-27 21:08:12.823144 WARNING AppDaemon: Worker Ags: {'name': 'foscam', 'id': UUID('0d76b753-f6e0-48da-97aa-b0af0c4f542b'), 'type': 'attr', 'function': <bound method foscam.motiondetect_boolean_changed of <foscam.foscam object at 0x149ddad13780>>, 'attribute': 'state', 'entity': 'input_boolean.foscam_motion_detect', 'new_state': 'on', 'old_state': 'off', 'kwargs': {'on_command': 'setMotionDetectConfig&isEnable=1', 'off_command': 'setMotionDetectConfig&isEnable=0', 'reset': False, 'handle': UUID('df5c9549-a714-4203-9f6d-afacecbc2a80')}}

2018-03-27 21:08:12.823227 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 21:08:12.823477 WARNING AppDaemon: Traceback (most recent call last):

File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 538, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/conf/apps/foscam.py", line 228, in motiondetect_boolean_changed
if data[0].text == "0":
IndexError: string index out of range

2018-03-27 21:08:12.823557 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 21:08:17.078795 INFO Loading custom widget 'custom_widgets.jpg'
2018-03-27 21:08:17.078944 INFO Loading custom widget 'custom_widgets_new.jpg'
2018-03-27 21:08:17.079035 INFO Loading custom widget 'custom_widgets_new2.jpg'
2018-03-27 21:08:17.081688 INFO Loading custom widget 'custom_widgets_new3.jpg'
2018-03-27 21:08:17.081816 INFO Loading custom widget 'heater.yaml'
2018-03-27 21:08:17.081905 INFO Loading custom widget 'iconsensor.yaml'
2018-03-27 21:08:17.081995 INFO Loading custom widget 'input_select.yaml'
2018-03-27 21:08:17.082085 INFO Loading custom widget 'light_with_brightness.yaml'
2018-03-27 21:08:17.082175 INFO Loading custom widget 'light_with_colorpicker.yaml'
2018-03-27 21:08:17.082265 INFO Loading custom widget 'new_input_slider.yaml'
2018-03-27 21:08:17.082355 INFO Loading custom widget 'radial.yaml'
2018-03-27 21:08:17.082452 INFO Loading custom widget 'readme.md'
2018-03-27 21:08:17.082544 INFO Loading custom widget 'temperature.yaml'
2018-03-27 21:08:17.082634 INFO Loading custom widget 'vertical_input_slider.yaml'
2018-03-27 21:08:17.082724 INFO Loading custom widget 'baseheater'
2018-03-27 21:08:17.083060 INFO Loading custom widget 'baseiconsensor'
2018-03-27 21:08:17.083343 INFO Loading custom widget 'baseradial'
2018-03-27 21:08:17.083643 INFO Loading custom widget 'baseselect'
2018-03-27 21:08:17.083927 INFO Loading custom widget 'baseslider_new'
2018-03-27 21:08:17.084221 INFO Loading custom widget 'baseslider_vertical'
2018-03-27 21:08:17.084524 INFO Loading custom widget 'basetemperature'
2018-03-27 21:08:17.084814 INFO Loading custom widget 'base_light_with_brightness'
2018-03-27 21:08:17.085112 INFO Loading custom widget 'base_light_with_colorpicker'
2018-03-27 21:08:17.243467 INFO function [get_dashboard] finished in 485 ms
2018-03-27 21:08:19.342345 WARNING foscam: Access denied

2018-03-27 21:08:19.393660 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 21:08:19.393784 WARNING AppDaemon: Unexpected error in worker for App foscam:

2018-03-27 21:08:19.393943 WARNING AppDaemon: Worker Ags: {'name': 'foscam', 'id': UUID('0d76b753-f6e0-48da-97aa-b0af0c4f542b'), 'type': 'attr', 'function': <bound method foscam.motiondetect_boolean_changed of <foscam.foscam object at 0x149ddad13780>>, 'attribute': 'state', 'entity': 'input_boolean.foscam_motion_detect', 'new_state': 'off', 'old_state': 'on', 'kwargs': {'on_command': 'setMotionDetectConfig&isEnable=1', 'off_command': 'setMotionDetectConfig&isEnable=0', 'reset': False, 'handle': UUID('df5c9549-a714-4203-9f6d-afacecbc2a80')}}

2018-03-27 21:08:19.394024 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 21:08:19.394267 WARNING AppDaemon: Traceback (most recent call last):

File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 538, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/conf/apps/foscam.py", line 228, in motiondetect_boolean_changed
if data[0].text == "0":
IndexError: string index out of range

2018-03-27 21:08:19.394471 WARNING AppDaemon: ------------------------------------------------------------

2018-03-27 21:10:16.964230 INFO Compiling dashboard 'livingroom_cam_dash'
2018-03-27 21:10:17.076842 WARNING Variable definition not found in CSS Skin variables: $i0n2468

2018-03-27 21:10:17.150216 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title_style

2018-03-27 21:10:17.150356 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title2_style

2018-03-27 21:10:17.150435 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_minvalue_style

2018-03-27 21:10:17.150527 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_maxvalue_style

2018-03-27 21:10:17.150607 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_value_style

2018-03-27 21:10:17.150686 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_slider_style

2018-03-27 21:10:17.150764 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_widget_style

2018-03-27 21:10:17.076842 WARNING Variable definition not found in CSS Skin variables: $i0n2468

2018-03-27 21:10:17.150216 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title_style

2018-03-27 21:10:17.150356 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title2_style

2018-03-27 21:10:17.150435 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_minvalue_style

2018-03-27 21:10:17.150527 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_maxvalue_style

2018-03-27 21:10:17.150607 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_value_style

2018-03-27 21:10:17.150686 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_slider_style

2018-03-27 21:10:17.150764 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_widget_style

2018-03-27 21:10:17.233326 INFO Loading custom widget 'custom_widgets.jpg'
2018-03-27 21:10:17.233486 INFO Loading custom widget 'custom_widgets_new.jpg'
2018-03-27 21:10:17.233594 INFO Loading custom widget 'custom_widgets_new2.jpg'
2018-03-27 21:10:17.233716 INFO Loading custom widget 'custom_widgets_new3.jpg'
2018-03-27 21:10:17.233829 INFO Loading custom widget 'heater.yaml'
2018-03-27 21:10:17.233937 INFO Loading custom widget 'iconsensor.yaml'
2018-03-27 21:10:17.234046 INFO Loading custom widget 'input_select.yaml'
2018-03-27 21:10:17.234156 INFO Loading custom widget 'light_with_brightness.yaml'
2018-03-27 21:10:17.234269 INFO Loading custom widget 'light_with_colorpicker.yaml'
2018-03-27 21:10:17.234377 INFO Loading custom widget 'new_input_slider.yaml'
2018-03-27 21:10:17.234498 INFO Loading custom widget 'radial.yaml'
2018-03-27 21:10:17.234609 INFO Loading custom widget 'readme.md'
2018-03-27 21:10:17.234706 INFO Loading custom widget 'temperature.yaml'
2018-03-27 21:10:17.234833 INFO Loading custom widget 'vertical_input_slider.yaml'
2018-03-27 21:10:17.234964 INFO Loading custom widget 'baseheater'
2018-03-27 21:10:17.235374 INFO Loading custom widget 'baseiconsensor'
2018-03-27 21:10:17.235772 INFO Loading custom widget 'baseradial'
2018-03-27 21:10:17.236153 INFO Loading custom widget 'baseselect'
2018-03-27 21:10:17.236548 INFO Loading custom widget 'baseslider_new'
2018-03-27 21:10:17.236937 INFO Loading custom widget 'baseslider_vertical'
2018-03-27 21:10:17.237318 INFO Loading custom widget 'basetemperature'
2018-03-27 21:10:17.237716 INFO Loading custom widget 'base_light_with_brightness'
2018-03-27 21:10:17.238102 INFO Loading custom widget 'base_light_with_colorpicker'
2018-03-27 21:10:17.378113 INFO function [get_dashboard] finished in 414 ms
2018-03-27 21:12:17.963279 INFO Compiling dashboard 'livingroom_cam_dash'
2018-03-27 21:12:18.076176 WARNING Variable definition not found in CSS Skin variables: $i0n2468

2018-03-27 21:12:18.157094 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title_style

2018-03-27 21:12:18.157264 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_title2_style

2018-03-27 21:12:18.157378 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_minvalue_style

2018-03-27 21:12:18.157487 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_maxvalue_style

2018-03-27 21:12:18.157587 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_value_style

2018-03-27 21:12:18.157681 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_slider_style

2018-03-27 21:12:18.157779 WARNING Variable definition not found in CSS Skin variables: $vertical_input_slider_widget_style

2018-03-27 21:12:18.238593 INFO Loading custom widget 'custom_widgets.jpg'
2018-03-27 21:12:18.238759 INFO Loading custom widget 'custom_widgets_new.jpg'
2018-03-27 21:12:18.238877 INFO Loading custom widget 'custom_widgets_new2.jpg'
2018-03-27 21:12:18.238983 INFO Loading custom widget 'custom_widgets_new3.jpg'
2018-03-27 21:12:18.239085 INFO Loading custom widget 'heater.yaml'
2018-03-27 21:12:18.239192 INFO Loading custom widget 'iconsensor.yaml'
2018-03-27 21:12:18.239306 INFO Loading custom widget 'input_select.yaml'
2018-03-27 21:12:18.239411 INFO Loading custom widget 'light_with_brightness.yaml'
2018-03-27 21:12:18.239526 INFO Loading custom widget 'light_with_colorpicker.yaml'
2018-03-27 21:12:18.239633 INFO Loading custom widget 'new_input_slider.yaml'
2018-03-27 21:12:18.239744 INFO Loading custom widget 'radial.yaml'
2018-03-27 21:12:18.239854 INFO Loading custom widget 'readme.md'
2018-03-27 21:12:18.239962 INFO Loading custom widget 'temperature.yaml'
2018-03-27 21:12:18.240068 INFO Loading custom widget 'vertical_input_slider.yaml'
2018-03-27 21:12:18.240172 INFO Loading custom widget 'baseheater'
2018-03-27 21:12:18.240484 INFO Loading custom widget 'baseiconsensor'
2018-03-27 21:12:18.240784 INFO Loading custom widget 'baseradial'
2018-03-27 21:12:18.241087 INFO Loading custom widget 'baseselect'
2018-03-27 21:12:18.241389 INFO Loading custom widget 'baseslider_new'
2018-03-27 21:12:18.244313 INFO Loading custom widget 'baseslider_vertical'
2018-03-27 21:12:18.244646 INFO Loading custom widget 'basetemperature'
2018-03-27 21:12:18.244949 INFO Loading custom widget 'base_light_with_brightness'
2018-03-27 21:12:18.245256 INFO Loading custom widget 'base_light_with_colorpicker'
2018-03-27 21:12:18.381450 INFO function [get_dashboard] finished in 418 ms

I did notice that the end of my password is being used in the variable definitions error
2018-03-27 21:14:19.078726 WARNING Variable definition not found in CSS Skin variables: $i0n2468

that gives me the feeling that something is running twice

this tells me you havent added the right variables to the skin you use

this tells that the pasword and username provided for the cam are not correct

it can be you use a character like ë or / ? > . in your PW that is causing trouble.
i dont think that the V2 has much changed in the CGI against the R2

but we still have some work to do :wink:

The $ in my Home Assistant password is what’s been causing the issue with the camera feed this whole time :man_facepalming:

I’m still getting this error and I’ve checked and am using the right username and password, nor does the password have any special characters.

2018-03-28 00:58:44.314576 WARNING foscam: Access denied

2018-03-28 00:58:44.354129 WARNING AppDaemon: ------------------------------------------------------------

2018-03-28 00:58:44.354262 WARNING AppDaemon: Unexpected error in worker for App foscam:

2018-03-28 00:58:44.354379 WARNING AppDaemon: Worker Ags: {'name': 'foscam', 'id': UUID('ae9214a6-daa5-4a28-84fb-d03e220f74b3'), 'type': 'attr', 'function': <bound method foscam.motiondetect_boolean_changed of <foscam.foscam object at 0x154908bb6eb8>>, 'attribute': 'state', 'entity': 'input_boolean.foscam_motion_detect', 'new_state': 'off', 'old_state': 'on', 'kwargs': {'on_command': 'setMotionDetectConfig&isEnable=1', 'off_command': 'setMotionDetectConfig&isEnable=0', 'reset': False, 'handle': UUID('f760fefa-395c-4d6a-9bf5-a876cb1b07b9')}}

2018-03-28 00:58:44.354465 WARNING AppDaemon: ------------------------------------------------------------

2018-03-28 00:58:44.354676 WARNING AppDaemon: Traceback (most recent call last):

File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 538, in worker
self.sanitize_state_kwargs(app, args["kwargs"]))
File "/conf/apps/foscam.py", line 228, in motiondetect_boolean_changed
if data[0].text == "0":
IndexError: string index out of range

I’m able to control everything on the camera though as far as the infrared, tilt, zoom,flip picture, and picture settings control but am not able to control the motion sensor, take picture, mirror picture, and none of the camera presets show up.
If I try to click any of the buttons that don’t work I get access denied on the window

oke we are gettin there slowly.

did you read the footnotes from my readme and act on that?

the R2 type uses a slightly different configuration. to get it to work allright you need to edit the foscam.py find the lines that say getMotionDetectConfig and setMotionDetectConfig and change that to getMotionDetectConfig1 and setMotionDetectConfig1

1 Like

Ok I got that switched out and now the dashboard says changing motion detect is disabled.

In the apps.yaml I have R2 for the camera type. Should I have it set to R2 V2 instead?

i really have no clue from the options that your cam has and hasnt.
and what settings should be set in the cam app and how.

i tried to create my app as open as possible, so that it can work with most of the new type foscam cameras, but i only own 2 of them, so i can only debug those myself.

no you should use R2, because R2 V2 isnt added yet.
you are the first that uses this app with that cam.
if it works i will add it to the list with possible exceptions.

do you still have errors?
or just a warning?

I checked the rest of the footnotes and realized I never turned on the motion alarm in the foscam app. Jeez I don’t think I’ve ever misread something so many times in my life! lol

This is what the logs consisting of now.

2018-03-28 06:36:23.084886 INFO AppDaemon Version 3.0.0 starting

2018-03-28 06:36:23.085076 INFO Configuration read from: /conf/appdaemon.yaml
2018-03-28 06:36:23.085627 INFO AppDaemon: Starting Apps
2018-03-28 06:36:23.087435 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-03-28 06:36:23.116503 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-03-28 06:36:23.116815 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-03-28 06:36:23.116987 INFO Starting Dashboards
2018-03-28 06:36:23.123149 INFO API is disabled
2018-03-28 06:36:23.128043 INFO AppDaemon: HASS: Connected to Home Assistant 0.65.6
2018-03-28 06:36:23.165058 INFO AppDaemon: Got initial state from namespace default
2018-03-28 06:36:23.699288 INFO HADashboard: New dashboard connected: camera
2018-03-28 06:36:24.479672 INFO HADashboard: New dashboard connected: Bedroom Dash
2018-03-28 06:36:25.217385 INFO AppDaemon: Reading config
2018-03-28 06:36:25.237038 INFO AppDaemon: /conf/apps/apps.yaml added or modified
2018-03-28 06:36:25.237267 INFO AppDaemon: /conf/apps/apps.yaml added or modified
2018-03-28 06:36:25.237356 INFO AppDaemon: App 'hello_world' added
2018-03-28 06:36:25.237442 INFO AppDaemon: App 'foscam' added
2018-03-28 06:36:25.237616 INFO AppDaemon: Adding /conf/apps to module import path
2018-03-28 06:36:25.237950 INFO AppDaemon: Loading App Module: /conf/apps/hello.py
2018-03-28 06:36:25.247952 INFO AppDaemon: Loading App Module: /conf/apps/foscam.py
2018-03-28 06:36:25.254026 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2018-03-28 06:36:25.332019 INFO hello_world: Hello from AppDaemon
2018-03-28 06:36:25.333223 INFO hello_world: You are now ready to run Apps!
2018-03-28 06:36:25.333345 INFO AppDaemon: Initializing app foscam using class foscam from module foscam
2018-03-28 06:36:25.737500 WARNING AppDaemon: foscam: Entity input_select.foscam_preset_points not found in AppDaemon

2018-03-28 06:36:25.737694 WARNING AppDaemon: foscam: Entity input_select.foscam_preset_cruise not found in AppDaemon

2018-03-28 06:36:25.739703 INFO foscam: App started without errors
2018-03-28 06:36:25.784679 INFO AppDaemon: App initialization complete
2018-03-28 06:37:33.334039 WARNING foscam: Failed to snap picture

2018-03-28 06:38:36.526448 INFO HADashboard: Dashboard disconnected
2018-03-28 06:38:40.117120 INFO Compiling dashboard 'security_dash'
2018-03-28 06:38:40.725479 INFO Loading custom widget 'custom_widgets.jpg'
2018-03-28 06:38:40.725665 INFO Loading custom widget 'custom_widgets_new.jpg'
2018-03-28 06:38:40.725795 INFO Loading custom widget 'custom_widgets_new2.jpg'
2018-03-28 06:38:40.725924 INFO Loading custom widget 'custom_widgets_new3.jpg'
2018-03-28 06:38:40.728702 INFO Loading custom widget 'heater.yaml'
2018-03-28 06:38:40.728849 INFO Loading custom widget 'iconsensor.yaml'
2018-03-28 06:38:40.729010 INFO Loading custom widget 'input_select.yaml'
2018-03-28 06:38:40.729158 INFO Loading custom widget 'light_with_brightness.yaml'
2018-03-28 06:38:40.729280 INFO Loading custom widget 'light_with_colorpicker.yaml'
2018-03-28 06:38:40.729423 INFO Loading custom widget 'new_input_slider.yaml'
2018-03-28 06:38:40.729584 INFO Loading custom widget 'radial.yaml'
2018-03-28 06:38:40.729727 INFO Loading custom widget 'readme.md'
2018-03-28 06:38:40.729910 INFO Loading custom widget 'temperature.yaml'
2018-03-28 06:38:40.730073 INFO Loading custom widget 'vertical_input_slider.yaml'
2018-03-28 06:38:40.730236 INFO Loading custom widget 'baseheater'
2018-03-28 06:38:40.738696 INFO Loading custom widget 'baseiconsensor'
2018-03-28 06:38:40.751350 INFO Loading custom widget 'baseradial'
2018-03-28 06:38:40.754558 INFO Loading custom widget 'baseselect'
2018-03-28 06:38:40.758140 INFO Loading custom widget 'baseslider_new'
2018-03-28 06:38:40.759597 INFO Loading custom widget 'baseslider_vertical'
2018-03-28 06:38:40.760362 INFO Loading custom widget 'basetemperature'
2018-03-28 06:38:40.764083 INFO Loading custom widget 'base_light_with_brightness'
2018-03-28 06:38:40.767255 INFO Loading custom widget 'base_light_with_colorpicker'
2018-03-28 06:38:40.942546 INFO function [get_dashboard] finished in 828 ms
2018-03-28 06:38:41.276613 INFO HADashboard: New dashboard connected: Security Dash

The only things not working now are the presets, which I do have set up in the foscam app so I’m stumped there, and the take picture button, but I feel like that has something to do with the directory that I’m trying to save in.

can it be that you did set the presets while the app was running?
then they can be overwritten by the app.

  • close AD
  • set the presets from the cam as you want them
  • restart AD

the dir where you want to save the pics needs to be there and the user that you use to start appdaemon needs writing access to that dir.

1 Like