Closed FluGanz closed 1 month ago
There is no official API for setting the cable lock unfortunately. If we want it bad, we could reverse engineer the Zaptec portal web application. However, since this is undocumented, it's impossible for us to guarantee that the function will stay working.
Would be awesome if you could work it out, because there is alot of stealing cables in my area so it yould be nice to integrate cable lock with the alarm
same
You could start by contacting Zaptec and ask for a mechanism for setting the cable lock from the Zaptec API. That would be a lot better way of fixing it than trying to hack something together that isn't officially supported.
I thought let's try contacting Zaptec support and ask if they have a solution for the cable lock function via the API. This was my question:
Hi,
Please add a mechanism for setting the cable lock from the Zaptec API (not only in the Zaptec app or Zaptec Portal), because there is a lot of stealing cables in my area, so it would be nice to integrate cable lock. Thank you.
Kind regards, Frank.
and received this answer:
Hi Frank,
Thanks for your message. It's possible to activate the permanent cable lock function via the API: https://zaptec.objects.frb.io/assets/PDFs/Integrating-with-Zaptec-charging-systems.pdf Does this helpt with your case?
Best regards, Wouter Francken Zaptec
Thank you. I've read through the PDF, but unfortunately it does not give any guidance on how to configure the PermanentCableLock
state 😢 . It mentions that it support unlocking keys (not completely sure what that means) when using OCPP. However, the Zaptec integration is not using OCPP. Nor do I think the integration should meddle with it, because there are several users that are using the Zaptec integration with chargers that is shared among several users and with payment systems attached.
Should I answer the mail from Zaptec support and if so, what should I ask? I am not a programmer or familiar with API structure.
I'd say something like "The information provided unfortunately does not contain any information on how to change the PermanentCableLock
state from the API. I'd like information on how to do that from an API call please."
I have received an answer from Zaptec.
Hi Frank,
Thank you, just checked and this is not available at this time but I created a request for this on our roadmap. I cannot say at what time this will be developed, but it's on our roadmap. Currently this function is only available via the portal or via the app.
Best regards, Wouter Francken
A fix for the issue have been pushed to master. Please install the "master" version and test if this fixes the observed problems. @FluGanz @c0mplex1
Can't find the "master" version, can only find 0.7.1
It seems HACS have removed the ability to download master. I'll see what I can do.
I've created a beta/pre-release "0.7.2b1" available for download and test.
Tried the function and it works like a charm 👌🏻 Will make some automations and try it out 😃
I added the feature to my automation and it works as expected.
I would love if there was a switch to lock or unlock the cable