NFC Charge Authorization
Requires the "nfc" feature.
nfc/seen_tags
The NFC tags most recently seen by the charger.
[
{ "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE", "last_seen": 22724083 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "01:23:AB:3D", "last_seen": 10753 }
]
| Index | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
[0..7]object | A seen NFC tag
| ||||||||
[8]object | The tag spoofed by
|
nfc/inject_tag
Pretends that a tag was detected by the NFC reader. This can be used to start or stop a charging session for a specific user via the API. Analogous to the physical use of a tag, the charging session is alternately authorized or blocked with each API call. See nfc/inject_tag_start and nfc/inject_tag_stop for more precise control. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_start
Pretends that a tag was detected by the NFC reader. The tag is only used to start a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_stop
Pretends that a tag was detected by the NFC reader. The tag is only used to stop a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/config
The NFC configuration.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
curl http://$HOST/nfc/config -d '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
With MQTT on $PREFIX/nfc/config_update
mosquitto_pub -h $BROKER -t $PREFIX/nfc/config_update -m '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
| Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
deadtime_post_startint (s) | Allows stopping a charging session with an NFC tag only after this time to avoid accidental operation. | ||||||||
authorized_tagsobject[16] | A list of authorized tags.
|
nfc/seen_tags
The NFC tags most recently seen by the charger.
[
{ "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE", "last_seen": 22724083 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "01:23:AB:3D", "last_seen": 10753 }
]
| Index | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
[0..7]object | A seen NFC tag
| ||||||||
[8]object | The tag spoofed by
|
nfc/inject_tag
Pretends that a tag was detected by the NFC reader. This can be used to start or stop a charging session for a specific user via the API. Analogous to the physical use of a tag, the charging session is alternately authorized or blocked with each API call. See nfc/inject_tag_start and nfc/inject_tag_stop for more precise control. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_start
Pretends that a tag was detected by the NFC reader. The tag is only used to start a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_stop
Pretends that a tag was detected by the NFC reader. The tag is only used to stop a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/config
The NFC configuration.
# $HOST e.g. warp2-AbCd
Read
curl http://$HOST/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
curl http://$HOST/nfc/config -d '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
With MQTT on $PREFIX/nfc/config_update
mosquitto_pub -h $BROKER -t $PREFIX/nfc/config_update -m '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
| Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
deadtime_post_startint (s) | Allows stopping a charging session with an NFC tag only after this time to avoid accidental operation. | ||||||||
authorized_tagsobject[32] | A list of authorized tags.
|
nfc/seen_tags
The NFC tags most recently seen by the charger.
[
{ "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE", "last_seen": 22724083 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "01:23:AB:3D", "last_seen": 10753 }
]
| Index | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
[0..7]object | A seen NFC tag
| ||||||||
[8]object | The tag spoofed by
|
nfc/inject_tag
Pretends that a tag was detected by the NFC reader. This can be used to start or stop a charging session for a specific user via the API. Analogous to the physical use of a tag, the charging session is alternately authorized or blocked with each API call. See nfc/inject_tag_start and nfc/inject_tag_stop for more precise control. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_start
Pretends that a tag was detected by the NFC reader. The tag is only used to start a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_stop
Pretends that a tag was detected by the NFC reader. The tag is only used to stop a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/config
The NFC configuration.
# $HOST e.g. warp3-AbCd
Read
curl http://$HOST/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
curl http://$HOST/nfc/config -d '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
With MQTT on $PREFIX/nfc/config_update
mosquitto_pub -h $BROKER -t $PREFIX/nfc/config_update -m '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
| Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
deadtime_post_startint (s) | Allows stopping a charging session with an NFC tag only after this time to avoid accidental operation. | ||||||||
authorized_tagsobject[32] | A list of authorized tags.
|
Not supported on this hardware!
Not supported on this hardware!
nfc/seen_tags
The NFC tags most recently seen by the charger.
[
{ "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE", "last_seen": 22724083 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "", "last_seen": 0 },
{ "tag_type": 0, "tag_id": "01:23:AB:3D", "last_seen": 10753 }
]
| Index | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
[0..7]object | A seen NFC tag
| ||||||||
[8]object | The tag spoofed by
|
nfc/inject_tag
Pretends that a tag was detected by the NFC reader. This can be used to start or stop a charging session for a specific user via the API. Analogous to the physical use of a tag, the charging session is alternately authorized or blocked with each API call. See nfc/inject_tag_start and nfc/inject_tag_stop for more precise control. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_start
Pretends that a tag was detected by the NFC reader. The tag is only used to start a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/inject_tag_stop
Pretends that a tag was detected by the NFC reader. The tag is only used to stop a charging session. The spoofed tag is always the last entry in nfc/seen_tags
| Name | Description |
|---|---|
tag_typeint | Type of the tag.
|
tag_idstring | ID of the tag. Depending on tag type, up to 10 hex bytes separated by ':'. e.g. |
nfc/config
The NFC configuration.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
curl http://$HOST/nfc/config -d '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/nfc/config
{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}
Write
With MQTT on $PREFIX/nfc/config_update
mosquitto_pub -h $BROKER -t $PREFIX/nfc/config_update -m '{
"authorized_tags": [
{ "user_id": 1, "tag_type": 2, "tag_id": "04:E3:B2:27:39:AD:FE" },
{ "user_id": 2, "tag_type": 0, "tag_id": "01:23:AB:3D" }
]
}'
| Name | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deadtime_post_startint (s) | Allows stopping a charging session with an NFC tag only after this time to avoid accidental operation. | ||||||||||||||||
authorized_tagsobject[..] | A list of authorized tags. (Only WARP 1)
|