Netatmo public - gone forever?

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.