Page 18 of 35

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Sat Mar 09, 2019 8:52 pm
by milion81
cino111 wrote:
Sat Mar 09, 2019 8:07 pm
A co aktualizacja daje dla RPI3?
z tego co zauważyłem to zmienił się sposób wykrywania nowych urządzeń tzn nie trzeba przeskakiwać na inną zakładkę aby wykryło, przynajmniej na moim pi zero

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Sat Mar 09, 2019 8:52 pm
by milion81
fracz wrote:
Sat Mar 09, 2019 7:31 pm
Kliknij w tym trzecim czerwonym wpisie po prawej stronie link "commons...." - i jeszcze raz screen tego co się pokaże.

Code: Select all

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>SUPLA Cloud</title>
    <meta name="viewport"
            content="width=device-width, initial-scale=1">
    <meta name="theme-color"
            content="#00732C">
        <style>
        #page-preloader {
            height: 400px;
            width: 350px;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-left: -175px;
            margin-top: -200px;
            text-align: center;
            font-family: 'Quicksand', sans-serif;
        }

        #page-preloader svg {
            width: 200px;
            height: 200px;
        }

        #page-preloader .if-too-long {
            display: none;
        }

        #page-preloader.too-long .if-too-long {
            display: block;
            padding-top: 70px;
        }

        #page-preloader noscript {
            color: #F60;
        }

        #page-preloader .loader-dots {
            margin: 70px auto;
        }

        #page-preloader .loader-dots div {
            margin-top: 0;
        }

    </style>
    <style>
        .loader-dots {
            font-size: 0;
            display: block;
            position: relative;
            width: 120px;
            margin: 100px auto;
        }

        .loader-dots div {
            background: none;
            border: solid 2px black;
            width: 25px;
            height: 25px;
            border-radius: 30px;
            position: absolute;
            animation: dots-bounce 1.75s infinite;
            top: 50%;
            margin-top: -15px;
        }

        .loader-dots div:nth-child(2) {
            animation-delay: 0.25s;
            left: 50%;
            margin-left: -15px;
        }

        .loader-dots div:nth-child(3) {
            animation-delay: 0.5s;
            right: 0;
        }


        @keyframes dots-bounce {
            10% {
                transform: translate3d(0, 30px, 0);
                animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1);
                height: 30px;
            }
            14% {
                height: 90px;
            }
            15% {
                height: 30px;
                transform: translate3d(0, -60px, 0);
                animation-timing-function: cubic-bezier(0.8, 0, 0.8, 1);
            }
            35% {
                transform: translate3d(0, 0, 0);
            }
        }

        .black .loader-dots div {
            border-color: white;
        }
    </style>
    <link rel="icon"
            href="/assets/img/icons/favicon.ico"
            type="image/x-icon"/>
    <link rel="shortcut icon"
            href="/assets/img/icons/favicon.ico"
            type="image/x-icon"/>
            <link rel="icon"
                type="image/png"
                href="/assets/img/icons/supla16.png"
                sizes="16x16">
            <link rel="icon"
                type="image/png"
                href="/assets/img/icons/supla32.png"
                sizes="32x32">
            <link rel="icon"
                type="image/png"
                href="/assets/img/icons/supla96.png"
                sizes="96x96">
            <link rel="icon"
                type="image/png"
                href="/assets/img/icons/supla160.png"
                sizes="160x160">
            <link rel="icon"
                type="image/png"
                href="/assets/img/icons/supla196.png"
                sizes="196x196">
                <link rel="apple-touch-icon"
                sizes="57x57"
                href="/assets/img/icons/supla57.png">
            <link rel="apple-touch-icon"
                sizes="60x60"
                href="/assets/img/icons/supla60.png">
            <link rel="apple-touch-icon"
                sizes="72x72"
                href="/assets/img/icons/supla72.png">
            <link rel="apple-touch-icon"
                sizes="76x76"
                href="/assets/img/icons/supla76.png">
            <link rel="apple-touch-icon"
                sizes="114x114"
                href="/assets/img/icons/supla114.png">
            <link rel="apple-touch-icon"
                sizes="120x120"
                href="/assets/img/icons/supla120.png">
            <link rel="apple-touch-icon"
                sizes="144x144"
                href="/assets/img/icons/supla144.png">
            <link rel="apple-touch-icon"
                sizes="152x152"
                href="/assets/img/icons/supla152.png">
        <base href="/">
</head>
<body>
        <div class="vue-container invisible">
            <transition name="fade">
        <navbar v-if="$user.username"></navbar>
    </transition>
    <loading-cover :loading="changingRoute">
        <transition name="fade-router">
            <router-view></router-view>
        </transition>
    </loading-cover>
    <cookie-warning v-if="$frontendConfig.requireCookiePolicyAcceptance && $user.username && !$user.userData.agreements.cookies"></cookie-warning>
            <idle-logout v-if="$user.username"></idle-logout>
        </div>
    <div id="page-preloader">
        <svg version="1.1"
        id="Layer_1"
        xmlns="http://www.w3.org/2000/svg"
        x="0px"
        y="0px"

        viewBox="-1 0.2 56.5 59.8"
        style="enable-background:new -1 0.2 56.5 59.8;"
        xml:space="preserve">

    <style type="text/css">
        .st0 {
            display: none;
        }

        .st1 {
            fill: none;
        }
    </style>

    <g id="Layer_1_1_"
            class="st0"></g>

    <g>
        <path class="st1"
                d="M27.8,57.7c-9.2,0-18.3,0-27.5,0c-0.2,0-0.3,0-0.3-0.3c0-18.3,0-36.7,0-55c0-0.2,0-0.3,0.3-0.3
	c18.3,0,36.7,0,55,0c0.2,0,0.3,0,0.3,0.3c0,18.3,0,36.7,0,55c0,0.2,0,0.3-0.3,0.3C46.1,57.7,36.9,57.7,27.8,57.7z M16.8,3
	c-0.3,0-0.6,0-0.9,0c-0.2,0-0.4,0-0.6,0.1c-3,0.4-5.6,1.7-7.6,4.1c-2.1,2.5-2.9,5.3-2.5,8.6c0.3,2.8,1.6,5.1,3.7,7
	c2.5,2.2,5.4,3.1,8.7,2.9c0.2,0,0.3,0.1,0.4,0.3c1.7,4.9,3.4,9.8,5,14.7c0.6,1.7,1.2,3.4,1.7,5.2c0.1,0.3,0,0.4-0.2,0.6
	c-2.1,1.4-3,4-2.3,6.3c1.2,3.9,6,5.3,9.2,2.9c1.7-1.3,2.5-3,2.3-5.2c-0.1-1.3-0.7-2.5-1.6-3.4c-0.2-0.2-0.2-0.3,0-0.4
	c0.5-0.5,1-1,1.4-1.5c1.4-1.5,2.8-3,4.2-4.5c1.3-1.4,2.6-2.7,3.8-4.1c0.1-0.1,0.2-0.2,0.4-0.1c2.2,1.2,4.5,1.2,6.7-0.1
	c2.4-1.3,3.6-4.1,3.1-6.7c-0.6-3.1-3.3-5.3-6.7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3.5-14.8
	c-0.4-1.8-0.8-3.5-1.3-5.3C21.3,25,21.3,24.9,21.3,24.9z"/>

        <path class="st1"
                d="M24.6,14.2c0,3.7-2.6,6.8-6.2,7.6c-3.3,0.7-6.5-0.6-8.3-3.3c-1.9-2.8-1.6-6.5,0.6-9c1.8-2,4-2.9,6.7-2.7
	c3.3,0.3,5.6,2,6.8,5.2C24.5,12.7,24.6,13.5,24.6,14.2z"/>

        <path class="st1"
                d="M28.1,54.8c-2,0-3.7-1.3-4-3.2c-0.4-2.1,1.1-4.3,3.3-4.6c1.9-0.3,3.7,0.8,4.4,2.4c1,2.3-0.5,5-3.1,5.3
	C28.5,54.8,28.2,54.8,28.1,54.8z"/>

        <path class="st1"
                d="M45.4,27c1.9,0,3.5,1.3,3.9,3c0.4,1.9-0.7,3.8-2.5,4.4c-2,0.7-4.3-0.3-5-2.2c-0.9-2.2,0.5-4.7,2.9-5.2
	C44.8,27,45.1,27,45.4,27z"/>
    </g>
</svg>
        <div class="loader-dots">
            <div></div>
            <div></div>
            <div></div>
        </div>
        <noscript>
            <h3>SUPLA-Cloud will not work without Javascript</h3>
        </noscript>
        <p class="if-too-long text-muted">
            if it takes too long, check if the JS scripts are loaded correctly
        </p>
    </div>
    <script>
        setTimeout(function () {
            var preloader = document.getElementById('page-preloader');
            if (preloader) {
                preloader.className = 'too-long';
            }
        }, 8000);
    </script>
    <script>
    window.FRONTEND_CONFIG = {"regulationsAcceptRequired":false,"requireCookiePolicyAcceptance":false,"recaptchaEnabled":false,"recaptchaSiteKey":null,"actAsBrokerCloud":false,"suplaUrl":"https:\/\/XXXXXX.XXXXXX.com","max_upload_size":{"file":2097152,"total":8388608}};
    window.FRONTEND_CONFIG['serverTime'] = '2019-03-09T20:49:34+00:00';
    window.FRONTEND_CONFIG['renderStart'] = new Date();
    window.FRONTEND_CONFIG['baseUrl'] = '';
</script>
    <script src="/assets/dist/commons.47b1cb8ca78552e247e4.js"></script>
</body>
</html>

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Sun Mar 10, 2019 9:45 am
by makrz
Witam

Próbuję zaktualizować supla scripts z wersji 3.0.0 na Pi3b i dostaję coś takiego i nie wiem co z tym zrobić. Proszę o pomoc.

Code: Select all

pi@raspberrypi:~/supla-scripts $  git pull
Updating f36bf9b..a03d639
error: Your local changes to the following files would be overwritten by merge:
        backend/app/Application.php
        backend/app/UserAndUrlAwareLogger.php
        backend/app/authorization/JwtAndBasicAuthorizationMiddleware.php
        backend/app/commands/DispatchCyclicTasksCommand.php
        backend/app/commands/DispatchThermostatCommand.php
        backend/app/commands/DispatchTimeScenesExecutionCommand.php
        backend/app/commands/SendMetricsGaugesCommand.php
        backend/app/commands/SuplaScriptsManager.php
        backend/composer.json
        backend/composer.lock
        backend/controllers/ChannelsController.php
        backend/controllers/ClientsController.php
        backend/controllers/NotificationsController.php
        backend/controllers/ScenesController.php
        backend/controllers/SystemController.php
        backend/controllers/TokensController.php
        backend/index.php
        backend/models/Client.php
        backend/models/JwtToken.php
        backend/models/User.php
        backend/models/encoders/ColumnEncryptor.php
        backend/models/notification/Notification.php
        backend/models/scene/FeedbackInterpolator.php
        backend/models/scene/PendingScene.php
        backend/models/scene/Scene.php
        backend/models/scene/SceneExecutor.php
        backend/models/supla/SuplaApiReal.php
        backend/models/thermostat/Thermostat.php
        docker/Dockerfile
        docker/utils/crontab
        frontend/app/app.coffee
        frontend/app/app.scss
        frontend/app/clients/clients-list.coffee
        frontend/app/clients/clients-list.html
        frontend/app/common/authentication/token.coffee
        frontend/app/common/http-error-handler.coffee
        frontend/app/dashboard/channel/channel-actions.html
        frontend/app/index.html
        frontend/app/notifications/form/notification-form.html
        frontend/app/routes.coffee
        frontend/app/scenes/details/scene-details-page.html
        frontend/app/scenes/feedback/feedback-field.coffee
        frontend/app/scenes/feedback/feedback-interpolation.coffee
        frontend/app/scenes/feedback/feedback-interpolation.html
        frontend/app/scenes/form/scene-form.html
        frontend/app/scenes/selector/scene-caption.coffee
        frontend/app/scenes/selector/scene-selector.coffee
        frontend/app/scenes/selector/scene-selector.html
        frontend/app/thermostat/thermostats-list.html
        frontend/app/user/account-page.html
        frontend/app/user/details/account-details.html
        frontend/app/user/login-form/login-form.html
        frontend/app/user/login-form/login-view.coffee
        frontend/app/user/login-form/login-view.html
        frontend/app/user/login-form/login-view.scss
        frontend/package-lock.json
        frontend/package.json
        package-lock.json
        package.json
Please commit your changes or stash them before you merge.
error: The following untracked working tree files would be overwritten by merge:
        backend/app/authorization/IpRequestQuotaMiddleware.php
        backend/app/authorization/JwtWithBodyAuthentication.php
        backend/app/commands/ClearClientRegistrationCodesCommand.php
        backend/app/commands/ClearRequestQuotaLogsCommand.php
        backend/app/commands/OauthRefreshTokensCommand.php
        backend/database/migrations/20181204225138_user_short_unique_id.php
        backend/database/migrations/20181216004345_scene_condition.php
        backend/database/migrations/20181216202223_scene_stack_in_pending_scene.php
        backend/database/migrations/20181217165643_request_quota.php
        backend/database/migrations/20190102075824_thermostat_failure_count.php
        backend/database/migrations/20190103000234_user_token_expiration_time.php
        backend/database/migrations/20190118203838_add_client_purpose.php
        backend/database/migrations/20190122084752_add_client_registration_code.php
        backend/models/BelongsToUser.php
        backend/models/scene/FeedbackTwigExtension.php
        backend/models/supla/OAuthClient.php
        backend/models/supla/SuplaApiClientWithOAuthSupport.php
        frontend/app/scenes/dropdown/scenes-dropdown.coffee
        frontend/app/scenes/dropdown/scenes-dropdown.html
        frontend/app/user/automate/user-automate-settings.coffee
        frontend/app/user/automate/user-automate-settings.html
        frontend/app/user/automate/user-automate-settings.scss
        frontend/app/user/login-form/login-with-supla.coffee
        frontend/app/user/login-form/login-with-supla.html
        frontend/app/user/login-form/login-with-token.coffee
        frontend/app/user/login-form/login-with-token.html
        frontend/app/user/oauth/authorize-page.coffee
        frontend/app/user/oauth/authorize-page.html
Please move or remove them before you merge.
Aborting
pi@raspberrypi:~/supla-scripts $

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Sun Mar 10, 2019 10:34 am
by lesny8
makrz wrote:
Sun Mar 10, 2019 9:45 am
Witam

Próbuję zaktualizować supla scripts z wersji 3.0.0 na Pi3b i dostaję coś takiego i nie wiem co z tym zrobić. Proszę o pomoc.
Masz lokalnie nie zatwierdzone zmiany w tych plikach, które git Ci podaje,
Jeśli nie zmieniałeś nic to porzuć powstałe zmiany

Code: Select all

git fetch origin
Jak nie pomorze to

Code: Select all

git reset --hard origin/master
i dopiero

Code: Select all

git pull

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Sun Mar 10, 2019 11:08 am
by makrz
lesny8 wrote:
Sun Mar 10, 2019 10:34 am
makrz wrote:
Sun Mar 10, 2019 9:45 am
Witam

Próbuję zaktualizować supla scripts z wersji 3.0.0 na Pi3b i dostaję coś takiego i nie wiem co z tym zrobić. Proszę o pomoc.
Masz lokalnie nie zatwierdzone zmiany w tych plikach, które git Ci podaje,
Jeśli nie zmieniałeś nic to porzuć powstałe zmiany

Code: Select all

git fetch origin
Jak nie pomorze to

Code: Select all

git reset --hard origin/master
i dopiero

Code: Select all

git pull
Dziękuję bardzo.
Oczywiście pomogło. :D

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Sun Mar 10, 2019 8:52 pm
by lesny8
fracz wrote:
Sat Mar 09, 2019 6:52 pm
Wydam pi3 dziś. Niestety jest to proces półautomatyczny :(
Widziałem na githubie, że trochę ten proces usprawniłeś ;) Extra

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Tue Mar 12, 2019 9:42 am
by vicam
Hej
Jak do tej pory udało mi się wszystko uruchomić ale podczas testów pojawił się mały problem w momencie zaniku internetu.
Mam router MikroTik i on odpowiada za dostęp do internetu (jest to okno na świat). Kiedy mam dostęp do internetu wszystko działa idealnie po WAN i LAN. W momencie kiedy znika internet tracę dostęp po WAN (co jest logiczne) oraz po LAN (pewnie dlatego ze nie mam dostępu do DNS-a który zamienił by nazwę domeny na moje ip.). Moje pytanie jest następujące czy jest możliwa taka konfiguracja MT ze kiedy niema internetu to i tak będę w stanie połączyć się z Supla zainstalowaną na RPI w mojej sieci po domenie np. supla.mojadomena.pl

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Tue Mar 12, 2019 9:45 am
by pzygmunt
Postaw lokalnego DNS-a albo wpisz zewnętrzny adres IP.

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Tue Mar 12, 2019 9:53 am
by vicam
pzygmunt wrote:
Tue Mar 12, 2019 9:45 am
Postaw lokalnego DNS-a albo wpisz zewnętrzny adres IP.
Na RPI mam SUPLE i SUPLA Scripts oraz proxy więc nie mogę wpisywać adresu IP tylko domene. Nie chce tez edytować pliku HOST w windowsie. Chciał bym to załatwić na MT w ostateczności moge faktycznie postawic DNS-a na RPI

Re: [tutorial] Raspberry Pi – Docker, Proxy, Let’s Encrypt, SUPLA, SUPLA-Scripts...

Posted: Tue Mar 12, 2019 10:26 am
by lesny8
vicam wrote:
Tue Mar 12, 2019 9:42 am
Hej
Jak do tej pory udało mi się wszystko uruchomić ale podczas testów pojawił się mały problem w momencie zaniku internetu.
Mam router MikroTik i on odpowiada za dostęp do internetu (jest to okno na świat). Kiedy mam dostęp do internetu wszystko działa idealnie po WAN i LAN. W momencie kiedy znika internet tracę dostęp po WAN (co jest logiczne) oraz po LAN (pewnie dlatego ze nie mam dostępu do DNS-a który zamienił by nazwę domeny na moje ip.). Moje pytanie jest następujące czy jest możliwa taka konfiguracja MT ze kiedy niema internetu to i tak będę w stanie połączyć się z Supla zainstalowaną na RPI w mojej sieci po domenie np. supla.mojadomena.pl
Podałem Ci już rozwiązanie, które działa. Nie wiem co na te chwilę masz w firewallu, więc przeklejka wprost Ci nie zadziała.
Rozwiązaniem jest forward 4 portów, maskarada NATu i dwa wpisy Hairpin NAT. Dodam, że kolejność reguł jest ważna.