# Integrar contadores inteligentes da EDP em Home Assistant

**URL:** https://forum.cpha.pt/t/integrar-contadores-inteligentes-da-edp-em-home-assistant/4953
**Category:** Tutoriais
**Tags:** mqtt, energia, tasmota, modbus, han
**Created:** [5 Julho , 2020 13:42 UTC](https://forum.cpha.pt/t/integrar-contadores-inteligentes-da-edp-em-home-assistant/4953 "2020-07-05T13:42:08Z")
**Posts on this page:** 1
**Showing post:** 961

<div class="post-metadata">

### Author: ![pedro-jorge-pereira](https://forum.cpha.pt/user_avatar/forum.cpha.pt/pedro-jorge-pereira/32/13384_2.png) [@pedro-jorge-pereira](https://forum.cpha.pt/u/pedro-jorge-pereira)
#### Post date: [8 Novembro , 2022 11:31 UTC](https://forum.cpha.pt/t/integrar-contadores-inteligentes-da-edp-em-home-assistant/4953/961 "2022-11-08T11:31:19Z")

</div>

Olá, após vários meses com a porta HAN em funcionamento, parece que deixou de funcionar.

```auto
> mbpoll -m rtu -a 1 -b 9600 -d 8 -P none -v -s 1 -t 3:int -c 2 -r 121 -1 -o 10 -0 -B /dev/ttyAMA0
debug enabled
Set rtu stop bits=1
Set function=3
Set format=int
Set number of values=2
Set start reference=121
Set timeout=10
Set device=/dev/ttyAMA0
mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Opening /dev/ttyAMA0 at 9600 bauds (N, 8, 1)
Set response timeout to 10 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration...: address = [1]
                        start reference = 121, count = 2
Communication.........: /dev/ttyAMA0, 9600-8N1
                        t/o 10.00 s, poll rate 1000 ms
Data type.............: 32-bit integer (big endian), input register table

-- Polling slave 1...
[01][04][00][79][00][04][20][10]
Waiting for a confirmation...
<01><84><81><83><60>
ERROR Invalid exception code
Read input register failed: Invalid exception code

```

O contador está a responder com o ERROR CODE 81. Que segundo a documentaçâo é um erro de previlegios de acesso ao registo, que anteriormente estava a funcionar.

> If is made an attempt to access a register disabled in the access profile the exception code should be 0x81 “ACCESS DENIED”, except in the case of address 0x0000 where the error must be 0x02 “ILLEGAL DATA ADDRESS”;

Alguem passou por problema semelhante? Isto começou a acontecer após uma intervençâo remota da e-redes.

---

_[View the full topic](https://forum.cpha.pt/t/integrar-contadores-inteligentes-da-edp-em-home-assistant/4953)._
