Página 1 de 3

Relés RS485

Publicado: Mar Nov 24, 2020 8:36 pm
por sgonzalez984
Saludos a todos

Soy nuevo en HA y estoy configurando una tarjeta con 4 relés y me comunico con ésta vía RS485.

La acción de cerrar o abrir los relés ya lo tengo resulto, colocando estos parámetros en el archivo "configuration.yaml":

# command_state: rele 0-1-2-3
cover:
- platform: command_line
covers:
rele_1_bomba:
command_open: echo -en '\x01\x05\x00\x00\xFF\x00\x8C\x3A' > /dev/ttyUSB0
command_close: echo -en '\x01\x05\x00\x00\x00\x00\xCD\xCA' > /dev/ttyUSB0
# command_state: rele2
rele_2_bomba:
command_open: echo -en '\x01\x05\x00\x01\xFF\x00\xDD\xFA' > /dev/ttyUSB0
command_close: echo -en '\x01\x05\x00\x01\x00\x00\x9C\x0A' > /dev/ttyUSB0
# command_state: rele3
rele_3_bomba:
command_open: echo -en '\x01\x05\x00\x02\xFF\x00\x2D\xFA' > /dev/ttyUSB0
command_close: echo -en '\x01\x05\x00\x02\x00\x00\x6C\x0A' > /dev/ttyUSB0
# command_state: rele4
rele_4_bomba:
command_open: echo -en '\x01\x05\x00\x03\xFF\x00\x7C\x3A' > /dev/ttyUSB0
command_close: echo -en '\x01\x05\x00\x03\x00\x00\x3D\xCA' > /dev/ttyUSB0
# End RS485


Como pueden ver, la tarjeta de relés cambia de estado enviando un código en Hexadecimal predefinidos. También tengo la opción de preguntar a la tarjeta el estatus de cada relés, pero solo lo he podido hacer vía consola, enviando un código hexadecimal y recibiendo otro código indicándome el estatus de los relés.

por ejemplo:
-Si tengo todos los relés abiertos y envío el estatus 010100000001FDCA el resultado será un código Hex con el formato xx-xx-xx-xx-xx-00-xx-xx
-Si solo tengo activo el relé numero 0. y luego envío el estatus el resultado será: xx-xx-xx-xx-xx-01-xx-xx y así hasta llegar a 0F donde indica que todos los relés están activos.

Pregunta, me pueden indicar como puedo hacer en el HA aparezcan o muestre los posibles estados de los relés?
La ideal es enviar cada cierto intervalo el código de estatus para revisar el estado de los relés.

Gracias.

Re: Relés RS485

Publicado: Dom Dic 10, 2023 8:07 am
por dadag
Aw, this has been a really good post. In notion I must put in place writing such as this moreover – taking time and actual effort to create a really good article… but so what can I say… I procrastinate alot by no means seem to get something carried out. Garage Door Repair company’s Encino

Re: Relés RS485

Publicado: Dom Dic 10, 2023 9:21 am
por dadag
You are able to capture several well guided adventures with assorted chauffeur driven car support. Many include important loan packages and some people is going to take someone for their depend toward the mortgage place, or a trip to upstate New York. baltimore limousine rental Amerikan viisumi verkossa

Re: Relés RS485

Publicado: Mar Dic 12, 2023 5:29 pm
por dadag
you have a fantastic weblog here! do you want to make some invite posts on my own weblog? Garage Door Repair Services Vista

online baccarat strategy

Publicado: Mié Dic 13, 2023 6:09 am
por Agnestine111
We have a site for sports games. You must be interested. baccarat online real money philippines

Re: Relés RS485

Publicado: Jue Dic 14, 2023 1:21 pm
por dadag
There are a few interesting points in time in this post but I don’t know if I see they all center to heart. There is some validity but I most certainly will take hold opinion until I consider it further. Great article , thanks and we want far more! Put into FeedBurner likewise pentobarbital for sale

Re: Relés RS485

Publicado: Dom Dic 17, 2023 12:22 pm
por dadag
I am curious to find out what blog platform you are working with? I’m having some small security issues with my latest website and I would like to find something more safeguarded. Do you have any suggestions? Caluanie Muelear Oxidize For Sale

Re: Relés RS485

Publicado: Lun Dic 18, 2023 3:37 pm
por dadag
Please let me know if you’re looking for a author for your site. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d really like to write some content for your blog in exchange for a link back to mine. Please blast me an e-mail if interested. Regards! đăng ký 8DAY

Re: Relés RS485

Publicado: Mar Dic 19, 2023 11:06 am
por verij
Well done! I thank you your contribution to this matter. It has been useful. my blog: how to get taller 바카라사이트

Re: Relés RS485

Publicado: Mar Dic 19, 2023 3:42 pm
por dadag
I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. Learn SEO online class