Hikvision-Addons icon indicating copy to clipboard operation
Hikvision-Addons copied to clipboard

Feature: Badge/code control

Open pergolafabio opened this issue 1 year ago • 17 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues

Add-on

Doorbell

Your feature request

Found usefull commands todo badge/code control:

curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/AccessControl/UserInfo/capabilities?format=json
curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/AccessControl/UserInfo/Count?format=json

curl -i --digest -u admin:xxx -X POST -H "Content-Type: application/json" -d '{"UserInfoSearchCond":{"searchID":"1","searchResultPosition": 0,"maxResults": 10,"EmployeeNoList":[{"employeeNo":"6"}]}}' http://192.168.0.70/ISAPI/AccessControl/UserInfo/Search?format=json
curl -i --digest -u admin:xxx -X POST -H "Content-Type: application/json" -d '{"UserInfoSearchCond":{"searchID":"1","searchResultPosition": 0,"maxResults": 10}}' http://192.168.0.70/ISAPI/AccessControl/UserInfo/Search?format=json


curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/AccessControl/CardInfo/capabilities?format=json
curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/AccessControl/CardInfo/Count?format=json
curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/AccessControl/CardInfo/Count?format=json&employeeNo=6

curl -i --digest -u admin:xxx -X POST -H "Content-Type: application/json" -d '{"CardInfoSearchCond": {"searchID": "1","maxResults": 10,"searchResultPosition": 0,"EmployeeNoList": [{ "employeeNo": "6" }]}}' http://192.168.0.70/ISAPI/AccessControl/CardInfo/Search?format=json
curl -i --digest -u admin:xxx -X POST -H "Content-Type: application/json" -d '{"CardInfoSearchCond": {"searchID": "1","maxResults": 10,"searchResultPosition": 0}}' http://192.168.0.70/ISAPI/AccessControl/CardInfo/Search?format=json



curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/VideoIntercom/PrivilegePasswordStatus
curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/VideoIntercom/PrivilegePasswordCfg/capabilities?format=json

PUT  /ISAPI/VideoIntercom/PrivilegePasswordCfg?format=json&security=<security>&iv=<iv>
POST /ISAPI/VideoIntercom/DeletePrivilegePasswordList?format=json


curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/SecurityCP/AlarmControlByPhone
curl -i --digest -u admin:xxx http://192.168.0.70/ISAPI/SecurityCP/AlarmControlByPhone/capabilities?format=json
curl -i --digest -u admin:xxx -X PUT -d '<AlarmControlByPhoneCfg><commandType>closeAlarm</commandType></AlarmControlByPhoneCfg>' http://192.168.0.70/ISAPI/SecurityCP/AlarmControlByPhone

pergolafabio avatar Aug 07 '23 13:08 pergolafabio

What cards / protocol does the card reader of the HikVision door bells support? Could we use our smartphones (NFC) to unlock the door?

xtc0r avatar Aug 16 '23 19:08 xtc0r

hmm, dont think so by default , cause everytime you use the NFC of your android, its generates a random number, or you need to get some development kit from hikvision itself so it can get recognized...

what you can do , is to place an NFC sticker at the back of your phone, so that will be your "badge"

pergolafabio avatar Aug 16 '23 19:08 pergolafabio

After reading some posts at stackoverflow it is indeed not possible to use the phone. I didn't expect this. So then we use a NFC tag. Still nice.

xtc0r avatar Aug 16 '23 20:08 xtc0r

Yeah I asked hikvsion to maybe get some dev kit, should be possible

pergolafabio avatar Aug 16 '23 20:08 pergolafabio

Hmm this one looks interesting, by using the wallet on our phones.. cause the debit cards send an unique uuid everytime... (not tested yet)

https://passninja.com/

pergolafabio avatar Aug 17 '23 05:08 pergolafabio

Or this test card:

https://help.passkit.com/en/articles/4430727-enabling-and-using-nfc-passes

pergolafabio avatar Aug 17 '23 06:08 pergolafabio

Seems there are also card emulator apps, that send unique data... But I prefer the wallet / card method, cause I can open door with my smartwatch also :-)

Gonna try this later

pergolafabio avatar Aug 17 '23 06:08 pergolafabio

We would need special terminals and could not reuse the HikVision intercom readers.

Why can't I read a pass with my NFC reader or NFC app? 
Both Apple VAS (Value Added Services) and Google SmartTap use proprietary protocols to communicate data between the phone and the terminal.  A regular NFC tag reader or NFC tag reading application cannot read an NFC pass

xtc0r avatar Aug 17 '23 06:08 xtc0r

well, i just tested thet NFC Card by adding to wallet, it sends a fixed uuid, and i can open the door now with my android

pergolafabio avatar Aug 17 '23 06:08 pergolafabio

Hi, with this function will you make the number of the last NFC read available?

warrior12051985 avatar Sep 09 '23 21:09 warrior12051985

To see who opened the door ? That's already visible as an attributes of the door switch, it's called the control_source

pergolafabio avatar Sep 10 '23 03:09 pergolafabio

well, i just tested thet NFC Card by adding to wallet, it sends a fixed uuid, and i can open the door now with my android

Hi, Which android phone model? Brand? App?

I can not do it with a Pixel 8 and Google Wallet.

pcaro avatar Mar 06 '24 10:03 pcaro

yeah, it doesnt work anymore, seems it was not fixed after all :-( In theory it should be possible to create a static card in google wallet, but havent find a way :-(

pergolafabio avatar Mar 06 '24 10:03 pergolafabio

@pergolafabio is this issue about exposing sensors for when someone approaches an NFC card to the doorbell to trigger some automation on Home Assistant? Because this is exactly what I am looking for. :D

felipecrs avatar Jun 20 '24 16:06 felipecrs

No, this was more an idea to make persons/badges on the outdoor station, so no ivms is needed....

To see who badged or entered the key, that's already availble in the addon, on the door relay switch, you see an attribute called "source_control"

pergolafabio avatar Jun 20 '24 19:06 pergolafabio

Very cool. Thank you!

felipecrs avatar Jun 20 '24 20:06 felipecrs

On some new devices like the 502 or the 1109 reader it is possible to use Bluetooth and NFC as a mobile credential but they need to be added to the their cloud platform in Hik-Connect teams mode and from there a mobile credential can be generated to the Hik-Connect mobile app.

fatmacheto avatar Aug 28 '24 15:08 fatmacheto