Foscam camera with lots of controls

yeah, it tells that appdaemon isnt connected to HA.
clear your logs, and restart Appdaemon and see if there are problems.

github page can not load

sorry, i did a complete reorganize from my github.

https://github.com/ReneTode/My-AppDaemon/tree/master/apps/foscam_app_v1

1 Like

My appdaemon not work :disappointed_relieved:

ha@orangepizero:~/.appdaemon$ sudo systemctl status [email protected]
[email protected] - AppDaemon
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-09-25 15:49:12 ICT; 3min 52s ago
Process: 1478 ExecStart=/home/ha/homeassistant/bin/appdaemon -c /home/%i/.appdaemon/conf/appdaemon.cfg (code=exited, status=1/FAILURE)
Main PID: 1478 (code=exited, status=1/FAILURE)

Sep 25 15:49:07 orangepizero systemd[1]: Started AppDaemon.
Sep 25 15:49:12 orangepizero appdaemon[1478]: Traceback (most recent call last):
Sep 25 15:49:12 orangepizero appdaemon[1478]: File “/home/ha/homeassistant/bin/appdaemon”, line 9, in
Sep 25 15:49:12 orangepizero appdaemon[1478]: load_entry_point(‘appdaemon==2.1.10’, ‘console_scripts’, ‘appdaemon’)()
Sep 25 15:49:12 orangepizero appdaemon[1478]: File “/home/ha/homeassistant/lib/python3.5/site-packages/appdaemon/admain.py”, line 198, in main
Sep 25 15:49:12 orangepizero appdaemon[1478]: config.read_file(open(config_file_conf))
Sep 25 15:49:12 orangepizero appdaemon[1478]: TypeError: invalid file: None
Sep 25 15:49:12 orangepizero systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Sep 25 15:49:12 orangepizero systemd[1]: [email protected]: Unit entered failed state.
Sep 25 15:49:12 orangepizero systemd[1]: [email protected]: Failed with result ‘exit-code’.

how did you install appdaemon?
what is in your appdaemon logfiles?

you use appdaemon.cfg? what version from appdaemon did you install?
you should have 2 files:
appdaemon.yaml (containing general settings)
apps.yaml (containing appsettings)

the settings from add_to_app.yaml on my github should be added to apps.yaml

I follow this guide Installing AppDaemon on Ubuntu with virtualenv to install.
my appdaemon==2.1.10
I test appdaemon running with file example from source install, i have two file appdaemon.yaml and
apps.yaml. (Test with example hello.py).
I get error when start appdaemon, you can see image i upload.

Thank you very much your quick reply.

Show us your content of your config files

1 Like

the info and links in that topic are outdated.
you are running and old version from appdaemon.

the up to date version and docs can be found here:
http://appdaemon.readthedocs.io/en/latest/INSTALL.html

1 Like

Thank you! appdaemon working.

But when i add foscam config, app daemon not work

my appdaemon.yaml

AppDaemon:
logfile: STDOUT
errorfile: STDERR
logsize: 100000
log_generations: 3
threads: 10
HASS:
ha_url: http://192.168.10.110:8123
ha_key:

my apps.yaml file

hello_world:
module: hello
class: HelloWorld
foscam:
module:foscam
class: foscam
host: xxxx
port: xxx
user: xxx
password: xxx
sensor_update_time: “10”
motion_sensor: sensor.foscam_motion
recording_sensor: sensor.foscam_recording
soundalarm_sensor: sensor.foscam_sound_alarm
up_down_slider: input_slider.foscam_up_down
left_right_slider: input_slider.foscam_left_right
infrared_switch: input_boolean.foscam_infrared
auto_infrared_switch: input_boolean.foscam_auto_infrared
motion_switch: input_boolean.foscam_motion_detect
zoom_slider: input_slider.foscam_zoom
preset_points_select: input_select.foscam_preset_points
start_cruise_select: input_select.foscam_preset_cruise
stop_cruise_switch: input_boolean.foscam_stop_cruise
brightness_slider: input_slider.foscam_brightness
contrast_slider: input_slider.foscam_contrast
hue_slider: input_slider.foscam_hue
saturation_slider: input_slider.foscam_saturation
sharpness_slider: input_slider.foscam_sharpness
default_pic_settings_switch: input_boolean.foscam_default_picture_settings
mirror_switch: input_boolean.foscam_mirror
flip_switch: input_boolean.foscam_flip
snap_picture_switch: input_boolean.foscam_snap_picture_now
save_snap_dir: /home/ha/image

hello_world:
  module: hello
  class: HelloWorld

watch the indent

yours muste be :slight_smile:

hello_world:
  module: hello
  class: HelloWorld
foscam:
  module:foscam
  class: foscam
  host: xxxx
  port: xxx
  user: xxx
  password: xxx
  sensor_update_time: "10"
  motion_sensor: sensor.foscam_motion
  recording_sensor: sensor.foscam_recording
  soundalarm_sensor: sensor.foscam_sound_alarm
  up_down_slider: input_slider.foscam_up_down
  left_right_slider: input_slider.foscam_left_right
  infrared_switch: input_boolean.foscam_infrared
  auto_infrared_switch: input_boolean.foscam_auto_infrared
  motion_switch: input_boolean.foscam_motion_detect
  zoom_slider: input_slider.foscam_zoom
  preset_points_select: input_select.foscam_preset_points
  start_cruise_select: input_select.foscam_preset_cruise
  stop_cruise_switch: input_boolean.foscam_stop_cruise
  brightness_slider: input_slider.foscam_brightness
  contrast_slider: input_slider.foscam_contrast
  hue_slider: input_slider.foscam_hue
  saturation_slider: input_slider.foscam_saturation
  sharpness_slider: input_slider.foscam_sharpness
  default_pic_settings_switch: input_boolean.foscam_default_picture_settings
  mirror_switch: input_boolean.foscam_mirror
  flip_switch: input_boolean.foscam_flip
  snap_picture_switch: input_boolean.foscam_snap_picture_now
  save_snap_dir: /home/ha/image
2 Likes

Thanks! i understant need indent. After copy config file to http://www.yamllint.com/ i found where wrong

appdaemon work but i can move or zoom … on home assistant.

seems like you have a camera that can’t work with this app.
which camera type do you have?
do you know with which CGI it can work?

My camera is foscam R2

seems to be oke.
so i think you have an error in your host, port, username or password.

it must be like

host: 192.168.0.45
port: "88" 
username: yourusername
password: yourpass

notice the quotes with port
no symbols allowed in password like - or _ or & or %

Thanks! i can move vertical or horizon but slider always return 0 value.

ha@orangepizero:~$ sudo systemctl status [email protected] -l
[email protected] - AppDaemon
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: active (running) since Wed 2017-09-27 17:55:57 ICT; 2min 43s ago
Main PID: 2162 (appdaemon)
CGroup: /system.slice/system-appdaemon.slice/[email protected]
└─2162 /home/ha/homeassistant/bin/python3.5 /home/ha/homeassistant/bin/appdaemon -c /home/ha/conf
Sep 27 17:56:22 orangepizero appdaemon[2162]: 2017-09-27 17:56:22.710443 INFO Loading Object hello_world using class HelloWorld from module hello
Sep 27 17:56:24 orangepizero appdaemon[2162]: 2017-09-27 17:56:24.571856 INFO hello_world: Hello from AppDaemon
Sep 27 17:56:24 orangepizero appdaemon[2162]: 2017-09-27 17:56:24.577729 INFO hello_world: You are now ready to run Apps!
Sep 27 17:56:24 orangepizero appdaemon[2162]: 2017-09-27 17:56:24.578617 INFO App initialization complete
Sep 27 17:56:24 orangepizero appdaemon[2162]: 2017-09-27 17:56:24.580366 INFO Dashboards are disabled
Sep 27 17:56:24 orangepizero appdaemon[2162]: 2017-09-27 17:56:24.581152 INFO API is disabled
Sep 27 17:56:24 orangepizero appdaemon[2162]: 2017-09-27 17:56:24.603522 INFO Connected to Home Assistant 0.48.1
Sep 27 17:56:26 orangepizero appdaemon[2162]: 2017-09-27 17:56:26.187091 WARNING foscam: Entity sensor.foscam_motion not found in Home Assistant
Sep 27 17:56:26 orangepizero appdaemon[2162]: 2017-09-27 17:56:26.297775 WARNING foscam: Entity sensor.foscam_sound_alarm not found in Home Assistant
Sep 27 17:56:26 orangepizero appdaemon[2162]: 2017-09-27 17:56:26.338476 WARNING foscam: Entity sensor.foscam_recording not found in Home Assistant

the slider is intende to return to 0.

you start the movement with the slider for 1 second. the more you move the slider away from 0 the faster the cam will move.
after 1 second it stopps
if it wouldnt work that way, it would be impossible to move to a specific point.

if you want to keep it moving you need to use cruise.
you can setup preset cruises in your camera. the names you give there can be set in the input_select for cruising.
then you can start and stop cruises.
default there is a horizontal and vertical cruise.

Thanks! i understant. In my home assistant, i cannot turn on motion detect

does it give an error?
it should set the automated motion detect to on with the switch.

i turn on switch but it return off

i had problems with that before. in the new version i am working on it will give back better errors in the log.

1 Like