your project sounds what I was looking for since years, I have some questions:
can you share some example of 12V->USB converter?
any MAX3232 RS232 to TTL is ok?
I see that you used the wemos, I guess that also any ESP32 should work as well, correct?
once the ESP is connected through the serial, all the existing keypad and proximity sensor still work?
I’m spending more time to read/learn the configuration, can you help me to understand the differences between the yaml files? espkyogate_configuration.yaml VS Kyo_Full.yaml
Please, keep me honest here.
I understand that Kyo_Full.yaml contains all the 8 areas and all the 32 zones;
but I see that something is missing in the espkyogate_configuration.yaml
one more; I see that in the bentel_kyo32.h there is the switch for the “fake key” case: BinarySensor *sabotaggio_chiave_falsa = new BinarySensor("Sabotaggio Chiave Falsa");
but I’m not able to find it in the ESP code, adding the following rows should be ok?
Hello @bremby,
the two configuration files are an example,
the important thing is that you configure all the variables you want to control.
I know that I’ve to do a refactor of that part to simplify it but I never have time,
if you want to do a pull request I would be very happy!
Yes, the “fake key” variable is that one (sorry for italian!)
I don’t have a key inserter so I’ve never tried that signal, if you have it and can confirm that it works I’d appreciate it.
Before wasting too much time in the configuration, have you tested that the communication with the central works?
I always recommend doing this by setting up a zone and testing that you can see the change on home assistant and the arming and disarming commands work.
I just received the MAX232, and I’m now uploading the conf
Compiling /data/esp32-01/.pioenvs/esp32-01/src/main.cpp.o
In file included from src/esphome/components/sensor/sensor.h:3:0,
from src/esphome/core/application.h:16,
from src/esphome/components/api/api_connection.h:4,
from src/esphome.h:2,
from src/main.cpp:3:
src/bentel_kyo32.h: In member function 'bool Bentel_Kyo32::update_kyo_partitions()':
src/esphome/core/log.h:95:100: warning: repeated ' ' flag in format [-Wformat=]
esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^
src/esphome/core/log.h:155:28: note: in expansion of macro 'esph_log_d'
#define ESP_LOGD(tag, ...) esph_log_d(tag, __VA_ARGS__)
^
src/bentel_kyo32.h:595:5: note: in expansion of macro 'ESP_LOGD'
ESP_LOGD("stato_uscita", "Uscita % - Stato %i", i, StatoZona);
^
src/esphome/core/log.h:95:100: warning: ' ' flag used with '%S' gnu_printf format [-Wformat=]
esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^
src/esphome/core/log.h:155:28: note: in expansion of macro 'esph_log_d'
#define ESP_LOGD(tag, ...) esph_log_d(tag, __VA_ARGS__)
^
src/bentel_kyo32.h:595:5: note: in expansion of macro 'ESP_LOGD'
ESP_LOGD("stato_uscita", "Uscita % - Stato %i", i, StatoZona);
^
src/esphome/core/log.h:95:100: warning: format '%S' expects argument of type 'wchar_t*', but argument 5 has type 'int' [-Wformat=]
esp_log_printf_(ESPHOME_LOG_LEVEL_DEBUG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
^
src/esphome/core/log.h:155:28: note: in expansion of macro 'esph_log_d'
#define ESP_LOGD(tag, ...) esph_log_d(tag, __VA_ARGS__)
^
src/bentel_kyo32.h:595:5: note: in expansion of macro 'ESP_LOGD'
ESP_LOGD("stato_uscita", "Uscita % - Stato %i", i, StatoZona);
^
Linking /data/esp32-01/.pioenvs/esp32-01/firmware.elf
did you ever try to load the full zone (32) with the full area (8)?
At some point the ESP becomes unresponsive and I need to reset it (flash it from a base image)
I tried a different combination, but at some point, when I add a new zone or a new area, it sounds that I exceed a limit and the ESP stops connecting to the Wi-Fi
I’m able to load only 19 Zones, 8 Areas, and 8 Exits; after that the ESP doesn’t work any more
Yes, another user also reported it to me.
I had also contacted the developers of ESPHome and it is a limitation of this type of integration.
Do you have more than 19 zones?
I see
I don’t think I have more than 19 Zones to manage, but I will check.
However, I think you should put somewhere these kinds of “limits” to let people know how to manage it; especially if someone has already reported it. I spent 3hrs to test the behavior and understand the reason, it can be that some people are less devoted to that
As I said, I love it; a little more details/info can help others to manage it confidently
for my awareness, do you have more details on where is the limitation? is the number of entities that can be associated to a device in ESPHome integration?
You’re right, unfortunately I haven’t had time to work on this integration.
Few weeks ago another user was brought to my attention this issue,
I investigated and even ask to esphome developers, it was not clear what the limitation was.
Fact is that after a certain number of sensors the firmware became unstable at runtime.
I recommend to start the configuration with one zone and then expand it a little at a time by integrating all the sensors. So far no one has reported any anomalies on installed systems.
To solve this problem, on the advice of the ESPHome developers, I should change the integration mode, which involves rewriting a large part of the code.
I don’t have time for that now, so I will introduce the 16-zone limit instead.
Can you help me to better understand how you used the service entities; is the first time I play with it.
You shared the lovelace picture and some examples, if you don’t mind, can you share/explain how you managed it?
On the picture I see that you don’t have the numpad as this one
Controlling the alarm via serial link doesn’t require to provide the PIN. What does the Bentel software is to retrieve the list of all configured PINs from the alarm panel and check them with the provided one. You can implement a similar approach with the esphome device, at least for disarming the alarm.
As says @lcavalli PIN is not necessary to arm or disarm with my system.
You can however in your virtual panel on lovelace put a pin of your choice,
then calling the service as described in my documentation you can arm or disarm one or more areas.
Did you try to connect the esp to the central unit? does it work?