Wiem że jest dokumentacja supli itp ale nie ogarniam tego.
Po wygenerowaniu linku bezpośredniego mam dane następujące tylko
"connected": true,
"totalCost": 1438.59,
"pricePerUnit": 0.75,
"impulsesPerUnit": 1000,
"counter": 1918133,
"calculatedValue": 1918.133,
"currency": "PLN",
"unit": "kWh"
Brakuje informacji ile kw wykorzystałem w danym miesiącu np oraz w dniu wczorajszym jak taki link wygenerować z takimi danymi ???
api supli
-
duszek
- Posts: 81
- Joined: Sat Nov 26, 2022 6:03 am
Nie rozumiem forum przeszukiwałem …. Możesz troszkę jaśniej …..
-
pzygmunt
- Posts: 20302
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
- Been thanked: 59 times
Na cloud.supla.org masz link do dokumentacji restapi. To co pokazałeś wygląda na bieżące dane. Jeśli chcesz wiedzieć ile zużyłeś w danym miesiącu to musisz sięgnąć do historii poprzez /channels/{channel}/measurement-logs
SUPLA.... Nareszcie w domu.
-
duszek
- Posts: 81
- Joined: Sat Nov 26, 2022 6:03 am
Przepraszam Cię ale możesz troszkę jaśniej wiem że jest dokumentacja ale ja odnośnie api wchodze w ten temat od tygodnia i chciałbym pobrać dane a nie ma instrukcji ani informacji możesz łopatologicznie podać jak to pobrać mają link bezpośredni. Wiem że może wydawać się to proste i banalne ale zależy od punktu siedzenia
-
pzygmunt
- Posts: 20302
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
- Been thanked: 59 times
Linkami bezpośrednimi takich danych nie pobierzesz. Musisz sięgnąć przez API do historii. Poczytaj trochę o RestAPI w internecie. Jak to zrobisz to będzie łatwiej Cię dalej nakierować.
SUPLA.... Nareszcie w domu.
-
duszek
- Posts: 81
- Joined: Sat Nov 26, 2022 6:03 am
Co robię nie tak .....
wchodzę na suplę -> integracje-> osobiste tokeny->robię nowy wszystko daje do odczytu->dokumentacja API
Autorize-> Wklejam w Value wybenerowany tokenValue->Autorize
Odszukuje channel/(chanel)/measurement-logs->try it out
Chanell-> wpisuje numer mojego kanału licznika->execute
https://svr82.supla.org/api/v2.4.0/chan ... offset=100
{
"error": "access_denied",
"error_description": "OAuth2 authentication required"
}
cache-control: no-store,private
connection: Keep-Alive
content-length: 78
content-type: application/json
date: Sat,18 Feb 2023 09:45:16 GMT
keep-alive: timeout=5,max=100
pragma: no-cache
server: Apache
strict-transport-security: max-age=63072000; includeSubDomains
www-authenticate: Bearer realm="Service",error="access_denied",error_description="OAuth2 authentication required"
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
Co robię nie tak chyba coś z autoryzacją ???
Potrzebuje wyciągnąć 2 informacje
Ile zużyło kw miesiącu oraz ile w jednym dniu .......
wchodzę na suplę -> integracje-> osobiste tokeny->robię nowy wszystko daje do odczytu->dokumentacja API
Autorize-> Wklejam w Value wybenerowany tokenValue->Autorize
Odszukuje channel/(chanel)/measurement-logs->try it out
Chanell-> wpisuje numer mojego kanału licznika->execute
https://svr82.supla.org/api/v2.4.0/chan ... offset=100
{
"error": "access_denied",
"error_description": "OAuth2 authentication required"
}
cache-control: no-store,private
connection: Keep-Alive
content-length: 78
content-type: application/json
date: Sat,18 Feb 2023 09:45:16 GMT
keep-alive: timeout=5,max=100
pragma: no-cache
server: Apache
strict-transport-security: max-age=63072000; includeSubDomains
www-authenticate: Bearer realm="Service",error="access_denied",error_description="OAuth2 authentication required"
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
Co robię nie tak chyba coś z autoryzacją ???
Potrzebuje wyciągnąć 2 informacje
Ile zużyło kw miesiącu oraz ile w jednym dniu .......
-
duszek
- Posts: 81
- Joined: Sat Nov 26, 2022 6:03 am
532 ……Dobre dane podawałem ?
You do not have the required permissions to view the files attached to this post.
