From d1c664e92b6138adf19c4e7b341b2fae1b0d4475 Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 16:45:58 +0200 Subject: [PATCH 1/7] changes to the fork for extended MQTT Support --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 38426928..b6691cb7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ +# This is a fork of the ESP RFID Project with extended MQTT Functions +First the extended functions are documented here followed by the find original descrition. The original ESP-RFID solution is already a great piece of Software, but I wanted extended functinality to integrate the my RIFID-DOOR into a home automatisation over MQTT. This has been added so far to this fork: + +* Reading all user data over MQTT +* Sending User data to RFID-DOOR/ESP-RFID over MQTT +* Sending door open command over MQTT +* Sending Sync of a RFID-DOOR (IP/Hostname) over MQTT +* Configure Sync interval over ESP-RFID GUI +* Deleting all User of a ESP-RFID device over MQTT +* NODE-RED flow & GUI to centralize managment of ESP-RFID devices & users + + + +# Orginal RFID Description # ESP RFID - Access Control with ESP8266, RC522 PN532 Wiegand RDM6300 [![Chat at https://gitter.im/esp-rfid/Lobby](https://badges.gitter.im/esp-rfid.svg)](https://gitter.im/esp-rfid/Lobby) [![Build Status](https://travis-ci.org/esprfid/esp-rfid.svg?branch=stable)](https://travis-ci.org/esprfid/esp-rfid) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d475052a09bd4865bc2654f524614cba)](https://www.codacy.com/app/omersiar/esp-rfid?utm_source=github.com&utm_medium=referral&utm_content=esprfid/esp-rfid&utm_campaign=Badge_Grade) [![BCH compliance](https://bettercodehub.com/edge/badge/esprfid/esp-rfid?branch=stable)](https://bettercodehub.com/) [![Bountysource](https://api.bountysource.com/badge/team?team_id=242217)](https://salt.bountysource.com/checkout/amount?team=esp-rfid) From bbb5788b066a74c0a1df2bc359da3c4b7bae8352 Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 16:53:48 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6691cb7..8b198aa4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ -# This is a fork of the ESP RFID Project with extended MQTT Functions -First the extended functions are documented here followed by the find original descrition. The original ESP-RFID solution is already a great piece of Software, but I wanted extended functinality to integrate the my RIFID-DOOR into a home automatisation over MQTT. This has been added so far to this fork: +# Fork of the ESP RFID Project with extended MQTT Functions +First the extended functions are documented here followed by the original descrition. The original ESP-RFID solution is already a great piece of Software, but I wanted extended functinality to integrate my RIFID-DOOR into a home automatisation over MQTT. +The full marelab solution depends on three projects: + +Hardware: +* marelab ESP-DOOR or esp-rfid-relay-board (see differences here) +* marelab fork ESP-RFID (firmware) +* marelab NODE-RED ESP-RFID integration (needs the marelab fork of ESP-RFID as firmware) + +This has been added so far to this fork: * Reading all user data over MQTT * Sending User data to RFID-DOOR/ESP-RFID over MQTT * Sending door open command over MQTT @@ -11,6 +19,8 @@ First the extended functions are documented here followed by the find original d + + # Orginal RFID Description # ESP RFID - Access Control with ESP8266, RC522 PN532 Wiegand RDM6300 From 9bf75667d15ef74b8c5f465b7cc46aa5b0a01c8d Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 16:54:43 +0200 Subject: [PATCH 3/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b198aa4..bbdb91bc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Fork of the ESP RFID Project with extended MQTT Functions +# Fork of ESP RFID with extended MQTT Functions First the extended functions are documented here followed by the original descrition. The original ESP-RFID solution is already a great piece of Software, but I wanted extended functinality to integrate my RIFID-DOOR into a home automatisation over MQTT. The full marelab solution depends on three projects: From 6e9581b5402fa49480ee3c8d029291d8b543a76d Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 17:39:29 +0200 Subject: [PATCH 4/7] MQTT Commands --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index bbdb91bc..e7d3ded0 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,35 @@ This has been added so far to this fork: * Deleting all User of a ESP-RFID device over MQTT * NODE-RED flow & GUI to centralize managment of ESP-RFID devices & users +## Using MQTT Topics +For the MQTT communication some additional TOPICs have been internaly added. The default Topic is still configured over the WebGui. If you use more then one device all used devices should have the same name configured by the WebGui. This is the used Topic hirachy: + +---+---/sync + | + +---/send + | + +---/accesslist + + If you configured over the WebGui for example = "/rfid" these topic queues can be used: + * /rfid + * /rfid/sync + * /rfid/send + * /rfid/accesslist + +## Commands recv by ESP-RFID +The message format is JSON it has to include the IP of the device & the command for a message recv by the ESP-RFID firmware. These messages can be received: + +### getuser +Sends all useres back over the /accesslist +### listusr +Sends all useres back over /send +### opendoor +Opens the Door / Magnetic Lock +### deletusers +Delete all users. It deletes all User SPIF files. +### adduser +Adds a User as SPIF File to the device. That can be shown/edit over the WebGUI + From 3c4fbb149e630bba8cb9e3ddf6d778aad711d646 Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 17:41:54 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7d3ded0..a2a3d81b 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,16 @@ This has been added so far to this fork: ## Using MQTT Topics For the MQTT communication some additional TOPICs have been internaly added. The default Topic is still configured over the WebGui. If you use more then one device all used devices should have the same name configured by the WebGui. This is the used Topic hirachy: - ----+---/sync + +``` +(TOPIC)---+---/sync | +---/send | +---/accesslist +``` - If you configured over the WebGui for example = "/rfid" these topic queues can be used: + If you configured over the WebGui for example (TOPIC) = "/rfid" these topic queues can be used: * /rfid * /rfid/sync * /rfid/send From 32c79f3571f3eebe7b97eebfd61f72f60d00b019 Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 17:49:13 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index a2a3d81b..172af03e 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,38 @@ The message format is JSON it has to include the IP of the device & the command ### getuser Sends all useres back over the /accesslist +``` +Json Command Format: +{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` + ### listusr Sends all useres back over /send +``` +Json Command Format: +{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` + ### opendoor Opens the Door / Magnetic Lock +``` +Json Command Format: +{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` + ### deletusers Delete all users. It deletes all User SPIF files. +``` +Json Command Format: +{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` + ### adduser Adds a User as SPIF File to the device. That can be shown/edit over the WebGUI +``` +Json Command Format: +{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` From a9394e24ef47bccd93211f42b3fec2e3542e24c7 Mon Sep 17 00:00:00 2001 From: Marc Philipp Hammermann Date: Sun, 19 May 2019 17:54:44 +0200 Subject: [PATCH 7/7] Update README.md --- README.md | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 172af03e..114109d8 100644 --- a/README.md +++ b/README.md @@ -38,38 +38,53 @@ For the MQTT communication some additional TOPICs have been internaly added. The The message format is JSON it has to include the IP of the device & the command for a message recv by the ESP-RFID firmware. These messages can be received: ### getuser -Sends all useres back over the /accesslist -``` +Sends all useres back over the (TOPIC)/accesslist Json Command Format: -{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` +{ + cmd :'getuser', + doorip :'(The ESP-RFID IP of the door to open as String)' +} ``` ### listusr -Sends all useres back over /send -``` +Sends all useres back over (TOPIC)/send Json Command Format: -{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` +{ + cmd:'listusr', + doorip:'(The ESP-RFID IP of the door to open as String)' +} ``` ### opendoor Opens the Door / Magnetic Lock -``` Json Command Format: -{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` +{ + cmd:'opendoor', + doorip:'(The ESP-RFID IP of the door to open as String)' +} ``` ### deletusers Delete all users. It deletes all User SPIF files. -``` Json Command Format: -{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` +{ + cmd:'deletusers', + doorip:'(The ESP-RFID IP of the door to open as String)' +} ``` ### adduser Adds a User as SPIF File to the device. That can be shown/edit over the WebGUI -``` Json Command Format: -{cmd:'opendoor',doorip:'(The ESP-RFID IP of the door to open as String)'} +``` +{ + cmd:'adduser', + doorip:'(The ESP-RFID IP of the door to open as String)' +} ```