Supla scripts (1.0 - stare)

User avatar
fracz
Posts: 2342
Joined: Fri Oct 28, 2016 10:56 pm
Location: Kraków
Has thanked: 4 times
Been thanked: 6 times

Post

Żeby te "ładne" URLe działały, musi być włączony rewrite (mówisz że jest) oraz musi być włączone nadpisywanie ustawień żądań w katalogach.

Musisz ustawić AllowOverride all dla katalogu w którym są skrypty.

Zobacz tutaj: viewtopic.php?f=9&t=2045&p=9723#p9723
User avatar
nowy1
Posts: 339
Joined: Fri Jul 01, 2016 11:51 am
Location: Warszawa

Post

fracz wrote: Tue May 23, 2017 2:02 pm Żeby te "ładne" URLe działały, musi być włączony rewrite (mówisz że jest) oraz musi być włączone nadpisywanie ustawień żądań w katalogach.

Musisz ustawić AllowOverride all dla katalogu w którym są skrypty.

Zobacz tutaj: viewtopic.php?f=9&t=2045&p=9723#p9723

Podziękował :)
User avatar
fracz
Posts: 2342
Joined: Fri Oct 28, 2016 10:56 pm
Location: Kraków
Has thanked: 4 times
Been thanked: 6 times

Post

Jeszcze trochę pracy zostało bo nie do końca wiem jak ogarnąć jedną rzecz, ale wrzucam spoiler z powiadomień :D
You do not have the required permissions to view the files attached to this post.
User avatar
michael
Posts: 1320
Joined: Wed Nov 09, 2016 8:00 am
Location: Wojkowice

Post

:D
:mrgreen: :mrgreen: :mrgreen:
Ryo
Posts: 29
Joined: Fri Jan 27, 2017 7:00 am

Post

Jak odpytać kanał o jego stan?
User avatar
slawek
Posts: 2685
Joined: Mon Mar 14, 2016 11:48 pm
Location: Biała Podlaska

Post

TEORIA jest wtedy gdy wszystko wiemy i nic nie działa
PRAKTYKA jest wtedy gdy wszystko działa a my nie wiemy dlaczego
My łączymy teorię z praktyką czyli nic nie działa i nikt nie wie dlaczego
Ryo
Posts: 29
Joined: Fri Jan 27, 2017 7:00 am

Post

slawek wrote: Sun May 28, 2017 8:55 pm Tu masz przykład https://github.com/fracz/supla-scripts/ ... php.sample

To jest voice. Chodzi mi o odpytanie za pomocą linku.
https://192.168.0.xx/supla-scripts/toggle/xxx - Zmienia stan wyjścia i zwraca jego status(ON, OFF). A ja chciałbym w analogiczny sposób uzyskać informację w jakim stanie się owo wyjście znajduje.
User avatar
michael
Posts: 1320
Joined: Wed Nov 09, 2016 8:00 am
Location: Wojkowice

Post

Tutaj :)

Code: Select all

https://192.168.0.xx/supla-scripts/state/xxx 
:mrgreen: :mrgreen: :mrgreen:
User avatar
nowy1
Posts: 339
Joined: Fri Jul 01, 2016 11:51 am
Location: Warszawa

Post

fracz wrote: Tue May 23, 2017 2:02 pm Żeby te "ładne" URLe działały, musi być włączony rewrite (mówisz że jest) oraz musi być włączone nadpisywanie ustawień żądań w katalogach.

Musisz ustawić AllowOverride all dla katalogu w którym są skrypty.

Zobacz tutaj: viewtopic.php?f=9&t=2045&p=9723#p9723
Nie moge sobie poradzić by działały ładne Url

wpis mam taki

Code: Select all

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
<Directory /var/www/html/SuplaScripts>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

po wpisaniu https://192.168.1.13/supla-scripts/temperature/34917

dostaje takie info

Code: Select all

The requested URL /supla-scripts/temperature/34917 was not found on this server.
User avatar
michael
Posts: 1320
Joined: Wed Nov 09, 2016 8:00 am
Location: Wojkowice

Post

prawdopodobnie dlatego, ze VirtualHosta masz ustawionego dla portu 80, a nie 443
a odwołujesz się po https:// spróbuj odwołać się po http://
:mrgreen: :mrgreen: :mrgreen:

Return to “Projekty użytkowników”