Closed DivanX10 closed 1 year ago
Hi, in the mqtt.esp no include restart how cmd command, yo need add this command on .esp file
Hi, in the mqtt.esp no include restart how cmd command, yo need add this command on .esp file
Thanks, but I can't do it. If only the author can add to the firmware. I do not know how to add these commands to mqtt.esp and how to upload it to nodemcu later.
You need VScode and platformio to compile and modify the code, if you need something help, tell me
Yes, it would be great if you could show me what and how. For example, what code to add to the mnt.esp file and how to assemble it later, or I will be grateful for the finished firmware with the built-in command to reboot ESP-RFID
Yes, I will see how to make this, and tell you my progress.
IMHO it would be better if you put a home assistant relay in front of esp-rfid. That way you'll be sure to reboot esp-rfid even when/if it is totally frozen.
I express my gratitude to Aleks130699 for the working esp-rfid firmware. A similar topic was raised here FIx Home Assistant integration . Now you can reboot the ESP board, there are sensors displaying the label. You can download the firmware from this link. In the settings, you need to enable MQTT for Home Assistant, after which esp-rfid will appear in the Home Assistant.
Thanks to this, I now have an excellent reading from the label. More details about my project can be found here. Where I have embedded tags in air freshener cylinders in a smart air freshener and when changing the cylinder, the Home Assistant understands which cylinder is installed and takes into account the resource of the cylinder consumption
IMHO it would be better if you put a home assistant relay in front of esp-rfid. That way you'll be sure to reboot esp-rfid even when/if it is totally frozen.
Now this is not required, you can just download the firmware from this link and esp-rfid will appear in the Home Assistant
A working reboot command via the MQTT service for this firmware
service: mqtt.publish
data:
topic: esprfid/cmd
payload: "{cmd:'reboot',doorip:'192.168.1.48'}"
I still don't understand the usefulness of restarting a working and responding device. Please, erudite me!
@DivanX10 let us know what's your use case for this as I agree with @evazzoler, I cannot understand the purpose. Seems like we are trying to bypass fixing an error that you are experiencing? Would be nice to solve the root cause of the issue, rather than rebooting it to hide the problem.
I still don't understand the usefulness of restarting a working and responding device. Please, erudite me!
I have a smart air freshener that works according to the Zigbee protocol and on batteries, and I am also in the process of creating a base for an air freshener, which will have a built-in MC RC522, wemos mini reader module and power is supplied to charge batteries in it, similar to a radiotelephone that stands at a telephone exchange. This air freshener refreshes the air in the toilet through both Voice Assistant and Home Assistant automation. For a variety of flavors, I often change the cylinders, I can change them two or three times a week, or I can change them once a week, but the flavors change often. In order to know the consumption resource of the balloon flavors and when the balloon resource is coming to an end, the Home Assistant will inform me in advance that it's time to buy a new balloon. You can know which is the most frequent fragrance used. Further, the selected fragrance is automatically set in the Home Assistant according to the read label and continues accounting for this balloon further. When you change the balloon, the MC RC522 tag reader does not respond to the tag, either falls asleep, or freezes and only a reboot helps. After restarting, the balloon is read and the voice assistant informs that the balloon is installed and informs which flavor is selected. I added a reboot to the automation when I take the balloon out of the air freshener and after that the reader reads the label 100% and there is no such situation that after installing the balloon in the air freshener, the automation does not work out to the end, because the reader does not respond to the label and I had to reboot the board by de-energizing
Ok, your project is really amazing, really original and useful. But there are some "but", IMHO:
your are not using esp-rfid for the purpose for which it was intended
esp-rfid is not intended to be powered by a battery
you are rebooting the esp8266 for solving a problem that may exist in the reader and not in the board
you are not fixing a issue but get around it, risking to create another issue
you are wasting the small ESP memory with code implementing a not needed reboot command instead of fixing existing code
I believe that this way of acting does not respect the best practices of software philosophy and software engineering.
My advice is to find out why the player is misbehaving, fix the problem, remove the reboot function to make room for more useful functions. If the internal watchdog is not sufficient, the keep-alive via MQTT must be used by an external controller to perform a power cycle of the whole device through a relay. For battery powered board you can use a relay with radio remote control. The only reason to reboot should be because esp-rfid no longer responds, at which point the reboot can only be hardware.
Ok, your project is really amazing, really original and useful. But there are some "but", IMHO:
- your are not using esp-rfid for the purpose for which it was intended
- esp-rfid is not intended to be powered by a battery
- you are rebooting the esp8266 for solving a problem that may exist in the reader and not in the board
- you are not fixing a issue but get around it, risking to create another issue
- you are wasting the small ESP memory with code implementing a not needed reboot command instead of fixing existing code
I believe that this way of acting does not respect the best practices of software philosophy and software engineering.
My advice is to find out why the player is misbehaving, fix the problem, remove the reboot function to make room for more useful functions. If the internal watchdog is not sufficient, the keep-alive via MQTT must be used by an external controller to perform a power cycle of the whole device through a relay. For battery powered board you can use a relay with radio remote control. The only reason to reboot should be because esp-rfid no longer responds, at which point the reboot can only be hardware.
I don't use esp-rfid to power the battery. Everyone has their own food. The air freshener is powered by disposable batteries, which last for 3 months.
With the new firmware, I haven't rebooted esp nodemcu v3 for two days and it's too early to talk about it, but it seems to be working fine. I checked other tags and no matter how the freezes were noticed, you need to wait at least a week to understand whether it will hang or not. I did the reboot because there is no trust in the stable operation of the MC-RC522 module and there is no understanding who is the culprit, the firmware or the MC-RC522 module. It may be that the MC-RC522 module itself falls asleep, since there is no frequent access to it and when you bring the label after 2-4 days or 2 weeks, then through the esp rfid web interface I do not observe that the reader reads the tags.
Hey @DivanX10 but then, why don't you use the existing feature?
Wouldn't that solve your problem?
This restarts every 24 hours, and the hang occurs before 24 hours have passed and this option does not save the situation
But didn't you say before that 2 days have passed and everything works fine?
How often would you like to reboot?
But didn't you say before that 2 days have passed and everything works fine?
How often would you like to reboot?
it's only been two days with the new firmware and so far everything is fine, today I updated my Home Assistant and the last state of the sensors went wrong. While I'm conducting surveillance. I didn't attach any importance to this before, until I noticed that the reader stops working. Now I will pay attention to this, but so far too little time has passed to claim that the firmware is working correctly.
@matjack1 prior to this, @DivanX10 used the very first version 1.0.2, perhaps the hanging error was in it, as well as my assumption that this may happen due to the fact that the label is constantly near the reader, and this may cause problems
@matjack1 prior to this, @DivanX10 used the very first version 1.0.2, perhaps the hanging error was in it, as well as my assumption that this may happen due to the fact that the label is constantly near the reader, and this may cause problems
And that can fry the label or at least shorten its life...
@DivanX10 how is it going? Instead of the MQTT reboot, you can have a look at this: https://github.com/esprfid/esp-rfid/pull/552 :)
Hello. When I checked 4 days later, it fell off, I won't say exactly on what day. Sensors were unavailable in the Home Assistant. I rebooted the board via the web console and the reader started working again.
I see that you have fixed something there. The firmware file itself from where can I download it?
@DivanX10 you can try the latest dev build from here: https://github.com/esprfid/esp-rfid/suites/9369310704/artifacts/441298681
Try the auto-reboot functionality, it should work now :)
Thanks. Good. I will try and I need a few days to check to see how the reader works with esp rfid
@DivanX10 you can try the latest dev build from here: https://github.com/esprfid/esp-rfid/suites/9369310704/artifacts/441298681
Try the auto-reboot functionality, it should work now :)
I filled in the firmware. The device did not appear in Home Assistant, although the esprfidhomeassistant topic appeared in mqtt explorer, you probably forgot to add Discovery. I rolled back to my firmware and the device appeared in the Home Assistant. Also, a certain label should be reset in the sensor. For example, a label has been detected and the name of the label is displayed in the sensor, then after 10 seconds the name of the label disappears. This is necessary so that when you take out the balloon and it has not yet been determined, then inserting it into place, the system will not yet know which balloon is installed, and when the sensor has a permanent name, then installing the balloon, the system says that such a balloon is installed, but the balloon is different and another label, which is still didn't count. Therefore, you need to reset the status of the label definition
Also, if I lean the labels, then I don't see the names of the labels in the topics
This error has been corrected in my PR #549, which has not yet been accepted for work.
thanks @Aleks130699 I've started working on the HomeAssistant integration as well. There are things that your PR fixes, but there's something else as well. That's why it's not merged yet. I'm going to work on that soon, bear with me
@matjack1 Regarding my PR, I really don’t know why support for several relays was once introduced and how it can be applied in practice, personally, in principle, I no longer have free ports that could somehow be used, I finalized their support just because it was made
The fixed autorestart is now merged on the dev
branch :)
@matjack1 Regarding my PR, I really don’t know why support for several relays was once introduced and how it can be applied in practice, personally, in principle, I no longer have free ports that could somehow be used, I finalized their support just because it was made
Multiple relays can be used to open different doors with different badges and a single reader (offices, corridors, etc.), or to enable some badges to deactivate an alarm system and others only to open the door, etc. It is a solution that makes esp-rfid more versatile and adaptable to the needs of users who would otherwise be forced to choose commercial products.
After our chat I'm convinced it's useful, it just need to be checked around as sometimes the assumption is that multiple relays are driving the same "door".
In general, things are like this. The RFID operation is still falling off and I abandoned this option in favor of the solution of determining the balloon on the esp. To determine the balloon, I use this Resistance Sensor component. It works stably and reliably
To understand how it works, you can watch the video and the documentation itself
In general, things are like this. The RFID operation is still falling off and I abandoned this option in favor of the solution of determining the balloon on the esp. To determine the balloon, I use this Resistance Sensor component. It works stably and reliably
To understand how it works, you can watch the video and the documentation itself
Ok but, please, keep considering that this project is oriented on access control and access control does not require the token to be left in front of the reader. Abnormal behavior in this usage is not inherent to the project.
Выражаю благодарность Aleks130699 за рабочую прошивку esp-rfid. Похожая тема поднималась здесь Интеграция FIx Home Assistant . Теперь можно перезагрузить плату ESP, есть датчики отображающие метку. Скачать прошивку можно по этой ссылке . В настройках нужно включить MQTT для Home Assistant, после чего в Home Assistant появится esp-rfid.
Good afternoon. I tried to upgrade from firmware 1.3.3 rdm 6300 stopped working, was connected to rx (GPIO 3). Also, the keys (rc522) that were in memory stopped working, they are read once, but the lock is not opened.
hey @nikola-75 sorry, but this issue is for something else. If you have troubles upgrading, can you please share your settings by exporting the file from the web UI? So I can try reproducing your setup and make the upgrade path possible
привет@nikola-75Извините, но этот вопрос о другом. Если у вас возникли проблемы с обновлением, не могли бы вы поделиться своими настройками, экспортировав файл из веб-интерфейса? Поэтому я могу воспроизвести ваше население и сделать возможный путь обновления.
Good afternoon. This configuration works on the version "esp-rfid-1.3.7-dev-patchAlex130699", when updating to the version "esp-rfid-2.0.0-dev-patchAlex130699-v.1" rdm6300 falls off, rs 522 responds, but does not read memory keys. Below in the archive is the configuration, the password for the web interface is kolr220908.
I went through the topics and did not find an answer to my question, how to reboot ESP-RFID via MQTT in Home Assistant? I tried it and it didn't work out