F
F
FelineKisa2021-01-21 20:30:51
Do it yourself
FelineKisa, 2021-01-21 20:30:51

The project is a lock with a unique id, which is opened and closed remotely after payment. How best to implement?

There is a task - to make a set of boxes, each of which independently opens after payment on the site and closes after some time, say, an hour. Each box has a unique id number. In addition, if the user extended the payment, the lock is not closed for the paid time. We need to know the opening and closing times of each, and preferably understand how many boxes are currently active. That is - the iron in the box should be able to communicate with the outside world in a limited way.

The physical lock itself has already been implemented in the box, but so far it only works in the local Wi-Fi, without communication with the outside world, which it distributes itself. Made it on ESP-32.

The principle is reminiscent of boxberry posts or something like that. The thought arises that we are reinventing the wheel and there are ready-made or almost ready-made solutions for these or other pieces of iron of a comparable size.
- The question is, are there any?
- If not, is it possible to finish our lock on this controller, or look for another one? what libraries to use?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Pankov, 2021-01-21
@FelineKisa

What's the problem? Pay for the cheapest VDS, buy a domain, set up a free SSL certificate so that https is and is secure. On VDS, in order not to be tied to a single provider and it was easier to transfer the server in which case, install the docker, configure the docker compose with containers:
- nginx for static and wrapping SSL,
- DB (postgres or whatever is more familiar to you? You can mongu)
- write in python or any language that you know the simplest web service with an API that will answer boxes to open and close when, collect statuses from them, charge level there and other telemetry. You can hire a freelancer for this if you don't know how.
- you can separately raise the site on the same VDS and, if necessary, some ready-made CMS. Thanks to the docker, all of them will not push with your elbows and interfere with each other with their dependencies.
Do not forget to register the certificate renewal using the crown (letsencrypt has a special certbot).
If everything is done correctly, the deployment of the server will be trivial, you can easily, quickly and seamlessly move to another hosting.
Your boxes will send telemetry to the API at a specified interval, pick up information about the need to open / close. If the moment of opening and closing must be observed to seconds or more precisely, then you can raise a web socket connection, but it’s better to set the time and tell the box what time to open and close.

A
Armenian Radio, 2021-01-21
@gbg

Design problem. The box must have a local interface, not a website. This is a typical mistake of the "designers" of all kinds of smart (and, as a result, stupid) systems - to assume that the user has a charged smartphone with a working Internet. Very often, instead of this, you get a user:
- with a dead phone - with a
phone without money - with a Nokia 3310 - okay, the user has a charged iPhone and money, but damn it, just today, mobile Internet fell in the area of
​​\u200b
\u200byour box, only 2G is left, and your site is a dozen megabytes of bloated PWA.
Obviously, in your case, the following is possible - the user, while at home, paid for everything, the box opened, but while the user was walking to it, the hooligan Sidorov was ahead of him and took everything.
As I said in a similar thread- the most reliable in terms of electronics (and cheap in the long run) - a specialized solution, not a craft from RPi with Linux and other charaban.
Determine how your product will receive the Internet (Wi-fi, Ethernet, 3G) and design the controller based on this. Well, or use RPi, but it will be more expensive.
In particular, such a device can be made not requiring a connection to the Internet or a 220V network at all - after all, the courier bringing goods to it can update the lists of pincodes for lockers and bring new batteries.

M
Maks Burkov, 2017-06-03
@Maks00088

Follow these links:
Here
Here
Swing dies. JavaFx is a good choice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question