Netatmo camera notifications not working

I have read a lot of threads now with this issue, most of them getting resolved, but I have not been able to solve my problem using the tips that are supplied in thoose threads.

I have 2 Netatmot precense outdoor cameras and I would like to have notifications from motion detection on them to trigger some external spotlights (not the build in spotlight in the camera).

I am running 0.117.0 on a docker installation in ubuntu.

I have setup the developer account on dev.netatmo and the webhooks are registering as they should according to the logfiles. I have forwarded port 80 and 443 to my internal ip on port 8123 which is running the docker installation.

It all appears to be fine, no errors in the log, I have added:

logger:
  default: error
  logs:
    homeassistant.components.netatmo: debug

To configuration.yaml to get all logs from netatmo and I get:

2020-11-02 09:14:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-02 09:14:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class WeatherStationData added
2020-11-02 09:14:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class HomeData added
2020-11-02 09:14:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] No weather station available
2020-11-02 09:14:18 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class HomeCoachData added
2020-11-02 09:14:19 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Data class CameraData added
2020-11-02 09:14:19 DEBUG (MainThread) [homeassistant.components.netatmo.camera] Adding camera 70:ee:50:36:71:cc Infart
2020-11-02 09:14:19 DEBUG (MainThread) [homeassistant.components.netatmo.camera] Adding camera 70:ee:50:52:68:20 Hönshus
2020-11-02 09:14:19 DEBUG (MainThread) [homeassistant.components.netatmo.netatmo_entity_base] New client camera.netatmo_infart
2020-11-02 09:14:19 DEBUG (MainThread) [homeassistant.components.netatmo.netatmo_entity_base] New client camera.netatmo_honshus
2020-11-02 09:14:27 INFO (MainThread) [homeassistant.components.netatmo] Register Netatmo webhook: https://removed-duckdns-path/api/webhook/removed-webhook-hash

So all looks ok.

I never see any events in the developer event debug view from the netatmo device, but my camera stream images just fine.

After a while I get a ban from the dev.netatmo service, suggesting that I have the wrong url (according to other threads I have read) but I have tried all possible combinations of ports and I still never get any events.

My congifuration.yaml has:

http:
  base_url: https://my_url_removed.duckdns.org
  ssl_certificate: ../ssl/fullchain.pem
  ssl_key: ../ssl/privkey.pem

netatmo:
  client_id: my_client_removed
  client_secret: my_secret_removed

And internal and external url setup in home assistant is the same for both, without port specified:

External:
https://my_url_removed.duckdns.org
Internal:
https://my_url_removed.duckdns.org

Any help would be appreciated :slight_smile:

Hi @Jimmy_Adler,

so far you did good research on this topic. Unfortunately your webhook is not successfully registered as you are missing the following line:

INFO (MainThread) [homeassistant.components.netatmo.data_handler] Netatmo webhook successfully registered

This also explains why your webhook is banned after a while.

I would suggest to set the internal url to your actual local url on your LAN (including port).

You don’t use a reverse proxy, is that correct?

Is https working properly for access from outside your network?

Many thanks for the reply! :slight_smile:

You are correct! I do not get that print! I used to get an error so when I did not get that anymore I assumed that it was registering ok!

I changed my internal url to https://192.168.1.7:8123 and restarted home assistant and removed and readded netatmo after doing an unban, but still no “webhook successfylly registered”.

I don not use a reveres proxy at the moment, was hoping to get it working “the easy” way first by exposing my ports in the firewall.

I thought https was working, but turns out I had to specify ports (8123) for it to load the login page when on an external network, otherwise I just end up in the start page and it says “initializing”. So something is probably off there…

In an effort to understand what is going wrong I tried to visit the webhook adress that it says that it is registering in a webbrowser and I get a server response code 405 (method not allowed).

You mentioned that you had to specify the port to access your HA instance from outside your network, is that correct? If so, you have to fix this first and make HA available via 443.

Yes, it appears that it works differently when I use the 8123 port and when I use 443 or 80, it all goes to the same place (the docker container and home assistant) but home assistant appears to handle it differently… Will try to sort that out :slight_smile: