hkiam / HCPBridge

emulates Hoermann HAP 1 HCP (HCP2) on ESP8622, ESP32 and Arduino.
89 stars 37 forks source link

Using this project with a plain MAX485 breakoutboard #14

Closed s00500 closed 1 year ago

s00500 commented 1 year ago

Hi Guys,

Just got my new doors installed and made sure I could get them controlled today. I had the 6 pin connectors and some old max485 breakout boards at home. I choose to build this using only a ESP32 since I think it is powerfull enough.

When using just a max485 the direction on the bus needs to be controlled as well. The converter board shown in the readme does this automatically. This caused me some minor troubles and several hours of debugging....

Initially I could not get stuff to work. I modified the code to use Serial2 on 16/17 and added a pin that controls the max 485 direction. Several times I could get it to respond correctly.... but then the door would go into a 4 times red blink pattern till a bus scan was executed again. (I have a promatic 4)

The two things I messed up where:

I thought I post this here as an issue in case somebody runs into similar trouble. It works great for me now, and I might play with it to add it to ESPHome in some way as I prefer control via HomeAssistant (although the webui is really pretty, well done @hkiam !!!). Hope this helps when troubleshooting

Greetings from Vienna, Lukas

MCLW commented 1 year ago

Hi Lukas,

I have the same issue from time to time. After some hours or days, my pro Matic ran into this error.

Can you please share your code with this fix.

Thank you

Maik

s00500 commented 1 year ago

Hey @MCLW I did not work very elegant here yet haha....

I am planning to make a esphome component out of it at some point... For now if you wanna see my modified code check here: https://git.lbsfilm.at/lbsadmin/HCPBridgeESP32

MCLW commented 1 year ago

Thank you, I will try it out.