Foscam app V2 (Appdaemon and HAdashboard)

did you:

  1. restart appdaemon
  2. clear compiled dir

what is in your dashboard new?
as which user runs appdaemon?

i did restart appdaemon.
what u mean with clear compiled dir?
I run it as root with service.

what do u mean wih dashboard “new” ?

i will clear compiled folder and re try

you run as root and the files are owned by group pi and user pi.
i would change that to root/root if you run as root.

i meant, do you have anything changed in any dashboard since you added the files.

nope did not change anythiong and changing to root:root does not change anything here … still file not found … but let me clear the compiled folder

I deleted everything inside now appdaemon complaints that folder javascript could not be found

pi@home-assistant:~/appdaemon_dashboard/appdaemon/logs $ tail -f appdaemon.log
app.router.add_static(’/compiled_javascript’, dashboard.compiled_javascript_dir)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 904, in add_static
append_version=append_version)
File “/usr/local/lib/python3.4/dist-packages/aiohttp/web_urldispatcher.py”, line 463, in init
“No directory exists at ‘{}’”.format(directory)) from error
ValueError: No directory exists at ‘/home/pi/appdaemon_dashboard/appdaemon/conf/compiled/javascript’

2017-11-03 16:14:42.224262 WARNING ------------------------------------------------------------
2017-11-03 16:14:42.226445 INFO API is disabled
2017-11-03 16:14:42.253838 INFO Connected to Home Assistant 0.56.2

i added force recompile… what do i have to add for first initial compileß?

yeah should have been clearer.
there are some problems that the subdirs are not created automaticly.

‘/home/pi/appdaemon_dashboard/appdaemon/conf/compiled/javascript’
‘/home/pi/appdaemon_dashboard/appdaemon/conf/compiled/css’
‘/home/pi/appdaemon_dashboard/appdaemon/conf/compiled/html’

need to be there with the right rights.

still:

2017-11-03 16:58:29.652657 INFO Compiling dashboard 'Multimedia'                                                         
2017-11-03 16:58:33.332979 INFO Loading custom widget 'base_light_with_colopicker'                                       
2017-11-03 16:58:33.334895 WARNING ------------------------------------------------------------                          
2017-11-03 16:58:33.336181 WARNING Unexpected error during DASH creation                                                 
2017-11-03 16:58:33.351824 WARNING ------------------------------------------------------------                          
2017-11-03 16:58:33.425999 WARNING Traceback (most recent call last):                                                    
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 788, in get_dashboard                       
    dash = self._conditional_compile(name, skin, recompile)                                                              
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 731, in _conditional_compile                
    dash = self._get_dash(name, skin, skindir)                                                                           
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 552, in _get_dash                           
    widgets = self._get_widgets()                                                                                        
  File "/usr/local/lib/python3.4/dist-packages/appdaemon/dashboard.py", line 642, in _get_widgets                        
    with open(jspath, 'r') as fd:                                                                                        
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/appdaemon_dashboard/appdaemon/conf/custom_widgets/base_
light_with_colopicker/base_light_with_colopicker.js' 

I got the issue!

‘/home/pi/appdaemon_dashboard/appdaemon/conf/custom_widgets/base_
light_with_colopicker/base_light_with_colopicker.js’

is in real

-rw-r–r-- 1 root root 5028 Nov 3 14:04 base_light_with_colorpicker.js WITH A R

great.

i told you. filerights :wink:

NOPE!.. look exactly: The foldername is
/base_light_with_colopicker and the .js file is supposed to be called: base_light_with_colopicker.js

BUT it’s called base_light_with_colorpicker.js

The naming is wrong of the .js file :slight_smile:

no the naming from the dir is wrong.
guess i made a typo with uploading the files.

all filenames must be base_light_with_colorpicker including the dir.
sorry my bad.

OK! no problem… but now another problem:

2017-11-03 20:56:51.006638 INFO AppDaemon Version 2.1.11 startingler loop: 971.0ms                                       
2017-11-03 20:56:51.008192 INFO Configuration read from: /home/pi/appdaemon_dashboard/appdaemon/conf/appdaemon.yaml      
2017-11-03 20:56:51.362419 INFO Starting Apps                                                                                                                             
2017-11-03 20:56:52.064772 INFO Got initial state                                                                                                                         
2017-11-03 20:56:52.069644 INFO Loading Module: /home/pi/appdaemon_dashboard/appdaemon/conf/apps/foscam.py                                                                
2017-11-03 20:56:52.087531 INFO Loading Object foscam using class foscam from module foscam                                                                               
                                                                                                                                                                          
2017-11-03 20:56:52.093830 WARNING foscam: Entity input_number.foscam_brightness not found in Home Assistant                                                              
2017-11-03 20:56:52.096538 WARNING foscam: Entity input_number.foscam_contrast not found in Home Assistant                                                                
2017-11-03 20:56:52.098544 WARNING foscam: Entity input_number.foscam_hue not found in Home Assistant                                                                     
2017-11-03 20:56:52.102117 WARNING foscam: Entity input_number.foscam_sharpness not found in Home Assistantt                                                              
2017-11-03 20:57:42.533971 WARNING foscam: Entity input_number.foscam_zoom not found in Home Assistant                                                                    
2017-11-03 20:57:42.536386 WARNING foscam: Entity input_number.foscam_up_down not found in Home Assistant                                                                 
2017-11-03 20:57:42.538555 WARNING foscam: Entity input_number.foscam_left_right not found in Home Assistant                                                              
2017-11-03 20:57:43.084974 INFO foscam:  App started without errors                                                                                                       
2017-11-03 20:57:43.154988 INFO Loading Module: /home/pi/appdaemon_dashboard/appdaemon/conf/apps/hello.py                                                                 
2017-11-03 20:57:43.160230 INFO App initialization complete                                                                                                               
                                                                                                                                                                          
2017-11-03 20:57:43.162898 INFO Starting dashboard                                                                                                                        
2017-11-03 20:57:43.200454 INFO API is disabled                                                                                                                           
2017-11-03 20:57:43.229311 INFO Connected to Home Assistant 0.56.2 Assistantt                                                              

didnt you update your homeassistant?
seems like your input_sliders in homeassistant are still called inputslider instead of input_number.

FI9821W V2 isn’t listed but does provide info at the CGIproxy URL.

Example:

<CGI_Result>
    <result>0</result>
    <IOAlarm>0</IOAlarm>
    <motionDetectAlarm>2</motionDetectAlarm>
    <soundAlarm>0</soundAlarm>
    <record>0</record>
    <sdState>0</sdState>
    <sdFreeSpace>0k</sdFreeSpace>
    <sdTotalSpace>0k</sdTotalSpace>
    <ntpState>0</ntpState>
    <ddnsState>0</ddnsState>
    <url>http%3A%2F%2Fdb3361.myfoscam.org</url>
    <upnpState>0</upnpState>
    <isWifiConnected>1</isWifiConnected>
    <wifiConnectedAP>Cerebro</wifiConnectedAP>
    <infraLedState>0</infraLedState>
</CGI_Result>

it seems to me that the app will work with that one so i will add it to the working types.
thx. for that info.

that means that you dont have the setting "host"in your apps.yaml
so you must have changed something.

ignore! i did not download latest foscam py

2017-11-21 23:07:37.956753 INFO Loading Object foscam using class foscam from module foscam
2017-11-21 23:08:29.122906 ERROR foscam: one of the arguments has the wrong type
2017-11-21 23:08:29.134310 ERROR foscam: one of the arguments has the wrong type
2017-11-21 23:08:29.143033 INFO foscam: App started without errors
2017-11-21 23:08:29.323422 INFO Loading Module: /home/pi/appdaemon_dashboard/appdaemon/conf/apps/hello.py
2017-11-21 23:08:29.328848 INFO App initialization complete
2017-11-21 23:08:29.331458 INFO Starting dashboard
2017-11-21 23:08:29.374780 INFO API is disabled
2017-11-21 23:08:29.534877 INFO Connected to Home Assistant 0.58.0
2017-11-21 23:08:47.825060 INFO New dashboard connected: Lighteffects

but i get this … foscam dashboards are in the dasboard folder but empty…