Code Monkey home page Code Monkey logo

hcpbridgemqtt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hcpbridgemqtt's Issues

Additional PCB Headers that are needed for Sensors

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.

Cannot connect to Supramatic 4

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:

  1. Which motor do you have? Supramatic 4
  2. Which branch/release did you use? Dev_pref
  3. Which peripherals (bme280, HCsr04, ...) did you use? None
  4. See error

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.

[webui] light switches back to off if manually toggled

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.

Temperature

Is there chance to get the temperature from the dht sensor in the /status page?

add IOBroker compatibility

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

WifiHotsopot does not close

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

Click Restart Button - Hörmann Error 7

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.

MQTT over SSL

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.

MQTT

hello, thanks for your version! what do I need to configure in "home assistant" in order to use your MQTT version? Thanks a lot.

random Disconnects from Door Motor - how to debug?

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?

Security: Disable open SSID from the ESP32

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:

  1. Which motor do you have?
  2. Which branch/release did you use?

master, 4th Sept 2023

  1. Which peripherals (bme280, HCsr04, ...) did you use?

none

  1. See error

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

set_position does not work over MQTT

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).

  1. Which motor do you have? -> Hörmann Supramatic E4
  2. Which branch/release did you use? ->Master (commit 04f1679)
  3. Which peripherals (bme280, HCsr04, ...) did you use? -> None. I use tynets board however and it worked and still works fine. (also build the esp32s3_tynet binary)

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.

Screenshot_20231122_154641

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

Unresponsive motor after unknown reasons

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:

  1. Which motor do you have? Promatic 4
  2. Which branch/release did you use? Gifford47
  3. Which peripherals (bme280, HCsr04, ...) did you use? no
  4. See error

Expected behavior
It should reconnect or disconnect and do not disturb the gates to be opened with button without restarting.

Loss of WIFI results in WIFI connect loop

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

  1. Which motor do you have? Supramatic E4
  2. Which branch/release did you use? (latest) master as of today 03.08.23 14:02 CEST
  3. Which peripherals (bme280, HCsr04, ...) did you use? None
  4. Expected behavior? Reconnect to wifi and stay connected

Screenshots
Rebooted AP at 11:45
image

Additional context
Happends consistently everytime the AP gets rebooted or WIFI on/off

Bus scan doesn't find anything

Describe the bug
Bus scan doesn't finds HCPBridge

To Reproduce
Steps to reproduce the behavior:

  1. Which motor do you have?
    Supramatic E4 (without the DIPs, i've to use the Menu option 37/1 to start a bus scan)

  2. Which branch/release did you use?
    master branch, 15.07.2022

  3. Which peripherals (bme280, HCsr04, ...) did you use?
    ESP32 + TTL/UART Converter + 5V Stepdown

  4. 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.

Can't compile code for my esp32s

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

Esp with ethernet

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

door open/close acknowledge reliability

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;

  • secure that the command arrives the esp
  • is the esp sending the command to the hcp2 bus?
  • is there a delay in the code which denies the execution of the command?
  • are the conditions met to execute the command at esp side?

MQTT Connection hanging on

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

All in one Firmware for sensors

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.