MadBlinds v2 - Como Controlares os estores eléctricos e "estimares" a sua posição (Desactualizado)

é aí mesmo que está o problema… O tasmota recebe duas ordens quase em simultâneo - uma para parar o rele por uma tecla e outro para activar o rele pela outra. Assim, uma ordem cancela a outra. Que switchmode estás a usar?

Configuração na consola do Tasmota:

pulsetime1 132
pulsetime2 131
setoption14 on
poweronstate 0
powerretain1 off
powerretain2 off
SerialLog 0
Switchmode1 2
Switchmode2 2
1 Curtiu

Bem, o problema prende-se com o que te disse acima…
Acho que tens várias opções, nenhuma delas ideal:
Desactivar o interlocking, arriscando a activar os 2 relés por software - nesse caso convém garantir que não há no UI nenhum interruptor que possa activar os relés “separadamente”; mudar switchmode para 4, ficando sem opção para parar o estore localmente…

1 Curtiu

@Maddoctor, aqui esta a imagem que me pediste do tasmota. Desculpa por não partilhar mais cedo… https://1drv.ms/u/s!AhhTRQMupRdtg5IBiPaE9dp3Jrz_YQ

@maxcalavera, aparentemente o dual r2 deve ter alguma particularidade. Assim sendo, usa switch1 e switch2 e depois usa na consola backlog switchmode1 7; switchmode2 7

Já alterei o tutorial para reflectir a alteração… :wink:

Obrigado @MadDoctor. Mas só a titulo de curiosidade o que fazem estes 2 comandos no tasmota? Obrigado pela atenção.

Mudam o tipo de interruptor… 2 é para interruptores normais e 7 para os de pressão… Os restantes são para casos específicos…

Obrigado pela explicação. Vou já configurar o meu sonoff. Muito obrigado. Cumprimentos

Boas como funciona esse switchmode 7? Eu tenho nos meus o switchmode 3, ou seja apes sobem ou descem enquanto pressiono o botão.

com switchmode 7, quando pressionas uma vez, iniciam o movimento e quando pressionas segunda vez, param…

@tmarquespt, conseguiste ter o shelly2 a estimar a posição dos estores?
Li que no firmware mais recente (original) consegue estimar posição penso que dará para implementar no HA, via pedidos GET/POST.

Queria saber se por acaso já passaste por isso, ou se com o TASMOTA conseguiste fazer essa componente da posição?

Obrigado!

com tasmota e o código do @Maddoctor é transparente:

image

1 Curtiu

Boa tarde pessoal!
Ando um pouco á nora a tentar pôr o package a funcionar…
Flashei Tasmota (do git oficial) num BHonofre e correu tudo bem, mas acho que ainda não apanhei bem a história dos topicos e friendly names e etc…
Na configuração do modulo coloquei os 2 switches e os 2 relés (é necessário colocar a info dos relés?), depois na configuração MQTT tenho isto:

Friendly Name 1: estore-alice
Friendly Name 2: estore-alice2
MQTT Topic: estore-alice
MQTT Group Topic: estores
MQTT Full Topic: estore-alice/cmnd/

com base nesta informação, pensei que bastava substituir “janela_garagem” por “estore-alice”, mas quando vou faz check da configuração, dá erro em tudo! :sweat_smile:

O que será que estarei a fazer mal?

obrigado!

@MadDoctor, uns posts mais a cima dizes que o switchmode 7 tu calcas uma vez e o estores abre ou fecha até calcar novamente. Mas os testes que fiz não tive esse comportamento. Ou seja, eu calco e o estore sobe quando deixo o Butão o estore pára logo… Porque será?

A configuração que puseste aqui é do tasmota. Nunca daria erro no HA… Se dá erro no HA é por outro motivo qq. Tens que trocar o janela_garagem tb no package usando o substituir tudo…
O full topic não vale a pena mudar relativamente ao original… Mais vale pores como estava %prefix%/%topic%/

Puseste switchmode1 7 e switchmode2 7?
Coloca aqui o resultado de status 0

É exatamente isso que faço, e quando no HA clico em verificar configuração, aparece isto:

Invalid config for [input_number]: [abertura_estore-alice] is an invalid option for [input_number]. Check: input_number->input_number->abertura_estore-alice. (See ?, line ?). Please check the docs at https://home-assistant.io/components/input_number/ Invalid config for [input_text]: [tempodeabertura_estore-alice] is an invalid option for [input_text]. Check: input_text->input_text->tempodeabertura_estore-alice. (See ?, line ?). Please check the docs at https://home-assistant.io/components/input_text/ Invalid config for [cover]: required key not provided @ data[‘platform’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/cover/ Invalid config for [cover.template]: [estore-alice] is an invalid option for [cover.template]. Check: cover.template->covers->estore-alice. (See ?, line ?). Please check the docs at https://home-assistant.io/components/cover.template/ Invalid config for [input_boolean]: [alterarslider_estore-alice] is an invalid option for [input_boolean]. Check: input_boolean->input_boolean->alterarslider_estore-alice. (See ?, line ?). Please check the docs at https://home-assistant.io/components/input_boolean/ Invalid config for [automation]: Entity ID binary_sensor.rele_2_estore-alice is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/ Invalid config for [automation]: Entity ID binary_sensor.rele_2_estore-alice is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None Entity ID input_boolean.alterarslider_estore-alice is an invalid entity id for dictionary value @ data[‘condition’][0][‘entity_id’]. Got None extra keys not allowed @ data[‘condition’][0][‘state’]. Got None not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/ Invalid config for [automation]: Entity ID binary_sensor.rele_1_estore-alice is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/ Invalid config for [automation]: Entity ID binary_sensor.rele_1_estore-alice is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None Entity ID input_boolean.alterarslider_estore-alice is an invalid entity id for dictionary value @ data[‘condition’][0][‘entity_id’]. Got None extra keys not allowed @ data[‘condition’][0][‘state’]. Got None not a valid value for dictionary value @ data[‘condition’][0][‘condition’]. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/ Invalid config for [automation]: Entity ID input_number.abertura_estore-alice is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/ Invalid config for [automation]: Entity ID input_number.abertura_estore-alice is an invalid entity id for dictionary value @ data[‘trigger’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/

@Maddoctor. aqui está o status 0

17:38:39 CMD: status 0
17:38:39 MQT: stat/estore_da_sala/STATUS = {"Status":{"Module":39,"FriendlyName":["Sala_subir","Sala_descer"],"Topic":"estore_da_sala","ButtonTopic":"0","Power":0,"PowerOnState":0,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[7,7,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
17:38:39 MQT: stat/estore_da_sala/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Power on","Uptime":"0T00:05:11","StartupUTC":"2019-01-12T16:33:28","Sleep":0,"BootCount":24,"SaveCount":233,"SaveAddress":"FB000"}}
17:38:39 MQT: stat/estore_da_sala/STATUS2 = {"StatusFWR":{"Version":"6.3.0","BuildDateTime":"2018-10-30T17:33:53","Boot":31,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
17:38:39 MQT: stat/estore_da_sala/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Vaitentando",""],"TelePeriod":300,"SetOption":["0000C009","55818000","00000000"]}}
17:38:39 MQT: stat/estore_da_sala/STATUS4 = {"StatusMEM":{"ProgramSize":489,"Free":512,"Heap":13,"ProgramFlashSize":1024,"FlashSize":1024,"FlashMode":3,"Features":["00000809","0FDAE794","000183A0","23B617CE","00003BC0"]}}
17:38:39 MQT: stat/estore_da_sala/STATUS5 = {"StatusNET":{"Hostname":"persianasala","IPAddress":"192.168.1.86","Gateway":"192.168.1.254","Subnetmask":"255.255.252.0","DNSServer":"192.168.1.254","Mac":"60:01:94:AC:8C:3D","Webserver":2,"WifiConfig":5}}
17:38:39 MQT: stat/estore_da_sala/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.250","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_AC8C3D","MqttUser":"maxcalavera","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
17:38:39 MQT: stat/estore_da_sala/STATUS7 = {"StatusTIM":{"UTC":"Sat Jan 12 16:38:39 2019","Local":"Sat Jan 12 17:38:39 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":1,"Sunrise":"08:40","Sunset":"17:16"}}
17:38:39 MQT: stat/estore_da_sala/STATUS10 = {"StatusSNS":{"Time":"2019-01-12T17:38:39","Switch1":"ON","Switch2":"ON"}}
17:38:39 MQT: stat/estore_da_sala/STATUS11 = {"StatusSTS":{"Time":"2019-01-12T17:38:39","Uptime":"0T00:05:11","Vcc":3.160,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Vaitentando","BSSId":"2C:FD:A1:69:4C:20","Channel":11,"RSSI":100}}}
17:38:47 MQT: stat/estore_da_sala/STATUS = {"Status":{"Module":39,"FriendlyName":["Sala_subir","Sala_descer"],"Topic":"estore_da_sala","ButtonTopic":"0","Power":0,"PowerOnState":0,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[7,7,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
17:38:47 MQT: stat/estore_da_sala/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Power on","Uptime":"0T00:05:19","StartupUTC":"2019-01-12T16:33:28","Sleep":0,"BootCount":24,"SaveCount":233,"SaveAddress":"FB000"}}
17:38:47 MQT: stat/estore_da_sala/STATUS2 = {"StatusFWR":{"Version":"6.3.0","BuildDateTime":"2018-10-30T17:33:53","Boot":31,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
17:38:47 MQT: stat/estore_da_sala/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Vaitentando",""],"TelePeriod":300,"SetOption":["0000C009","55818000","00000000"]}}
17:38:47 MQT: stat/estore_da_sala/STATUS4 = {"StatusMEM":{"ProgramSize":489,"Free":512,"Heap":13,"ProgramFlashSize":1024,"FlashSize":1024,"FlashMode":3,"Features":["00000809","0FDAE794","000183A0","23B617CE","00003BC0"]}}
17:38:47 MQT: stat/estore_da_sala/STATUS5 = {"StatusNET":{"Hostname":"persianasala","IPAddress":"192.168.1.86","Gateway":"192.168.1.254","Subnetmask":"255.255.252.0","DNSServer":"192.168.1.254","Mac":"60:01:94:AC:8C:3D","Webserver":2,"WifiConfig":5}}
17:38:47 MQT: stat/estore_da_sala/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.250","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_AC8C3D","MqttUser":"maxcalavera","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
17:38:47 MQT: stat/estore_da_sala/STATUS7 = {"StatusTIM":{"UTC":"Sat Jan 12 16:38:47 2019","Local":"Sat Jan 12 17:38:47 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":1,"Sunrise":"08:40","Sunset":"17:16"}}
17:38:47 MQT: stat/estore_da_sala/STATUS10 = {"StatusSNS":{"Time":"2019-01-12T17:38:47","Switch1":"ON","Switch2":"ON"}}
17:38:47 MQT: stat/estore_da_sala/STATUS11 = {"StatusSTS":{"Time":"2019-01-12T17:38:47","Uptime":"0T00:05:19","Vcc":3.160,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Vaitentando","BSSId":"2C:FD:A1:69:4C:20","Channel":11,"RSSI":100}}}
17:38:53 MQT: tele/estore_da_sala/STATE = {"Time":"2019-01-12T17:38:53","Uptime":"0T00:05:25","Vcc":3.160,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Vaitentando","BSSId":"2C:FD:A1:69:4C:20","Channel":11,"RSSI":100}}
17:38:53 MQT: tele/estore_da_sala/SENSOR = {"Time":"2019-01-12T17:38:53","Switch1":"ON","Switch2":"ON"}
17:38:55 MQT: stat/estore_da_sala/STATUS = {"Status":{"Module":39,"FriendlyName":["Sala_subir","Sala_descer"],"Topic":"estore_da_sala","ButtonTopic":"0","Power":0,"PowerOnState":0,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[7,7,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
17:38:55 MQT: stat/estore_da_sala/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Power on","Uptime":"0T00:05:27","StartupUTC":"2019-01-12T16:33:28","Sleep":0,"BootCount":24,"SaveCount":233,"SaveAddress":"FB000"}}
17:38:55 MQT: stat/estore_da_sala/STATUS2 = {"StatusFWR":{"Version":"6.3.0","BuildDateTime":"2018-10-30T17:33:53","Boot":31,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
17:38:55 MQT: stat/estore_da_sala/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Vaitentando",""],"TelePeriod":300,"SetOption":["0000C009","55818000","00000000"]}}
17:38:55 MQT: stat/estore_da_sala/STATUS4 = {"StatusMEM":{"ProgramSize":489,"Free":512,"Heap":13,"ProgramFlashSize":1024,"FlashSize":1024,"FlashMode":3,"Features":["00000809","0FDAE794","000183A0","23B617CE","00003BC0"]}}
17:38:55 MQT: stat/estore_da_sala/STATUS5 = {"StatusNET":{"Hostname":"persianasala","IPAddress":"192.168.1.86","Gateway":"192.168.1.254","Subnetmask":"255.255.252.0","DNSServer":"192.168.1.254","Mac":"60:01:94:AC:8C:3D","Webserver":2,"WifiConfig":5}}
17:38:55 MQT: stat/estore_da_sala/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.250","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_AC8C3D","MqttUser":"maxcalavera","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
17:38:55 MQT: stat/estore_da_sala/STATUS7 = {"StatusTIM":{"UTC":"Sat Jan 12 16:38:55 2019","Local":"Sat Jan 12 17:38:55 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":1,"Sunrise":"08:40","Sunset":"17:16"}}
17:38:55 MQT: stat/estore_da_sala/STATUS10 = {"StatusSNS":{"Time":"2019-01-12T17:38:55","Switch1":"ON","Switch2":"ON"}}
17:38:55 MQT: stat/estore_da_sala/STATUS11 = {"StatusSTS":{"Time":"2019-01-12T17:38:55","Uptime":"0T00:05:27","Vcc":3.160,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Vaitentando","BSSId":"2C:FD:A1:69:4C:20","Channel":11,"RSSI":100}}} 

Sim, configurei como switchmode1 7 e switchmode2 7.
Obrigado pela tua disponibilidade.

Não podes usar hífen no código! É uma regra “absoluta”… Troca por underscore…

1 Curtiu

O comportamento que descreves é de switchmode 3,salvo erro… Põe aí o module configuration
Os switch estão como on… Estranho… Ligaste os Interruptores entre gpio e gnd?


Copyright © 2017-2021. Todos os direitos reservados
CPHA.pt - info@cpha.pt


FAQ | Termos de Serviço/Regras | Política de Privacidade