Netatmo without using camera

So after the update I’m trying to update my config to match.

As per the documentation, I’ve added:
netatmo: api_key: [REDACTED] secret_key: [REDACTED] username: [REDACTED] password: [REDACTED]

to my config file but on run I get:
16-07-03 13:16:15 ERROR (ThreadPool Worker 1) [homeassistant.components.camera] Error while setting up platform netatmo Traceback (most recent call last): File "C:\Python34\lib\site-packages\homeassistant\helpers\entity_component.py", line 98, in _setup_platform discovery_info) File "C:\Python34\lib\site-packages\homeassistant\components\camera\netatmo.py", line 32, in setup_platform for camera_name in data.get_camera_names(): File "C:\Python34\lib\site-packages\homeassistant\components\camera\netatmo.py", line 90, in get_camera_names self.update() File "C:\Python34\lib\site-packages\homeassistant\util\__init__.py", line 289, in wrapper result = method(*args, **kwargs) File "C:\Python34\lib\site-packages\homeassistant\components\camera\netatmo.py", line 104, in update self.welcomedata = lnetatmo.WelcomeData(self.auth) File "C:\Users\Jon\AppData\Roaming\.homeassistant\deps\lnetatmo.py", line 304, in __init__ self.default_home = list(self.homes.values())[0]['name'] IndexError: list index out of range

a quick look shows it appears to be trying to setup the camera module and failing, but I don’t HAVE a camera connected, Is there a way to ban the camera components from attempting to pull the data?

2 Likes

It was listed in the “breaking changes”, now netatmo is splitted: one setup and others for sensor & camera. Looking briefly at the code (also trying to disable the warning) I got the feeling that this move was rushed

But so far it’s only a warning for me and I still get my metrics (with an added bonus of the min & max temps for the day, and battery status, all of which I’m really thankful to see included).

BR
M

I see that now, still getting the metrics, I’ll just ignore the warning…

:wink: did you notice the new metrics?

I did now :slight_smile:

Trying to get my second module to work. Indoor station works fine, outdoor is returning nothing.

have 3, I’ve set the station name and don’t forget some metrics don’t work for some modules (the component refused to start because I tried to add a non-existant element)

you might also like this script…

netatmo_co2_check: alias: 'Netatmo Co2 Checks (every 25min)' sequence: - service: notify.pb data: title: > {% if (states("sensor.netatmo_indoor_co2")|round(0) >= "2300"|round(0) ) or ( states("sensor.netatmo_chambre_co2")|round(0) >= "2300"|round(0) ) %} Co2 Extreme {{ states("sensor.netatmo_indoor_co2") }} Livingroom and {{ states("sensor.netatmo_chambre_co2") }} Bedroom. {% elif ( states("sensor.netatmo_indoor_co2")|round(0) >= "1750"|round(0) and states("sensor.netatmo_indoor_co2")|round(0) < "2300"|round(0) ) or ( states("sensor.netatmo_chambre_co2")|round(0) >= "1750"|round(0) and states("sensor.netatmo_chambre_co2")|round(0) <= "2300"|round(0) ) %} Co2 Too High {{ states("sensor.netatmo_indoor_co2") }} Livingroom and {{ states("sensor.netatmo_chambre_co2") }} Bedroom. {% elif states("sensor.netatmo_indoor_co2")|round(0) <= "700"|round(0) and states("sensor.netatmo_chambre_co2")|round(0) <= "700"|round(0) %} Co2 All OK {{ states("sensor.netatmo_indoor_co2") + " ppm" }} Bedroom and {{ states("sensor.netatmo_chambre_co2")|round(0) }} Bedroom. {% else %} Co2 Salon at {{ states("sensor.netatmo_indoor_co2") }} ppm. Co2 Bedroom at {{ states("sensor.netatmo_chambre_co2") }} ppm. {% endif %} message: > {% if states("sensor.netatmo_indoor_co2")|round(0) >= "2300"|round(0) %} Co2 Salon at extreme levels at {{ states("sensor.netatmo_indoor_co2") }} ppm. {% elif states("sensor.netatmo_chambre_co2")|round(0) >= "2300"|round(0) %} Co2 Bedroom at extreme levels at {{ states("sensor.netatmo_chambre_co2") }} ppm. {% elif states("sensor.netatmo_indoor_co2")|round(0) >= "1750"|round(0) and states("sensor.netatmo_indoor_co2")|round(0) < "2300"|round(0) %} Co2 Salon at higher levels at {{ states("sensor.netatmo_indoor_co2") }} ppm. {% elif states("sensor.netatmo_chambre_co2")|round(0) >= "1750"|round(0) and states("sensor.netatmo_chambre_co2")|round(0) <= "2300"|round(0) %} Co2 Bedroom at higher levels at {{ states("sensor.netatmo_chambre_co2") }} ppm. {% elif states("sensor.netatmo_indoor_co2")|round(0) <= "700"|round(0) %} Co2 Salon OK at {{ states("sensor.netatmo_indoor_co2") }} ppm. {% elif states("sensor.netatmo_chambre_co2")|round(0) <= "700"|round(0) %} Co2 Bedroom OK at {{ states("sensor.netatmo_chambre_co2")|round(0) }} ppm. {% endif %} - condition: template value_template: '{{ states("sensor.netatmo_indoor_co2")|round(0) < "700"|round(0) and states("sensor.netatmo_chambre_co2")|round(0) < "700"|round(0) }}' - service: notify.pb data: message: "Pausing Netatmo checks for 2 hours (Salon and Bedroom bellow 700)" - condition: template value_template: '{{ states("sensor.netatmo_indoor_co2")|round(0) < "700"|round(0) and states("sensor.netatmo_chambre_co2")|round(0) < "700"|round(0) }}' - delay: '02:30:00'

CC @jabesq

I’ll take look on it, but unfortunately I’m currently moving to my new home and my development setup is already in a box, so I won’t be able to work on this until mid-July.

I suspect that the issue is coming from the device discovery (I used the bloomsky camera as an example to develop the Netatmo camera component)

1 Like

The problem is either in this piece. Instead of auto discovering the components, it should detect if there are cameras before loading the camera platform. Alternatively, the netatmo camera platform should just do nothing when there are no camera’s (instead of erroring out).

For people currently with this problem, the warning does not impact the running of the netatmo sensors so can be safely ignored.

1 Like

No worries, as balloob pointed out it’s a non-blocking error and wishing you strength for this one! I also moved-out early june and it was a costly PITA, the positive thing related to hass is I had to adapt my setup (1 more room) and so I could finally make use of !include_dir_merge_named and !include_dir_merge_list, I already tried to split my config in the past but wasn’t happy with the result, now these two functions really made it easier but wished someone added some guidance to the wiki as both have to be used for different components and the formatting also needs to follow different rules.

Here’s what I have:

# - NAMED
input_slider: !include_dir_merge_named conf_input_sliders
input_boolean: !include_dir_merge_named conf_input_booleans
group: !include_dir_merge_named conf_groups
script: !include_dir_merge_named conf_scripts
# - DIR
zone: !include_dir_merge_list conf_zones
device_tracker: !include_dir_merge_list conf_device_tracker
scene: !include_dir_merge_list conf_scenes
automation: !include_dir_merge_list conf_automations
sensor: !include_dir_merge_list conf_sensors
camera: !include_dir_merge_list conf_camera
notify: !include_dir_merge_list conf_notify

Also under homeassistant:
customize: !include_dir_merge_named conf_customize


Layout for _named is:
component.name:
(indent)icon: mdi:lightbulb

Layout for _list is:

  • component.name:
    (indent)settings…
1 Like

@thefrenchmatt can you show me your ls -LR /home/hass/.homeassistant. I am interested what files your dirs do contain to understand. I am also interested to learn as I wanna split my automation file what your conf_automations directory contain and what the yaml files contain. Do you still need a -alias starting point on each file???

Sorry for the delayed reply, crashed my distro (trying to add linux drivers for a razer naga mouse), then somehow killed my MB. I received a replacement last week, so now starting a restore, which I fear may take some time.

I could try to get you the full listing via PM, I’m quite sure it won’t help guessing how they tie together…

Instead I’ll first say I tried both ways (for automations) and I stayed off the other because it didn’t allow using a renaming of the extension (ie: to disable when one breaks) and just picks up any name, even in subfolders.

So dir merged lists are not ideal for debbuging but allowed me to split by functionality, device or room.

My config is quite extended so I invested in a license for sublime text which saved me hours of typing, projects are easier to manage, and I filtered searching by scanning only .conf,.py,.sh.

Notepadd++ or VIM can sure do the same, I just didn’t feel like learning VIM and no npp on nux.

Hoping this, albeit limited, answer will help you. Feel free to remind me if you don’t hear from me or need more details :wink: