Hello @Jacques_Aucamp
Can you share with us how you added the sub totals for “Today”, “This week”, “This month”, “This Quarter”, “This year”…, thanks.
Also, your “Setup” sensor and yaml would be nice, if you can share.
Thanks.
Hello @Jacques_Aucamp
Can you share with us how you added the sub totals for “Today”, “This week”, “This month”, “This Quarter”, “This year”…, thanks.
Also, your “Setup” sensor and yaml would be nice, if you can share.
Thanks.
Olá a todos
Estive a ajudar um colega a montar um Elfin conectado por modbus com o home assistant (customer component).
Consigo ler os valores corretamente, contudo alguns deles como por exemplo o consumo em amps, fica a transitar entre o valor lido e “unavailable”.
Entretanto também me apercebi que o valor da tarifa (address 11) tem um ouput que difere do que tenho em casa.
Pode isto estar a acontecer por necessitar de ter configurações diferentes para o modelo do contador dele?
- name: ERedes_box_contador_energia
type: tcp
host: <IP>
port: 9502
delay: 1
timeout: 4
retries: 5
#retry_on_empty: true
message_wait_milliseconds: 200
- name: "ERedes Box Current" # 6D
slave: 01
address: 109
input_type: input
#count: 1
data_type: uint16
precision: 1
scale: 0.1
unit_of_measurement: A
device_class: current
scan_interval: 15
Configs do Elfin:
No fundo o meu problema é muito semelhante ao reportado pelo @Cesar_Araujo
Houve alguma solução?
Obrigado!
Olá, eu acabei por mudar para o easyhan, os contadores da e-redes não usam o protocolo standard e por isso temos que fazer maroscas para obter todos os registos. Cansei de fazer patch ao modbus do home assistant sempre que tinha um update. Easyhan, foi directo e simples. E alem disso tenho toda a informação possível.
O mestre nikito vai fazendo os updates e domina os “glitches” dos contadores para ter sempre leituras, mesmo nos casos onde tem o modem da e-redes.
Espero ter ajudado.
Obrigado pelo feedback @Cesar_Araujo
@nikito7 Sabe se existe alguma solução mantendo o Elfin?
Obrigado pela vossa disponibilidade
Actualmente desisti do Elfin. Principalmente do componente modbus do Home Assistant.
Só os Watts e kWh tem problemas.
A corrente deveria funcionar.
A maioria dos contadores são 8N1, Stop bits 1.
Excepto Landis e Ziv, desatualizados ou antigos.
O problema é pior com usb rs485.
Com o Elfin deveria funcionar com o custom_component.
Eu não sigo isso.
Os 32bits tem de ser com o data_type: custom
No easyhan bridge funciona:
Se o pedido modbus falhar fica unavailable
Sem custom:
Logger: homeassistant.config
Source: config.py:942
First occurred: 21:47:19 (1 occurrences)
Last logged: 21:47:19
Invalid config for ‘modbus’ at pkg/active/demo.yaml, line 40: EB2 38 uint32 c1: Size of structure is 4 bytes but count: 1
is 2 bytes ‘modbus->0->sensors->2’, got {‘name’: ‘EB2 38 uint32 c1’, ‘unique_id’: ‘eb2_demo38_c1’, ‘slave’: 1, ‘address’: 38, ‘input_type’: ‘input’, ‘data_type’: ‘custom’, ‘count’: 1, ‘structure’: ‘>L’, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’}, please check the docs at https://www.home-assistant.io/integrations/modbus Invalid config for ‘modbus’ at pkg/active/demo.yaml, line 67: EB2 22+23 uint32 c2: Size of structure is 8 bytes but count: 2
is 4 bytes ‘modbus->0->sensors->4’, got {‘name’: ‘EB2 22+23 uint32 c2’, ‘unique_id’: ‘eb2_demo22_c2’, ‘slave’: 1, ‘address’: 22, ‘input_type’: ‘input’, ‘count’: 2, ‘data_type’: ‘custom’, ‘structure’: ‘>2L’, ‘scale’: 0.001, ‘precision’: 2}, please check the docs at https://www.home-assistant.io/integrations/modbus Invalid config for ‘modbus’ at pkg/active/demo.yaml, line 80: EB2 clock demo: Size of structure is 12 bytes but count: 1
is 2 bytes ‘modbus->0->sensors->5’, got {‘name’: ‘EB2 clock demo’, ‘unique_id’: ‘eb2_clock_demo’, ‘slave’: 1, ‘address’: 1, ‘input_type’: ‘input’, ‘count’: 1, ‘data_type’: ‘custom’, ‘structure’: ‘>H7BhB’}, please check the docs at https://www.home-assistant.io/integrations/modbus
O custom altera o único codigo que me aceitaram.
Sem isso nem o custom era possível.
Além que o custom não é a forma correta…
Eu já tinha utilizado esse script por isso nao tenho o erro indicado acima. Como é que posso perceber qual é a origem deste problema do unavailable? É estranho só acontecer com alguns dos sensores. Há uns que estão sempre a funcionar, mas há outros, nomeadamente este que referi a cima que está sempre a ficar unavailable.
Seria espetacular se tivesse algumas luzes de como despistar este problema, será que por vezes o contador dá output de um formato que não é reconhecido pelo modbus no HA?
Deve dar timeout. Ou conflito.
message_wait_milliseconds: 750
Não sei se isto faz alguma coisa:
min_value float (Optional)
The minimum allowed value of a sensor. If value < min_value –> min_value. Can be float or integer
[https://www.home-assistant.io/integrations/modbus/#min_value ]
In order for the developers better to identify the problem, please add the following lines to configuration.yaml:
logger:
default: warning
logs:
homeassistant.components.modbus: debug
pymodbus: debug
and restart Home Assistant, reproduce the problem, and include the log in the issue.
Tentei com as configs acima contudo tenho o mesmo problema.
Os sensores em questão ficam indisponiveis sempre que tenho a seguinte mensagem:
2025-02-16 13:57:06.983 DEBUG (SyncWorker_3) [pymodbus.logging] New Transaction state “SENDING”
2025-02-16 13:57:06.983 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from “SENDING” to “WAITING FOR REPLY”
2025-02-16 13:57:06.987 ERROR (SyncWorker_3) [custom_components.modbus.modbus] Pymodbus: ERedes_box_contador_energia: Modbus Error: [Connection] ModbusTcpClient(192.168.1.241:9502): Connection unexpectedly closed 0.00011348724365234375 seconds into read of 8 bytes without response from slave before it closed connection
2025-02-16 13:57:12.009 DEBUG (SyncWorker_1) [pymodbus.logging] Connection to Modbus server established. Socket (‘192.168.1.242’, 58730)
2025-02-16 13:57:12.010 DEBUG (SyncWorker_1) [pymodbus.logging] Current transaction state - WAITING_FOR_REPLY
2025-02-16 13:57:12.010 DEBUG (SyncWorker_1) [pymodbus.logging] Running transaction 286
O que isto significa? Que a conexão foi fechada enquanto estavamos à espera de uma resposta do contador?
Problemas de wifi talvez.
olá,
estou a tentar ler os valores da corrente activa directamente pelo modbus no homeassistant mas tenho valores muito elevados:
A minha configuração é:
#114 0x0072 Instantaneous Current (Sum of all phases) (A)
- name: "Contador Corrente"
slave: 1
address: 114
input_type: input
count: 1
data_type: custom
structure: ">H"
precision: 0
scale: 1
unit_of_measurement: A
device_class: current
scan_interval: 5
A minha dúvida é saber se o contador está a devolver o valores em A ou em que unidade está a devolver?
Ou devo usar outro registo para ler a corrente?
Obrigado.
input_type: input
data_type: uint16
precision: 1
scale: 0.1
@nikito7 Não me parece ser WiFi, estive a ver e na minha casa tenho também os mesmos outputs nos logs, mas os valores não desaparecem. Qual seria a sugestão como alternativa? Existe algo que possa flashar num ESP8266? Há algum tutorial?
Confesso que me custa um bocado ter esse effort quando o Elfin deveria funcionar em condicoes.
Hi Rui,
It’s actually quite simple - simpler than I thought when I started.
I created a Utility Meter helper for each period, with different reset timers, daily, weekly, monthly etc.
For each one I created 3 supported tariffs: Ponta, Vazio, Cheias
The input sensor is always my overall energy consumption.
For example:
I then have a node red automation to set the tariffs at specific times of day. I’m not sure if the times I used is the same as the times the meter is programmed with, which is why I posed the question of these timings.
Here is the flow
[{"id":"b9e2053371079b60","type":"tab","label":"EDP","disabled":false,"info":"","env":[]},{"id":"6b26224259c5ec54","type":"group","z":"b9e2053371079b60","name":"","style":{"fill":"#EE162D","label":true,"fill-opacity":"0.5"},"nodes":["d74dd64fddd2c0f9"],"x":1674,"y":499,"w":212,"h":82},{"id":"e1fb2f0d247116be","type":"group","z":"b9e2053371079b60","name":"","style":{"fill":"#F69779","label":true,"fill-opacity":"0.5"},"nodes":["34d130e93c168b39"],"x":1674,"y":599,"w":252,"h":82},{"id":"befbbe41b63437ef","type":"group","z":"b9e2053371079b60","name":"","style":{"fill":"#FFD3C6","label":true,"fill-opacity":"0.5"},"nodes":["ce2b52931f84f1e2"],"x":1674,"y":699,"w":192,"h":82},{"id":"46adc74473598c85","type":"group","z":"b9e2053371079b60","name":"Summer Weekday","style":{"label":true},"nodes":["baebdfb04d2c8e2d","8c69af03ca2769bb","882cbcc8f6f3c6bc","37de1c93f0025670","9dbdf189557a858f","9e9183b72c5da69e","3edabf5f5ad5163b","dae4c06e7346acdf"],"x":934,"y":39,"w":482,"h":262},{"id":"2164025e5cbbb26f","type":"group","z":"b9e2053371079b60","name":"Summer Saturday","style":{"label":true},"nodes":["8a18161c48a7b2d8","03dbe8e8dc379896","888bd70683676890","6648db4696744f8a","53b2a2278d433f00","dc5a93cf0664ab1c","5f65da39344605e9","7f180e92af1ec5ef","9495d0946defaf2f","7e4bcae98bb14217"],"x":934,"y":319,"w":482,"h":322},{"id":"aed0ac32ad6ebdb7","type":"group","z":"b9e2053371079b60","name":"Summer Sunday","style":{"label":true},"nodes":["c32b97bdf8694c55","9b2422e47fc80d1f"],"x":934,"y":659,"w":442,"h":82},{"id":"1e0bcd3b8fd4d2cb","type":"group","z":"b9e2053371079b60","name":"Winter Weekday","style":{"label":true},"nodes":["0626357823744f8b","e0129325937dc6a3","128985fd73b38ec2","bb0583c18eed0102","0dd1cd8259b3e5b4","e76cf3bdd2482202","3528cfe45002014e","3569325f2f5b2771","2863aa17d1d965e9","6aad5779598bac99","f9cbdf2505c051e5","60bbecc4adb08f85"],"x":934,"y":759,"w":482,"h":382},{"id":"2dbc09c85b10e426","type":"group","z":"b9e2053371079b60","name":"Winter Saturday","style":{"label":true},"nodes":["384e2f91ca1d8316","b48f4b04b6770860","182167af7e4f496d","5e3f01a6ad1f3690","37c805d7c4999533","057f094fdcabea3e","37de11bf3074b40b","dd2c12694cfe445f","acd2e87da7d7656c","bfe960d535580d8e"],"x":934,"y":1159,"w":482,"h":322},{"id":"fd4a8729461676aa","type":"group","z":"b9e2053371079b60","name":"Winter Sunday","style":{"label":true},"nodes":["ea5923d76b152a72","e5f68861ff8950c3"],"x":934,"y":1499,"w":442,"h":82},{"id":"baebdfb04d2c8e2d","type":"time-range-switch","z":"b9e2053371079b60","g":"46adc74473598c85","name":"0h to 7h","lat":"39.246755","lon":"-9.137260","startTime":"00:00","endTime":"07:00","startOffset":"","endOffset":"","x":1020,"y":80,"wires":[["9dbdf189557a858f"],[]]},{"id":"8c69af03ca2769bb","type":"time-range-switch","z":"b9e2053371079b60","g":"46adc74473598c85","name":"7h to 09h15","lat":"39.246755","lon":"-9.137260","startTime":"07:00","endTime":"09:15","startOffset":"","endOffset":"","x":1030,"y":140,"wires":[["9e9183b72c5da69e"],[]]},{"id":"882cbcc8f6f3c6bc","type":"time-range-switch","z":"b9e2053371079b60","g":"46adc74473598c85","name":"09h15 to 12h15","lat":"39.246755","lon":"-9.137260","startTime":"09:15","endTime":"12:15","startOffset":"","endOffset":"","x":1040,"y":200,"wires":[["dae4c06e7346acdf"],[]]},{"id":"37de1c93f0025670","type":"time-range-switch","z":"b9e2053371079b60","g":"46adc74473598c85","name":"12:15 to 23:59","lat":"39.246755","lon":"-9.137260","startTime":"12:15","endTime":"23:59","startOffset":"","endOffset":"","x":1040,"y":260,"wires":[["3edabf5f5ad5163b"],[]]},{"id":"8a18161c48a7b2d8","type":"time-range-switch","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"0h to 9h","lat":"39.246755","lon":"-9.137260","startTime":"00:00","endTime":"09:00","startOffset":"","endOffset":"","x":1020,"y":360,"wires":[["5f65da39344605e9"],[]]},{"id":"03dbe8e8dc379896","type":"time-range-switch","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"9h to 14h","lat":"39.246755","lon":"-9.137260","startTime":"09:00","endTime":"14:00","startOffset":"","endOffset":"","x":1020,"y":420,"wires":[["53b2a2278d433f00"],[]]},{"id":"888bd70683676890","type":"time-range-switch","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"20h to 22h","lat":"39.246755","lon":"-9.137260","startTime":"20:00","endTime":"22:00","startOffset":"","endOffset":"","x":1030,"y":540,"wires":[["dc5a93cf0664ab1c"],[]]},{"id":"0626357823744f8b","type":"time-range-switch","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"7h to 09h30","lat":"39.246755","lon":"-9.137260","startTime":"07:00","endTime":"09:30","startOffset":"","endOffset":"","x":1030,"y":860,"wires":[["3569325f2f5b2771"],[]]},{"id":"e0129325937dc6a3","type":"time-range-switch","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"09h30 to 12h","lat":"39.246755","lon":"-9.137260","startTime":"09:30","endTime":"12:00","startOffset":"","endOffset":"","x":1030,"y":920,"wires":[["f9cbdf2505c051e5"],[]]},{"id":"384e2f91ca1d8316","type":"time-range-switch","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"09h30 to 13h","lat":"39.246755","lon":"-9.137260","startTime":"09:30","endTime":"13:00","startOffset":"","endOffset":"","x":1030,"y":1260,"wires":[["acd2e87da7d7656c"],[]]},{"id":"128985fd73b38ec2","type":"time-range-switch","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"12h to 18h30","lat":"39.246755","lon":"-9.137260","startTime":"12:00","endTime":"18:30","startOffset":"","endOffset":"","x":1030,"y":980,"wires":[["2863aa17d1d965e9"],[]]},{"id":"bb0583c18eed0102","type":"time-range-switch","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"18h30 to 21h","lat":"39.246755","lon":"-9.137260","startTime":"18:30","endTime":"21:00","startOffset":"","endOffset":"","x":1030,"y":1040,"wires":[["60bbecc4adb08f85"],[]]},{"id":"b48f4b04b6770860","type":"time-range-switch","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"18h30 to 22h","lat":"39.246755","lon":"-9.137260","startTime":"18:30","endTime":"22:00","startOffset":"","endOffset":"","x":1030,"y":1380,"wires":[["bfe960d535580d8e"],[]]},{"id":"182167af7e4f496d","type":"time-range-switch","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"22h to 23h59","lat":"39.246755","lon":"-9.137260","startTime":"22:00","endTime":"23:59","startOffset":"","endOffset":"","x":1030,"y":1440,"wires":[["dd2c12694cfe445f"],[]]},{"id":"c0f885aa8ed198ca","type":"function","z":"b9e2053371079b60","name":"Summer?","func":"function lastSunday(year, month) {\n var date = new Date(year,month,1,12);\n let weekday = date.getDay();\n let dayDiff = weekday===0 ? 7 : weekday;\n let lastSunday = date.setDate(date.getDate() - dayDiff);\n return date;\n}\n\n\nvar season = \"\";\nvar today = new Date();\nvar year = today.getFullYear();\n\n\nvar winterstart = lastSunday(year, 10) // Last Sunday of October\nvar summerstart = lastSunday(year, 3) // Last Sunday of March\n\nif (today > summerstart) {\n if (today < winterstart) {\n return [msg, null]; //summer\n } else {\n return [null, msg]; //winter\n }\n} else {\n return [null, msg]; //winter\n}\n\n\n","outputs":2,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":620,"wires":[["5936b5003b94f452","6b22f43a7735b9a6","f58ae391753dc942"],["2dae59a19f6c70ef","589714cd12d63223","8ccbde644c6f9119"]],"outputLabels":["summer","winter"]},{"id":"5936b5003b94f452","type":"weekday-gate","z":"b9e2053371079b60","name":"Weekday","weekdays":["1","2","3","4","5"],"x":680,"y":300,"wires":[["baebdfb04d2c8e2d","8c69af03ca2769bb","37de1c93f0025670","882cbcc8f6f3c6bc"]]},{"id":"6b22f43a7735b9a6","type":"weekday-gate","z":"b9e2053371079b60","name":"Saturday","weekdays":["6"],"x":680,"y":340,"wires":[["8a18161c48a7b2d8","03dbe8e8dc379896","6648db4696744f8a","888bd70683676890","9495d0946defaf2f"]]},{"id":"f58ae391753dc942","type":"weekday-gate","z":"b9e2053371079b60","name":"Sunday","weekdays":["0"],"x":680,"y":380,"wires":[["c32b97bdf8694c55"]]},{"id":"2dae59a19f6c70ef","type":"weekday-gate","z":"b9e2053371079b60","name":"Weekday","weekdays":["1","2","3","4","5"],"x":690,"y":1020,"wires":[["0626357823744f8b","e0129325937dc6a3","128985fd73b38ec2","bb0583c18eed0102","0dd1cd8259b3e5b4","e76cf3bdd2482202"]]},{"id":"589714cd12d63223","type":"weekday-gate","z":"b9e2053371079b60","name":"Saturday","weekdays":["6"],"x":690,"y":1060,"wires":[["37c805d7c4999533","384e2f91ca1d8316","5e3f01a6ad1f3690","b48f4b04b6770860","182167af7e4f496d"]]},{"id":"8ccbde644c6f9119","type":"weekday-gate","z":"b9e2053371079b60","name":"Sunday","weekdays":["0"],"x":690,"y":1100,"wires":[["ea5923d76b152a72"]]},{"id":"6648db4696744f8a","type":"time-range-switch","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"14h to 20h","lat":"39.246755","lon":"-9.137260","startTime":"14:00","endTime":"20:00","startOffset":"","endOffset":"","x":1030,"y":480,"wires":[["7f180e92af1ec5ef"],[]]},{"id":"5e3f01a6ad1f3690","type":"time-range-switch","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"13h to 18h30","lat":"39.246755","lon":"-9.137260","startTime":"13:00","endTime":"18:30","startOffset":"","endOffset":"","x":1030,"y":1320,"wires":[["37de11bf3074b40b"],[]]},{"id":"0dd1cd8259b3e5b4","type":"time-range-switch","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"21h to 23h59","lat":"39.246755","lon":"-9.137260","startTime":"21:00","endTime":"23:59","startOffset":"","endOffset":"","x":1030,"y":1100,"wires":[["6aad5779598bac99"],[]]},{"id":"37c805d7c4999533","type":"time-range-switch","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"0h to 9h30","lat":"39.246755","lon":"-9.137260","startTime":"00:00","endTime":"09:30","startOffset":"","endOffset":"","x":1030,"y":1200,"wires":[["057f094fdcabea3e"],[]]},{"id":"d74dd64fddd2c0f9","type":"api-call-service","z":"b9e2053371079b60","g":"6b26224259c5ec54","name":"Vazio (Off Peak)","server":"ab268d74b0ab2f23","version":7,"debugenabled":false,"action":"select.select_option","floorId":[],"areaId":[],"deviceId":[],"entityId":["select.edp_tariff_all_time","select.edp_tariff_this_month","select.edp_tariff_this_quarter","select.edp_tariff_this_week","select.edp_tariff_this_year","select.edp_tariff_today"],"labelId":[],"data":"{\"option\":\"Vazio (Off Peak)\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","blockInputOverrides":false,"domain":"select","service":"select_option","x":1780,"y":540,"wires":[[]]},{"id":"e76cf3bdd2482202","type":"time-range-switch","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"0h to 7h","lat":"39.246755","lon":"-9.137260","startTime":"00:00","endTime":"07:00","startOffset":"","endOffset":"","x":1020,"y":800,"wires":[["3528cfe45002014e"],[]]},{"id":"c32b97bdf8694c55","type":"time-range-switch","z":"b9e2053371079b60","g":"aed0ac32ad6ebdb7","name":"00h to 23h59","lat":"39.246755","lon":"-9.137260","startTime":"00:00","endTime":"23:59","startOffset":"","endOffset":"","x":1030,"y":700,"wires":[["9b2422e47fc80d1f"],[]]},{"id":"ea5923d76b152a72","type":"time-range-switch","z":"b9e2053371079b60","g":"fd4a8729461676aa","name":"0h to 23h59","lat":"39.246755","lon":"-9.137260","startTime":"00:00","endTime":"23:59","startOffset":"","endOffset":"","x":1030,"y":1540,"wires":[["e5f68861ff8950c3"],[]]},{"id":"9dbdf189557a858f","type":"link out","z":"b9e2053371079b60","g":"46adc74473598c85","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":80,"wires":[],"l":true},{"id":"35bf3369f72012a6","type":"link in","z":"b9e2053371079b60","name":"Vazio (Off Peak)","links":["057f094fdcabea3e","3528cfe45002014e","37de11bf3074b40b","5f65da39344605e9","7f180e92af1ec5ef","9b2422e47fc80d1f","9dbdf189557a858f","dd2c12694cfe445f","e5f68861ff8950c3","7e4bcae98bb14217"],"x":1605,"y":540,"wires":[["d74dd64fddd2c0f9"]]},{"id":"9b2422e47fc80d1f","type":"link out","z":"b9e2053371079b60","g":"aed0ac32ad6ebdb7","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":700,"wires":[],"l":true},{"id":"3528cfe45002014e","type":"link out","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":800,"wires":[],"l":true},{"id":"057f094fdcabea3e","type":"link out","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":1200,"wires":[],"l":true},{"id":"37de11bf3074b40b","type":"link out","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":1320,"wires":[],"l":true},{"id":"dd2c12694cfe445f","type":"link out","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":1440,"wires":[],"l":true},{"id":"e5f68861ff8950c3","type":"link out","z":"b9e2053371079b60","g":"fd4a8729461676aa","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":1540,"wires":[],"l":true},{"id":"984483d366e7c09b","type":"link in","z":"b9e2053371079b60","name":"Cheias (Median Peak)","links":["9e9183b72c5da69e","3edabf5f5ad5163b","53b2a2278d433f00","dc5a93cf0664ab1c","3569325f2f5b2771","2863aa17d1d965e9","6aad5779598bac99","acd2e87da7d7656c","bfe960d535580d8e"],"x":1605,"y":640,"wires":[["34d130e93c168b39"]]},{"id":"9e9183b72c5da69e","type":"link out","z":"b9e2053371079b60","g":"46adc74473598c85","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":140,"wires":[],"l":true},{"id":"3edabf5f5ad5163b","type":"link out","z":"b9e2053371079b60","g":"46adc74473598c85","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":260,"wires":[],"l":true},{"id":"53b2a2278d433f00","type":"link out","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":420,"wires":[],"l":true},{"id":"dc5a93cf0664ab1c","type":"link out","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":540,"wires":[],"l":true},{"id":"3569325f2f5b2771","type":"link out","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":860,"wires":[],"l":true},{"id":"2863aa17d1d965e9","type":"link out","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":980,"wires":[],"l":true},{"id":"6aad5779598bac99","type":"link out","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":1100,"wires":[],"l":true},{"id":"acd2e87da7d7656c","type":"link out","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":1260,"wires":[],"l":true},{"id":"bfe960d535580d8e","type":"link out","z":"b9e2053371079b60","g":"2dbc09c85b10e426","name":"Cheias (Median Peak)","mode":"link","links":["984483d366e7c09b"],"x":1290,"y":1380,"wires":[],"l":true},{"id":"667f9e182da3977f","type":"link in","z":"b9e2053371079b60","name":"Ponta (Peak)","links":["dae4c06e7346acdf","f9cbdf2505c051e5","60bbecc4adb08f85"],"x":1605,"y":740,"wires":[["ce2b52931f84f1e2"]]},{"id":"dae4c06e7346acdf","type":"link out","z":"b9e2053371079b60","g":"46adc74473598c85","name":"Vazio (Off Peak)","mode":"link","links":["667f9e182da3977f"],"x":1270,"y":200,"wires":[],"l":true},{"id":"f9cbdf2505c051e5","type":"link out","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"Vazio (Off Peak)","mode":"link","links":["667f9e182da3977f"],"x":1270,"y":920,"wires":[],"l":true},{"id":"60bbecc4adb08f85","type":"link out","z":"b9e2053371079b60","g":"1e0bcd3b8fd4d2cb","name":"Vazio (Off Peak)","mode":"link","links":["667f9e182da3977f"],"x":1270,"y":1040,"wires":[],"l":true},{"id":"5f65da39344605e9","type":"link out","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":360,"wires":[],"l":true},{"id":"7f180e92af1ec5ef","type":"link out","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":480,"wires":[],"l":true},{"id":"bd57d00c65581c46","type":"inject","z":"b9e2053371079b60","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":210,"y":620,"wires":[["c0f885aa8ed198ca"]]},{"id":"34d130e93c168b39","type":"api-call-service","z":"b9e2053371079b60","g":"e1fb2f0d247116be","name":"Cheias (Median Peak)","server":"ab268d74b0ab2f23","version":7,"debugenabled":false,"action":"select.select_option","floorId":[],"areaId":[],"deviceId":[],"entityId":["select.edp_tariff_all_time","select.edp_tariff_this_month","select.edp_tariff_this_quarter","select.edp_tariff_this_week","select.edp_tariff_this_year","select.edp_tariff_today"],"labelId":[],"data":"{\"option\":\"Cheias (Median Peak)\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","blockInputOverrides":false,"domain":"select","service":"select_option","x":1800,"y":640,"wires":[[]]},{"id":"ce2b52931f84f1e2","type":"api-call-service","z":"b9e2053371079b60","g":"befbbe41b63437ef","name":"Ponta (Peak)","server":"ab268d74b0ab2f23","version":7,"debugenabled":false,"action":"select.select_option","floorId":[],"areaId":[],"deviceId":[],"entityId":["select.edp_tariff_all_time","select.edp_tariff_this_month","select.edp_tariff_this_quarter","select.edp_tariff_this_week","select.edp_tariff_this_year","select.edp_tariff_today"],"labelId":[],"data":"{\"option\":\"Ponta (Peak)\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","blockInputOverrides":false,"domain":"select","service":"select_option","x":1770,"y":740,"wires":[[]]},{"id":"9495d0946defaf2f","type":"time-range-switch","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"22h to 23h59","lat":"39.246755","lon":"-9.137260","startTime":"22:00","endTime":"23:59","startOffset":"","endOffset":"","x":1030,"y":600,"wires":[["7e4bcae98bb14217"],[]]},{"id":"7e4bcae98bb14217","type":"link out","z":"b9e2053371079b60","g":"2164025e5cbbb26f","name":"Vazio (Off Peak)","mode":"link","links":["35bf3369f72012a6"],"x":1270,"y":600,"wires":[],"l":true},{"id":"ab268d74b0ab2f23","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
Olá @nikito7 sabes algo sobre isto:
Qual seria a sugestão como alternativa? Existe algo que possa flashar num ESP8266? Há algum tutorial?
Confesso que me custa um bocado ter esse effort quando o Elfin deveria funcionar em condicoes.
Obrigado!
Vê o uptime do Elfin.
Actualiza a firmware.
Faz reset.
Está a correr o 1.44.1 que me parece ser a ultima versão disponivel.
Parece-me que estou a ter erros de leitura vindos do pymodbus para muitos endereços. Mesmo que apague o que agora é problemático, dá erro com outro.
Neste caso para o 38:
2025-04-07 17:14:17.611 ERROR (MainThread) [custom_components.modbus.modbus] Pymodbus: ERedes_box_contador_energia: Error: device: 1 address: 38 -> pymodbus returned isError True
2025-04-07 17:14:17.813 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x27 0x0 0x1
2025-04-07 17:14:18.357 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x2 0x0 0x0 0x0 0x3 0x1 0x84 0x81 old_data: addr=None
2025-04-07 17:14:18.358 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x2 0x0 0x0 0x0 0x3 0x1 0x84 0x81
2025-04-07 17:14:18.358 ERROR (MainThread) [pymodbus.logging] Exception response 132 / 0
2025-04-07 17:14:18.359 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2025-04-07 17:14:18.563 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x3 0x0 0x0 0x0 0x6 0x1 0x4 0x0 0x28 0x0 0x1
2025-04-07 17:14:19.104 DEBUG (MainThread) [pymodbus.logging] recv: 0x0 0x3 0x0 0x0 0x0 0x3 0x1 0x84 0x81 old_data: addr=None
2025-04-07 17:14:19.105 DEBUG (MainThread) [pymodbus.logging] Processing: 0x0 0x3 0x0 0x0 0x0 0x3 0x1 0x84 0x81
2025-04-07 17:14:19.105 ERROR (MainThread) [pymodbus.logging] Exception response 132 / 0
2025-04-07 17:14:19.106 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
Hexadecimal: [ 84 81 ]
Decimal: [ 132 129 ]
Obrigado @nikito7
Vou enviar um e-mail para lá. Este não é o problema anterior de funcionar de forma intermitente, mas aconteceu recentemente ter deixado de funcionar de todo.
Não fazia ideia de como identificar o Access Denied. Super Obrigado!
Copyright © 2017-. Todos os direitos reservados
CPHA.pt - info@cpha.pt