# Weather Platform - IPMA

**URL:** <https://forum.cpha.pt/t/weather-platform-ipma/497>\
**Category:** Partilha de Projectos\
**Created:** [29 Maio , 2018 22:40 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497 "2018-05-29T22:40:39Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![ricain](https://forum.cpha.pt/letter_avatar_proxy/v4/letter/r/9fc348/32.png) [@ricain](https://forum.cpha.pt/u/ricain)\
**Post date:** [30 Outubro , 2018 18:57 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/101 "2018-10-30T18:57:14Z")

</div>

Instala o add.on samba e acedes através do teu pc: [Home Assistant para Principiantes - Parte 2, Add-ons](https://forum.cpha.pt/t/home-assistant-para-principiantes-parte-2-add-ons/1213)

---

<div class="post-metadata">

**Author:** ![xNuno](https://forum.cpha.pt/letter_avatar_proxy/v4/letter/x/f08c70/32.png) [@xNuno](https://forum.cpha.pt/u/xNuno)\
**Post date:** [30 Outubro , 2018 19:09 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/102 "2018-10-30T19:09:10Z")

</div>

Boas Ricardo, eu estou com o HASSIO e mesmo com o samba so consigo ver

 ![image](https://forum.cpha.pt/uploads/default/original/2X/6/697aff795ca6662457df086a64776318760d1c69.png)

ou seja não encontro homeassistant/components/weather/ipma.py…

nc instalei o addon manualmente, apenas o referenciei no config file

---

<div class="post-metadata">

**Author:** ![ricain](https://forum.cpha.pt/letter_avatar_proxy/v4/letter/r/9fc348/32.png) [@ricain](https://forum.cpha.pt/u/ricain)\
**Post date:** [30 Outubro , 2018 20:26 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/103 "2018-10-30T20:26:27Z")

</div>

Os ficheiros do home assistant estão na pasta config. A pasta config é a pasta “homeassistant”

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [30 Outubro , 2018 20:49 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/104 "2018-10-30T20:49:45Z")

</div>

E reiniciaste ?

A correcção em principio sai na versao 0.81.2 já.

Não precisam de fazer nada neste momento 🙂 só aguardar a nova versao…

---

<div class="post-metadata">

**Author:** ![xNuno](https://forum.cpha.pt/letter_avatar_proxy/v4/letter/x/f08c70/32.png) [@xNuno](https://forum.cpha.pt/u/xNuno)\
**Post date:** [30 Outubro , 2018 21:04 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/105 "2018-10-30T21:04:15Z")

</div>

Ok. criei lá a estrutura config\custom\_components\weather e coloquei os files do repo. Entretanto fiz reboot e agora nao consigo entrar mais no GUI… pelo que vejo é um bug da versao 0.81.1 mas nao consigo fazer downgrade…

Alguma dica?

---

<div class="post-metadata">

**Author:** ![ricain](https://forum.cpha.pt/letter_avatar_proxy/v4/letter/r/9fc348/32.png) [@ricain](https://forum.cpha.pt/u/ricain)\
**Post date:** [30 Outubro , 2018 21:43 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/106 "2018-10-30T21:43:25Z")

</div>

Vê aqui: [Como fazer downgrade ao Home Assistant - #3 por j\_assuncao](https://forum.cpha.pt/t/como-fazer-downgrade-ao-home-assistant/1168/3)

---

<div class="post-metadata">

**Author:** ![xNuno](https://forum.cpha.pt/letter_avatar_proxy/v4/letter/x/f08c70/32.png) [@xNuno](https://forum.cpha.pt/u/xNuno)\
**Post date:** [30 Outubro , 2018 21:45 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/107 "2018-10-30T21:45:08Z")

</div>

Estou a instalar de novo para fazer restore do snapshot. Com o downgrade não estava a funcionar…dava um erro de python kkl…

---

<div class="post-metadata">

**Author:** ![nunocouto](https://forum.cpha.pt/user_avatar/forum.cpha.pt/nunocouto/32/524_2.png) [@nunocouto](https://forum.cpha.pt/u/nunocouto)\
**Post date:** [30 Outubro , 2018 21:55 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/108 "2018-10-30T21:55:45Z")

</div>

isso mesmo…eu tenho igual…por isso a minha pergunta anterior.

---

<div class="post-metadata">

**Author:** ![cafeoliveira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/cafeoliveira/32/1106_2.png) [@cafeoliveira](https://forum.cpha.pt/u/cafeoliveira)\
**Post date:** [31 Outubro , 2018 11:12 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/109 "2018-10-31T11:12:58Z")

</div>

![image](https://forum.cpha.pt/uploads/default/original/2X/0/05a52eebf14981608a3f3f09e0ae93ae64647f36.png)

algo aqui está errado..os valores nao batem certo..

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [31 Outubro , 2018 11:31 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/110 "2018-10-31T11:31:49Z")

</div>

Verifica que não tens nenhum versão antiga no custom\_components

Enquanto não sai a 0.81.2 podes colocar na custom\_components/weather o ficheiro [https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/weather/ipma.py](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/weather/ipma.py)

---

<div class="post-metadata">

**Author:** ![Nelson\_Oliveira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/nelson_oliveira/32/1065_2.png) [@Nelson\_Oliveira](https://forum.cpha.pt/u/Nelson_Oliveira)\
**Post date:** [31 Outubro , 2018 11:40 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/111 "2018-10-31T11:40:46Z")

</div>

Antes de mais, parabéns 🙂 Tudo funciona perfeitamente, mas estou a achar estranho as temperaturas que tem sido reportadas… tenho tambem o dark sky e neste momento por exemplo o dark sky acusa cerca de 10graus e o ipma cerca de 20graus… Parece-me que o dark sky está mais perto da realidade…  
O ipma assumiu automaticamente as coordenadas que tenho no configuration.yaml assumindo automaticamente Braga, embora esteja mais precisamente em Famalicão que realmente pertence ao distrito de braga, mas penso que deveria assumir a minha cidade… estou certo?  
De qualquer forma as temperaturas de Braga para aqui não diferem muito e esse não é o problema, a questão é que é impossivel estarem 20graus em Braga neste momento. E indo ao site do ipma a temperatura reportada, não coincide com a do hassio.  
Neste momento no ha o ipma mostra-me 20.2Graus, já no site do ipma reporta 11Graus (que coicide com os valores do dark sky).  
Alguma explicação lógica?

---

<div class="post-metadata">

**Author:** ![cafeoliveira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/cafeoliveira/32/1106_2.png) [@cafeoliveira](https://forum.cpha.pt/u/cafeoliveira)\
**Post date:** [31 Outubro , 2018 11:58 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/112 "2018-10-31T11:58:22Z")

</div>

Eu já tenho a última versão

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [31 Outubro , 2018 11:58 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/113 "2018-10-31T11:58:35Z")

</div>

Estas a usar a versão 0.81.2 ?

Antes desta versão o component weather ipma esta a usar uma API do IPMA que foi desactivada por este, sendo que os dados estão freezes desde o verão…

Se tens a versão 0.81.2, por favor activa o debug e partilha aqui.

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [31 Outubro , 2018 11:59 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/114 "2018-10-31T11:59:50Z")

</div>

Podes activar o debug e partilhar ?

```auto
logger:
  default: warn 
  logs:
    root: debug
    homeassistant.components.weather.ipma: debug

```

---

<div class="post-metadata">

**Author:** ![cafeoliveira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/cafeoliveira/32/1106_2.png) [@cafeoliveira](https://forum.cpha.pt/u/cafeoliveira)\
**Post date:** [31 Outubro , 2018 12:19 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/115 "2018-10-31T12:19:26Z")

</div>

```
2018-10-31 12:16:58 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing ipma weather: coordinates 40.6354, -8.65961111
```

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [31 Outubro , 2018 13:11 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/116 "2018-10-31T13:11:03Z")

</div>

Tens uma versão antiga…

Mensagem da versão actual é:

```auto
2018-10-31 12:04:52 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing for coordinates 40.6354, -8.65961111 -> station Aveiro
2018-10-31 12:04:52 DEBUG (MainThread) [homeassistant.components.weather.ipma] Updating station Aveiro, condition Observation(temperature=11.2, humidity=88.0, windspeed=10.1, winddirection='Norte', precipitation=0.3, pressure=1004.0, description='Aveiro (Universidade) @ 2018-10-31T11:00')
2018-10-31 12:04:52 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing for coordinates 40.66273889, -7.90396944 -> station Viseu
2018-10-31 12:04:52 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing for coordinates 40.52855833, -7.278675 -> station Guarda
2018-10-31 12:04:53 DEBUG (MainThread) [homeassistant.components.weather.ipma] Updating station Viseu, condition Observation(temperature=9.3, humidity=88.0, windspeed=-99.0, winddirection='', precipitation=0.0, pressure=-99.0, description='Viseu @ 2018-10-31T11:00')
2018-10-31 12:04:53 DEBUG (MainThread) [homeassistant.components.weather.ipma] Updating station Guarda, condition Observation(temperature=5.8, humidity=82.0, windspeed=10.8, winddirection='Noroeste', precipitation=0.0, pressure=-99.0, description='Guarda @ 2018-10-31T11:00')
```

---

<div class="post-metadata">

**Author:** ![cafeoliveira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/cafeoliveira/32/1106_2.png) [@cafeoliveira](https://forum.cpha.pt/u/cafeoliveira)\
**Post date:** [31 Outubro , 2018 14:13 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/117 "2018-10-31T14:13:14Z")

</div>

```
root@Home-Assistant:~/.homeassistant/packages# python ipma.py
  File "ipma.py", line 26
SyntaxError: Non-ASCII character '\xc3' in file ipma.py on line 26, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

```

já tenho a versao 1.1.4 do ipma:  
[https://hastebin.com/jeguserara.py](https://hastebin.com/jeguserara.py)

```
2018-10-31 13:55:47 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing ipma weather: coordinates 40.6354, -8.65961111
2018-10-31 13:55:47 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing ipma weather: coordinates 40.52855833, -7.278675
2018-10-31 13:55:47 DEBUG (MainThread) [homeassistant.components.weather.ipma] Initializing ipma weather: coordinates 40.66273889, -7.90396944

```

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [31 Outubro , 2018 14:36 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/118 "2018-10-31T14:36:47Z")

</div>

o ipma.py não é para colocar nos _packages_… como o fix ja saiu na versão 0.81.2, por favor garante que já estás a usar esta versão.

verifica também que não tens um ipma dentro do custom\_components.

A mensagem de debug que tens é da versão antiga, tens q ter uma mensagem como a que eu coloquei acima… enquanto a versão usada for antiga o ipma necessariamente não funcionará correctamente.

---

<div class="post-metadata">

**Author:** ![cafeoliveira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/cafeoliveira/32/1106_2.png) [@cafeoliveira](https://forum.cpha.pt/u/cafeoliveira)\
**Post date:** [31 Outubro , 2018 14:46 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/119 "2018-10-31T14:46:29Z")

</div>

![image](https://forum.cpha.pt/uploads/default/original/2X/7/7f6ad528cd818495dc25800cd14ba2ab9d7f6b0d.png)

ja retirei da pasta packages…

já nao sei o que fazer mais 🤯

---

<div class="post-metadata">

**Author:** ![dgomes](https://forum.cpha.pt/user_avatar/forum.cpha.pt/dgomes/32/42_2.png) [@dgomes](https://forum.cpha.pt/u/dgomes)\
**Post date:** [31 Outubro , 2018 14:58 UTC](https://forum.cpha.pt/t/weather-platform-ipma/497/120 "2018-10-31T14:58:40Z")

</div>

pfff… coloca o ficheiro em `~/.homeassistant/custom_components/weather`

[Página anterior](https://forum.cpha.pt/t/weather-platform-ipma/497.md?page=5)

[Próxima página](https://forum.cpha.pt/t/weather-platform-ipma/497.md?page=7)
