gifford47 / hcpbridgemqtt Goto Github PK
View Code? Open in Web Editor NEWThis project forked from promml/hcpbridgemqtt
Emulates Hörmann UAP1-HCP board using an ESP32 and a RS485 converter, and exposes garage door controls over web page and MQTT.
This project forked from promml/hcpbridgemqtt
Emulates Hörmann UAP1-HCP board using an ESP32 and a RS485 converter, and exposes garage door controls over web page and MQTT.
I got a message from @14yannick requesting that i add some pcb headers for additional Sensors to my next PCB Revision.
I would like to discuss here what exactly is needed in terms of Sensors and COnnection points so i can add them to my next PCB Revison.
If possible i prefer general IO ports instead of some special pinout, but if a sensor just needs some general pin header like GND, 3V3 and two IO Pins i'm happy to add them.
All sensors need to be 3V3, so no 5V avaliable on my boards.
Describe the bug
I had my device connected a long time ago, but then removed whilst I was getting it serviced by the official team.
Just now I am putting back in, but also updated to the latest Dev_pref branch
Note: my tx/rx are flipped so I adjusted this via the UI
When going through the bus scan process, I can see it come alive and also the website being active.
But soon after the BS finishes the device turns off, which seems like the BS failed to find anything.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
if i toggle the light manually via ui, the switch if toggled to "on" state shortly but then after "updateData" javascript was executed, the light is switched back to "off". The json response of the core has always the key pair "lamp:false" but the lamp was toggled on the supramatic motor.
If the lamp of the supramatic motor is on, it can toggled to off via ui without problems.
So i think the hciemulator interprets the response in a wrong manner so it shows the light as off.
Is there chance to get the temperature from the dht sensor in the /status page?
Hi everybody!
At first many thanks for this project!
Today I updated HA and saw this warnings:
More info here:
https://developers.home-assistant.io/blog/2023-057-21-change-naming-mqtt-entities/
So small fix of MQTT entries is needed.
Have a nice day!
The Communication between HCP and IOBroker is working.
Somehow IOBroker isnt able to toggle movement of the garage door.
Iobroker needs a true / false mqtt state to read or write data via mqtt
Control via the Web interface works well
I am just working on getting this running on my board; but it would be great if this code could be added into ESPHome!!
Today I noticed that the WifiHotspot does not close after the HomeAssistant configuration, which is a security risk as anyone can connect to the hotspot and open the gate.
Everything works fine, except for the fact that you can connect to the HCPBridge and end up on the Garagentor page...
Did I do something wrong?
Useing Release: 0.0.6.1
As soon as I click the restart button on the website, the connection is interrupted and error message 7 appears on the garage door. The only thing that helps is to switch off the power to the garage door.
Is your feature request related to a problem? Please describe.
Support for SSL connections from HCPBridgeMqtt to MQTT broker.
Describe the solution you'd like
The garage is unreachable from LAN and internet connection is provided by WLAN AP via mobile network subscription (standard LTE modem with prepaid SIM card). HCPBridgeMqtt would run on ESP32 + Modbus bridge to Hörmann SupraMatic 4.
Describe alternatives you've considered
Setting up low power device with non-SSL MQTT broker in my garage and relaying the messages over SSL to my main MQTT broker on public IP.
hello, thanks for your version! what do I need to configure in "home assistant" in order to use your MQTT version? Thanks a lot.
I got some issues that after some Hours the Garage Door motor shuts down the BUS power and seems to have disconnected from the Device. The Motor doesen't show any error, so it should be a clean shutdown initiated from the Deice right? Is there maybe such a function in the firmware of the ESP?
I'm not sure exactly what causes this problem and i also would like to debug it, but how? i saw that there are LOGD commands in the hoermann.h file, but how do i activate the debug mode? Also: where are the outputted? on the Serial bus?
Describe the bug
I discovered, that both of my ESP32 are broadcasting an SSID ESP_XXXXXX. After connecting without password, I'm able to open the garage door via browser and the ip address 192.168.4.1.
To Reproduce
Steps to reproduce the behavior:
master, 4th Sept 2023
none
Expected behavior
An option in the configration file to disable the SSID, otherwise if connected as client to a wifi network, the ESP shouldn't provide it's own SSID
Screenshots
Probably not required
Additional context
Describe the bug
I updated to the latest version (I built the master branch, not development). I am still able to control the door. Open, Close, Stop, Light, Vent. It also correctly reads back the current position but I can't set the position manually through HomeAssistant/MQTT.
Web Interface works and I CAN set the position through the http endpoint. e.g: /command?action=7&position=90
So it must be related to the firmware, something in the MQTT part must be messed up?
To Reproduce
Build firmware from the current master (commit 04f1679), install firmware and try to set position through HomeAssistant/MQTT (set_position).
In the configuration.h I only set an OTA password, disabled the access point, added my wifi and mqtt credentials, set DEVICE_ID to HCPBridge01 and HOSTNAME to HCPBRIDGE01, (In case I get ten more garages :D)
Expected behavior
Set the cover position through Home assistant/MQTT again as I've build a few automations around that feature.
subscribed to hormann/HCPBridge01/# and you can clearly see that the set_position command does not work while setting it through MQTT. The HTTP endpoint works as expected.
Edit: Clarified that HTTP works and only MQTT does not.
hormann/HCPBridge01/state {"valid":true,"doorposition":95,"lamp":"true","doorstate":"closing","detailedState":"closing","vent":"close"}
hormann/HCPBridge01/position 95
hormann/HCPBridge01/state {"valid":true,"doorposition":89,"lamp":"true","doorstate":"open","detailedState":"stopped","vent":"close"}
hormann/HCPBridge01/position 89
hormann/HCPBridge01/state {"valid":true,"doorposition":94,"lamp":"true","doorstate":"opening","detailedState":"opening","vent":"close"}
hormann/HCPBridge01/position 94
hormann/HCPBridge01/state {"valid":true,"doorposition":99,"lamp":"true","doorstate":"opening","detailedState":"opening","vent":"close"}
hormann/HCPBridge01/position 99
hormann/HCPBridge01/state {"valid":true,"doorposition":100,"lamp":"true","doorstate":"open","detailedState":"open","vent":"close"}
hormann/HCPBridge01/position 100
hormann/HCPBridge01/state {"valid":true,"doorposition":93,"lamp":"true","doorstate":"closing","detailedState":"closing","vent":"close"}
hormann/HCPBridge01/position 93
hormann/HCPBridge01/state {"valid":true,"doorposition":89,"lamp":"true","doorstate":"open","detailedState":"stopped","vent":"close"}
hormann/HCPBridge01/position 89
hormann/HCPBridge01/state {"valid":true,"doorposition":95,"lamp":"true","doorstate":"opening","detailedState":"opening","vent":"close"}
hormann/HCPBridge01/position 95
hormann/HCPBridge01/state {"valid":true,"doorposition":100,"lamp":"true","doorstate":"open","detailedState":"open","vent":"close"}
hormann/HCPBridge01/position 100
hormann/HCPBridge01/set_position 90
hormann/HCPBridge01/set_position 90
hormann/HCPBridge01/set_position 90
Describe the bug
It is not the first time that motor gets unresponsive and I see not connected on web interface. After the night woke up tried to open door and it is not opening. And it is impossible to open the door with push button, remote butoon, nothing works. I have restarted bus search with last dip switch it got connected again and it is working.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should reconnect or disconnect and do not disturb the gates to be opened with button without restarting.
Describe the bug
Whenever I update my (Unifi) AP or otherwise reboot the AP the ESP32 will go into an connection loop (connect and then disconnect shortly after) which is only solved by an hard reboot of the ESP32 (disconnect power, wait 30s and connect it again)
To Reproduce
AP online and ready for connections
ESP32 connects and is connected (verify after 1-5min)
Reboot AP
ESP32 enters infinite WIFI reconnect (or reboot?) cycle
Screenshots
Rebooted AP at 11:45
Additional context
Happends consistently everytime the AP gets rebooted or WIFI on/off
Describe the bug
Bus scan doesn't finds HCPBridge
To Reproduce
Steps to reproduce the behavior:
Which motor do you have?
Supramatic E4 (without the DIPs, i've to use the Menu option 37/1 to start a bus scan)
Which branch/release did you use?
master branch, 15.07.2022
Which peripherals (bme280, HCsr04, ...) did you use?
ESP32 + TTL/UART Converter + 5V Stepdown
See error
Expected behavior
The Motor doesn't find the HCPBridge.
I've also tried disconnecting the power pins from the RJ12 plug and used the terminals 5 and 20 instead, so the ESP has time too boot before the scan (as suggested by @14yannick in another fork of this project).
The RXD led on the TTL UART converter flashes, but nothing on the TXD led.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I've made sure, that the contacts on my prototype board are working and that there is no short circuit.
SOLVED:
With this project GPIO D16 and D17 have to be used instead of RX0/TX0.
i’m trying to compile your code for my esp32s but i receive these error:
`In file included from src/main.cpp:3:
.pio/libdeps/esp32s3_tynet/AsyncElegantOTA/src/AsyncElegantOTA.h:4:2: warning: #warning AsyncElegantOTA library is deprecated, Please consider moving to newer ElegantOTA library which now comes with an Async Mode. Learn More: https: [-Wcpp]
#warning AsyncElegantOTA library is deprecated, Please consider moving to newer ElegantOTA library which now comes with an Async Mode. Learn More: https://docs.elegantota.pro/async-mode/
^~~~~~~
Compiling .pio\build\esp32s3_tynet\liba4b\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\esp32s3_tynet\liba4b\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\esp32s3_tynet\liba4b\WiFi\WiFiScan.cpp.o
Compiling .pio\build\esp32s3_tynet\liba4b\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32s3_tynet\liba4b\WiFi\WiFiUdp.cpp.o
.pio/libdeps/esp32s3_tynet/AsyncTCP-esphome/src/AsyncTCP.cpp:753:2: error: #else without #if
#else
^~~~
.pio/libdeps/esp32s3_tynet/AsyncTCP-esphome/src/AsyncTCP.cpp:755:2: error: #endif without #if
#endif
^~~~~
.pio/libdeps/esp32s3_tynet/AsyncTCP-esphome/src/AsyncTCP.cpp:1020: error: unterminated #if
#if LWIP_IPV4 && LWIP_IPV6
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\AsyncEventSource.cpp.o
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\AsyncWebSocket.cpp.o
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\WebAuthentication.cpp.o
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\WebHandlers.cpp.o
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\WebRequest.cpp.o
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\WebResponses.cpp.o
Compiling .pio\build\esp32s3_tynet\lib829\ESPAsyncWebServer-esphome\WebServer.cpp.o
.pio/libdeps/esp32s3_tynet/AsyncTCP-esphome/src/AsyncTCP.cpp: In member function 'bool AsyncClient::connect(const char*, uint16_t)':
.pio/libdeps/esp32s3_tynet/AsyncTCP-esphome/src/AsyncTCP.cpp:754:39: error: 'ip_addr_t' {aka 'struct ip_addr'} has no member named 'addr'; did you mean 'u_addr'?
return connect(IPAddress(addr.addr), port);
^~~~
u_addr
*** [.pio\build\esp32s3_tynet\libfda\AsyncTCP-esphome\AsyncTCP.cpp.o] Error 1`
Why?
Thank you so much for your work
Describe the bug
I can only see esp32s3 build flags, how to build for casual espp32?
Is your feature request related to a problem? Please describe.
Weak WiFi signal
Describe the solution you'd like
It would nice to add option to use esp32 board with ethernet for example WT32-ETH01
sometimes the command for opening or closing the door isn´t executed. there´s no action at the door but on mqtt side comes the last state. i.e.: if the door is closed and it should be opened via mqtt, the command arrives the esp, but nothing happens.
the investigation is;
Hello,
I downloaded before 4 days all files and programmed my ESP.
I Have installed Mosquitto Broker on my PC. I added the user from the ESP. The Server IP is the IP from my PC. But on TeraTerm my ESP say "Connecting to MQTT..."
The Mosquitto Broker is running. I tested this with MQTT.fx an MQTT Explorer.
Can you help me?
Best regards
To reduce the different binarys and compilation options, we could integrate all external sensors (bme, sr501 ...) into one firmware without the need of the different pio build envs. The needed memory size fits into the esp.
The user could choose the connected sensor in the ui. a simple check in the loop could enable or disable the sensor data.
What do you think about it @14yannick @Tysonpower @kfroeschl ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.