bondrogeen / web-server

15 stars 3 forks source link

donation #1

Closed nedoskiv closed 5 years ago

nedoskiv commented 6 years ago

Hello again,

after some time of testing my RFID system successful working in an elevator now, installed by professional company and I got first $20 profit. Decided to donate them to people which project I used.$10 is for you, $10 is for nodemcu team. So I would like to buy you a drink :), please give me a paypal or other way to sent you the money.

bondrogeen commented 6 years ago

It is very good that my code was useful to you. PayPal Donate

P.S. Have you watched my new project DoT?

nedoskiv commented 6 years ago

Donation is done,

I noticed web-server project change name, on one of commits I see web_file.lua fix, what is it, since I use my modification of your server cannot directly download and use your code, need to apply it manually :)

I also made a fix in settings.html where you made scan for a wireless, there was a bug - if you click it fast twice, it stop working.

Next thing I need to do, but not sure how, I want to use GPRs internet on nodemcu, is it possible?

On Mon, 5/7/18, Роман notifications@github.com wrote:

Subject: Re: [bondrogeen/web-server] donation (#1) To: "bondrogeen/web-server" web-server@noreply.github.com Cc: "nedoskiv" v_armenchev@yahoo.com, "Author" author@noreply.github.com Date: Monday, May 7, 2018, 10:50 AM

It is very good that my code was useful to you.

PayPal Donate P.S. Have you watched my new project DoT?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

bondrogeen commented 6 years ago

Thank you for donat.

I noticed web-server project change name, on one of commits I see web_file.lua fix, what is it, since I use my modification of your server cannot directly download and use your code, need to apply it manually :)

As the web-server project evolved and new functions were added, it became more and more, I decided to divide it into a web-server and DoT. web-server - will remain as a simple implementation of the web server. DoT - will develop further in the other direction.

I also made a fix in settings.html where you made scan for a wireless, there was a bug - if you click it fast twice, it stop working.

I understand what you're talking about, I'll fix it.

Next thing I need to do, but not sure how, I want to use GPRs internet on nodemcu, is it possible?

What is it for? In theory, you can try to connect to a GPRS modem over UART and forward the data. But the idea is not very. It's easier to put a wi-fi 3G router.

nedoskiv commented 6 years ago

here is how I fixed it: ` function scan() { int = setInterval(ani, 200); send("web_control.lc", { init: "scan" }, function (res) { if (res == "login") { location.href = '/'; } });

    setTimeout(function () {
        var a = di('list');
        send("web_control.lc", {
            init: "get"
        }, function (res) {
            if (res == "login")
                    {
                    location.href = '/';
                    }
            if (res) {
                clearInterval(int);
                y = 0;
                di('search').value = "Списък";
                di('search').disabled=false;
                try {
                    var j = JSON.parse(res);
                    for (var i = 0; i < j.length; i++) {
                        if (i == 0) {
                            a.innerHTML = '<li id="' + j[i].sd + '"><b>' + j[i].sd + '</b> rssi : ' + j[i].ri + ' channel : ' + j[i].cl + '</li>';
                        } else {
                            a.innerHTML += '<li id="' + j[i].sd + '"><b>' + j[i].sd + '</b> rssi : ' + j[i].ri + ' channel : ' + j[i].cl + '</li>';
                        }
                    }
                } catch (e) {
                    a.innerHTML = '<li>Няма намерени мрежи</li>';
                }
                a.style.display = 'block';
            }
        });
    }, 5000);
}
function reboot() {
    var data = {init: "reboot"};
    send("web_control.lc", data, function (res) {
        if (res == "login")
                    {
                    location.href = '/';
                    }
        if (res == "true")
            {
                restart2.style.opacity = "0";
                restart2.style.display = "none";
                restart1.style.opacity = "1";
                restart1.style.display = "block";
                var timeleft = 15;
                var downloadTimer = setInterval(function(){
                timeleft--;
                di("countdowntimer").textContent = timeleft;
                if(timeleft <= 0){
                    clearInterval(downloadTimer);
                    location.href = "/";}
                },1000);

            }
    })
}
document.body.addEventListener("click", function (event) {
    var a = di('list');
    if (event.target.id == "search") {
        di('search').disabled=true;
        scan();`

di - short function - getelementbyid


3g modem is not an option, i got one neoway m590 it respond to AT commands from serial. Worse case scenario is to use second esp8266 with arduino ide, it gonna handle internet connection and act like firewall and parse valid API request to nodemcu via serial. Company that tested my rfid system want to connect devices with their server to control them remotely, that is why I need to make that possible somehow, when achieve this, they may order 50-100 pieces