Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
ptekien 2
Posiadam miernik energii firmy ZAMEL z zainstalowaną Supla. Przy wykorzystaniu linku bezpośredniego:
Please login or register to see this link.
otrzymuję odpowiedź w formacie HTML z informacją żeby odczytać w formacie JSON trzeba dodać odpowiedni nagłówek.Please login or register to see this attachment.
Kiedy wpisuję jako scenę poniższy skrypt:
--[[
%% properties
%% events
%% globals
--]]
local http = net.HTTPClient()
local url="https://svr24.supla.org/direct/642/VUNZmkZTGJD/read"
http:request(url, {
options = {
method='GET'
},
success = function (response) fibaro:debug (response.data) end,
error = function (err) fibaro: debug ("Error:" .. err) end
});
otrzymuję niezrozumiały DEBUG:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: content="width=device-width, initial-scale=1">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: content="#00732C">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: href="/assets/img/icons/favicon.ico"
[DEBUG] 15:02:15: type="image/x-icon"/>
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: href="/assets/img/icons/favicon.ico"
[DEBUG] 15:02:15: type="image/x-icon"/>
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: type="image/png"
[DEBUG] 15:02:15: href="/assets/img/icons/supla16.png"
[DEBUG] 15:02:15: sizes="16x16">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: type="image/png"
[DEBUG] 15:02:15: href="/assets/img/icons/supla32.png"
[DEBUG] 15:02:15: sizes="32x32">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: type="image/png"
[DEBUG] 15:02:15: href="/assets/img/icons/supla96.png"
[DEBUG] 15:02:15: sizes="96x96">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: type="image/png"
[DEBUG] 15:02:15: href="/assets/img/icons/supla160.png"
[DEBUG] 15:02:15: sizes="160x160">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: type="image/png"
[DEBUG] 15:02:15: href="/assets/img/icons/supla196.png"
[DEBUG] 15:02:15: sizes="196x196">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="57x57"
[DEBUG] 15:02:15: href="/assets/img/icons/supla57.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="60x60"
[DEBUG] 15:02:15: href="/assets/img/icons/supla60.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="72x72"
[DEBUG] 15:02:15: href="/assets/img/icons/supla72.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="76x76"
[DEBUG] 15:02:15: href="/assets/img/icons/supla76.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="114x114"
[DEBUG] 15:02:15: href="/assets/img/icons/supla114.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="120x120"
[DEBUG] 15:02:15: href="/assets/img/icons/supla120.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="144x144"
[DEBUG] 15:02:15: href="/assets/img/icons/supla144.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: sizes="152x152"
[DEBUG] 15:02:15: href="/assets/img/icons/supla152.png">
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15: if it takes too long, check if the JS scripts are loaded correctly
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
[DEBUG] 15:02:15:
Wysyłając ten sam link z aplikacji ARC otrzymuję właściwe dane nawet bez odpowiedniego nagłówka.
Please login or register to see this attachment.
Może ktoś pomoże dodać odpowiedni nagłówek tak żeby otrzymać odpowiednie dane?
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.