Netatmo public - gone forever?

I know, I will explain what I have done.

  1. On the Netatmo Weather Map I found two stations near my home.
  2. Found latitude and longitude for area that covers both stations.
  3. Entred the latitude and longitude in the integration.

However it is not working. I still get “No Stations available” in the log.

For me, so far working mostly great - thanks!

Observations:

  • The rain sensor is often “not available” but sometimes - I think mostly when it rains, but not sure whether this is always the case - it has a value. When there are sensors that do not report rain, I would expect to see 0, but then I don’t know if the API allows you to distinguish that.
  • When I rename an entity in the UI, it changes its name back to the default after a restart. I believe this is a bug: if your entity has a unique_id, then it shouldn’t change after a restart.

Thanks for the feedback. I’ll look into that ASAP.

I can report the exact same behaviour here. The rain sensor is indeed quite often not available…

image

Same here - I’ve connected to 2 local stations. Both have rain and wind sensors data on weathermap.netatmo.com. Only 1 of the wind sensors is showing data in HA, other is ‘unavailable’. Both rain sensors are ‘unavailable’.

Now, the wind sensor that is ‘unavailable’ is showing 0 km/h on the netatmo website. Also, both rain sensors have 0mm in the last hour. So, I guess the custom component shows sensors as ‘unavailable’ when the value of the sensor is 0.

Also, entities change the name back to original after the restart.

Neatmo public now working for me (almost). Temp and wind sensors ok, rain sensor broken.

@cgtobi PR is merged and rain sensor still broken. What’s wrong? I have same observation as @DavidMStraub - entity sometimes available (i think when it rains) and most of time Unavailable.

It was merged an hour ago. As far as I know there hasn’t been a release in the last hour. There won’t be one for another 2 weeks.

cgtobi merged commit 155a5f7 into home-assistant:dev 1 hour ago

1 Like

Let me comment this with a screenshot:

As @nickrout pointed out already, it is not released yet.

1 Like

If you want to go bleeding edge, hop on the pre release train. It now includes the public weather sensors.

1 Like

It finally is back! Check out 0.113.

4 Likes

Thanks, it was important for some.

Yeah, I know, I use(d) it myself, I felt the pain. Sorry about the inconvenience.

hi @cgtobi, thanks a million for the nice work done here! do you see ever happening to be able to point ton one specific location?
Also, I’m extremely interested in obtaining instant rain values. Could you advise on the best configuration for achieving that? should I go for avg or max?
thanks again!

Thanks for the kind feedback.

Instant feedback is not provided by the API. Values are only updated every 10 minutes.

For the other question, are you asking about picking a specific station?

3 posts were split to a new topic: Invalid Netatmo integration configuration

Oh my god. I totally overlooked this change, though I looked for netatmo changes in every release notes…

So I built my own scipt which downloads first the current public accesstoken and then downloading the current stations to a text file running as a cronjob. Errors are filtered out.

For the HA sensors I made a set of REST, template and average sensor.

Advantage: I learned a lot of scripting, I can read out all single stations in the whole area, no netamo account needed
Disadvantage: from time to time some sensors are down which results in errors in the HA logfile, probably you need to have a full linux and can’t use home assistant OS

So I would like to share here my results. Maybe it’s usefull in some way for somehow :wink:

#!/bin/bash

n=1

while (( $n <= 3 ))
do
token=$(curl -i https://weathermap.netatmo.com/ | grep accessToken | awk '{print substr($3, 2, length($3)-3)}') 

status_code=$(curl --write-out %{http_code} --silent --output /opt/scripts/netatmo_temp.txt -H "Authorization: Bearer $token" "https://api.netatmo.com/api/getpublicdata?lat_ne=51.144288&lon_ne=9.525850&lat_sw=51.139198&lon_sw=9.514476&required_data=rain&filter=false")

word_count=$(wc -c /opt/scripts/netatmo_temp.txt | awk '{print $1}')

echo "Statuscode: $status_code"

n=$(( n+1 ))
if [[ "$status_code" -ne 200 ]] ; then
  echo "$(date "+%Y-%m-%d %H:%M:%S") Site status changed to $status_code" > /opt/scripts/netatmo_error.txt
else
  if [[ "$word_count" -gt 1000 ]] ; then
    cp /opt/scripts/netatmo_temp.txt /opt/docker/homeassistant/www/netatmo.txt
	break
  else 
    echo "$(date "+%Y-%m-%d %H:%M:%S") Word Count zu niedrig: $word_count" > /scripts/netatmo_error_wc.txt
  fi	
fi
done
- platform: rest
  resource: http://10.0.0.21:8123/local/netatmo.txt
  name: Rain Example Street
  json_attributes_path: "$.body[*].measures.05:00:00:06:a6:cc"
  json_attributes:
    - rain_24h
    - rain_60min
    - rain_live
  value_template: "{{ 'Rain Example Street' }}"

- platform: template
  sensors:
    rain_today_example_street:
      friendly_name: Rain Today Example Street
      value_template: "{{ states.sensor.rain_today_example_street.attributes.rain_24h | float | round(2) }}"
      unit_of_measurement: "mm"
# same for rain_60min and rain_live

- platform: average
  name: "Rain Today City"
  entities:
    - sensor.rain_today_example_street
    - sensor.rain_today_example_street_1
    - sensor.rain_today_example_street_2
    - sensor.rain_today_example_street_3
# same for rain_60min and rain_live

Did HA 21.7 break the Netatmo Public Weather sensor integration?
I upgraded HA to 21.7.3 now and still all my public sensors are unavailable.
image

1 Like

Hello,
You may have this error too

2 Likes

Yes, I do. Thanks for the link.