📜 ⬆️ ⬇️

Offline informer for online business

Probably everyone who develops their online business constantly monitors the current state of affairs,
for this you collect statistics, and display the graphs, but personally I always had a sense of the virtuality of what is happening, someone came to the site, registered and even made a purchase.

Everything is nice and pleasant, but it happens there.
Believe it or not, there is a difference in the feelings of the usefulness of the action from the online and offline business, I will not explain it just having both online and offline business I came to this conclusion, I am pleased when what is happening in virtual reality has a physical manifestation of positive events noticeable me even when the computer is off.


')


Obviously, SMS notifications come to mind.
Fortunately, this can be easily organized, and I played with it, and I even received such notifications for every registration and / or sale, but when it starts happening often, you turn them off.
For me, the priority / importance of an SMS message is higher than an informational message, in short, the emergency channel eventually clogged with informational messages, among which sometimes extremely important ones were lost.
I began to dig in the direction of a certain device and, as an experiment with the support of a friend, I came to a solution that hangs on the Ethernet port and listens to UPD packets from our server.

For the test version, it was implemented quite simply:

Arduino and Ethernet-shield working as a Web client simply listens to the correct port on the router and, when receiving a UDP packet from our server, it blinks the LED of the desired color and makes a “pip-pip” squeaker. What does an important lead mean?

It worked and pleased me with a whiff and a blink for a couple of days until I changed the provider and was left without an external IP, which was the default in Beeline, and the new provider does not have it, and buying it separately for the sake of pickling is completely out of place.

By the way, I turned off the spit leaving only the LED, not everyone likes to listen to Morse code around the clock.
I admit it and quickly tired of it myself.
So in terms of playing it is interesting, but it was not exactly what I wanted.

Looking ahead, I would note that if it were not for my natural laziness that is activated in cases when it is easier to buy, then I certainly understand that it was possible to implement a new solution on this hardware. Or buy a tablet and put it on the wall with a web page and graphs on it.
But I wanted more lamp and warm.

I had the benefit of another Etherfeed Rev version . 2.0 which flew to me for a long time and was delivered just when I already had time to be disappointed in the previous decision.


The device is extremely easy to use and the description should have done what I need for only 60 bucks with delivery.


The principle is simple.
Through the web interface (like your router)

Customize:
1) Its IP in your internal network and its parameters.
2) Domain where to knock on the data and the path to the info-script on this domain.
3) Reboot and ...
4) Nothing is visible.

We read docks , we watch source codes .
Do I check if the device is really knocking on the server at the specified address?
Knocking.
I start looking for problems with headers and encodings.
In parallel, I am writing to developers.
They answered very quickly and I had already compared their script to mine by the time, and mine, the difference was found right away.
The problem was in the header Transfer-Encoding: chunked
In our case, this turned out to be a big problem, as there was a bunch of Apache + Nginx, each working with chunked individually, but not together, if it were possible to specify the port in the settings, it would be easier for us to solve this problem.
Now we just handle this script bypassing Apache.
And everything works, but of course I had to edit the nginx configs.



Well, somehow, this decision has taken root in us and pleasantly pleases us with its relevant indicators.

ps I have no relation to the developers, all their contacts are on their site.

Source: https://habr.com/ru/post/163897/


All Articles