-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT commands List #407
Comments
To send a message to your board you must form it as a JSON string. Also the IP address of the board must be included in the string. As an example here I'll show how to open the door via mqtt command. I send my messages with mosquitto_pub on linux. Commands known by developer version can be found in mqtt.esp:
|
Thanks very much. I managed to get some idea of this from the code, but I couldn't figure out how to add a user with a type and an expiry. The other thing that took some time to work out was what topic it subscribes too, it seems to be the root topic you add in the MQTT settings. Appreciate your help. |
So whith mqttfx if whe publish on topic "rfid" with the string "opendoor", the door should open right? |
Not exactly.... You must publish to the root topic that the board publishes to, this is in the 'topic' setting under 'MQTT Settings". So if the topic is set to 'tele\esprfid' for example, you will find the results push onto your MQTT queue under the topic 'tele\esprfid\send' You need to send 2 key value pairs as the message on the root topic as per ingeninge's comment: If you want to do other things then replace "opendoor" with the commands from above, for adding a user you need to include the name and the uid. |
Thanks a lot I will try this 👍 |
i don't know how to fomat message to topic from mqttfx , for exemple if i have rfid ip :192.168.2.73 and topic set to "rfidPortail" (without "") how format message to send opendoor ? using simply mqttfx, can u help me ? thanks a lot |
Use MQTT Explorer. Much easier to test mqtt commands. Download it from here: http://mqtt-explorer.com/ I used topic "rfid" in GUI. So I send to this topic json type string: {"doorip":"10.0.107.50","cmd":"opendoor"} Where "10.0.107.50" is IP of the ESP-RFID board and command (cmd) is "opendoor". When I click Publish I can hear the relay on board clicking. Firmware version 1.3.3. Still waiting for my Wiegand RFID receiver, but board is working fine for me. Powering it via 12V DC. Take note. MUST BE DC!!! Bell transformers are not OK. They are AC and will fry the board. I will have this board in main electrical fuse box where my fuses are. So I ordered a DIN rail power transformator. Long looked for correct one. Finally found perfect ones from MeanWell. Model MDR-20-12 is perfect to power ESP-RFID board and 12V control current for the door lock . Also have MDR-20-24 to power the door lock and two MDR-20-5 to power two wall mounted Android tables that I will use instead of dumb two wire monitors that I currently use. I hope I helped someone with this information. |
thanks for your help , unfortunately when i try to send the payload to topic it won't work for me , but the test button on UI yes ? is not the same function ? is from websocket maebe , also i see there is a list of arguments for topic like " /topic/send " but do the job for me ; thanks a lot for your detaileds explanations |
Today I played a bit with my Home Assistant automations. I will use ESP-RFID web GUI only for managing cards. Even that I will maybe some day bring to Home Assistant and I can open the door lock via mqtt. For me it works fine. Here are my current automations:
You can see what mqtt events I listen and you can see what I send to open the door. |
yes is very clear , but don't work for me .. i have another esp-rfid and this time i try to update firmware , the older is updated via UI , but i thing is not perfectly updated (the UI show 1.04) |
How to add user over mqtt? I try: |
Has anyone got an example of a working python script to say open the door using MQTT. |
Please could someone point me at a guide to the MQTT commands that can be executed against the 1.3.3 firmware? I happily receive messages but dont know how push commands.
Thanks
The text was updated successfully, but these errors were encountered: