Foscam camera with lots of controls

Hi

Still same problem. I will look into it more tomorrow night

1 Like

This is the error i get now:

2017-07-30 21:13:16.257027 INFO Got initial state
Traceback (most recent call last):
File “/usr/bin/appdaemon”, line 11, in
load_entry_point(‘appdaemon==2.0.9’, ‘console_scripts’, ‘appdaemon’)()
File “/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1823, in main
run()
File “/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1197, in run
read_apps(True)
File “/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 1045, in read_apps
dependent_modules = find_dependent_modules(module)
File “/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 985, in find_dependent_modules
if “dependencies” in config[mod]:
TypeError: argument of type ‘NoneType’ is not iterable

appdaemon isnt starting correctly.

remove everything from foscam (the python file and the part in the yaml) and lets first try to get appdaemon running correct.

When removing everything i get this:
starting version 3.2.2
2017-07-30 21:22:17.424330 INFO AppDaemon Version 2.0.9 starting
2017-07-30 21:22:17.424955 INFO Configuration read from: /config/hadaemon/appdaemon.yaml
2017-07-30 21:22:17.787441 INFO Got initial state
2017-07-30 21:22:17.788731 INFO App initialization complete
2017-07-30 21:22:17.790019 INFO Starting dashboard
2017-07-30 21:22:17.835823 INFO Connected to Home Assistant 0.50.0

I do run Hassio btw, is that a problem?

shouldnt be a problem.

but i wonder, do you still have the hello app in your app dir and do you have it in your config?

nope i dont have the hello app. but i have Ha_Dashboard and that do work

yeah oke. so it looks like you got AD running correctly.

but i still like to have a check if apps are on the right place and configured correct.
i am working a bit blind because i havent converted to yaml myself yet.

give me a moment i will create something to test.

oke try this:
place this in your config:

testing:
  class: testrun
  module: testrun

and save this app as testrun.py in your appdir:

import appdaemon.appapi as appapi

class testrun(appapi.AppDaemon):

  def initialize(self):
    self.log("Testrun has been started")
    runtime = datetime.datetime.now() + datetime.timedelta(seconds=5)
    self.run_minutely(self.heartbeat,runtime)        

  def heartbeat(self,kwargs):
   self.log("Testrun is running in minute tact")

lets see if that works. if so then please post what you have in the foscam part again, so i can take another look at it.

Can this project work with foscam R2?. Thanks!

i dont know.

can you use CGI commands with that cam?
and can you give me 1 example from a CGI command?

i am trying to get it working for every foscam that uses CGI.

and i am creating a default dashboard for it too.
it isnt finished but right now it looks like this:

1 Like

My camera after run your command:
<CGI_Result>
0
0
1
0
0
0
0k
0k
1
0
xxxxxx
0
1
xxxx
0
0
</CGI_Result>

in that case probably all functions will work.

i only need to warn you that you need to translate the config file i have put on github to yaml (my config is for an older version from appdaemon)

ill put in a new version in a short while, with the new config

1 Like

the control dashboard is getting to a point where i am ready to release

with my own skin


with the default skin from dashboard

1 Like

Very nice but after updating appdaemon and Hass my controller doesn’t work anymore is there a way to debug?

which parts in Hass dont work?
is there anything in your appdaemon logs?
or in your Hass logs?

Hi

Would this work with Foscam C1?

Thanks.

i have a C1 lite myself.
i think it will work (except for the PTZ part of course :wink: )

Anyone know how to send a alarm trigger to HA from the Foscam so I can send a notification to my phone if there is motion detected? I set it up on my Hikvision camera. That was easy.

depends on which foscam you have.
if it is 1 of the types that work with this app, you could use this app.
or you could create a commandline sensor that sends a CGI command to the cam regularly to retrieve the sensor state.
but its probably more easy (and more reliable) to set it up in the cam settings self.

I’m using your app for this camera now. Works great.How can I set it up in the app?