Comments (18)
Hallo OMCastle,
ich möchte auch sehr gern den Warmwasserspeicher über das Script füllen. Hast du das hin bekommen?
Gruß rogrun
from viessmann-api.
Hello,
I'm not quite sure to understand what you want. Since version 1.0.1 all feature exposed by viessmann are exposed(in read and write). You'll find every method implemented on the api documentation here:
https://htmlpreview.github.io/?https://raw.githubusercontent.com/thetrueavatar/Viessmann-Api/develop/docs/class-Viessmann.API.ViessmannAPI.html
from viessmann-api.
Hello,
i want to charge my boiler once. But i don't know how to do this. Can you tell me which method i have tu use?
Thanks alot
from viessmann-api.
from viessmann-api.
I have found this Coder here: https://forum.fhem.de/index.php/topic,86073.195.html
#!/bin/bash
export CLIENTID=79742319e39245de5f91d15ff4cac2a8
export CLIENTSECRET=8ad97aceb92c5892e102b093c7c083fa
export TOKEN_EP=https://iam.viessmann.com/idp/v1/token
export AUTHZ_EP=https://iam.viessmann.com/idp/v1/authorize
export SCOPE=openid
export REDIRECTURI=vicare://oauth-callback/everest
export isiwebuserid=user
export isiwebpasswd=pw
CODE=curl -s -k --user "$isiwebuserid:$isiwebpasswd" "$AUTHZ_EP?client_id=$CLIENTID&scope=$SCOPE&redirect_uri=$REDIRECTURI&response_type=code"| grep -Eio 'code=(.)*"'| cut -c"6-" | sed 's/.$//'
#echo "CODE=$CODE"
TOKEN=curl -s -k --user "$CLIENTID:$CLIENTSECRET" -d "code=$CODE&grant_type=authorization_code&client_id=$CLIENTID&redirect_uri=$REDIRECTURI" $TOKEN_EP | sed 's/{"access_token":"//' | sed 's/".*//'
#REP_STATUS=curl -k -H "AUTHORIZATION: Bearer $TOKEN" "https://api.viessmann-platform.io/operational-data/installations/votre_numero/gateways/votre_numero/devices/0/features/heating.circuits.0.operating.modes.active?expanded=false&"
#echo "$REP_STATUS"
REP=curl -X POST https://api.viessmann-platform.io/operational-data/installations/xxxx/gateways/xxxxxxxxxx/devices/0/features/heating.dhw.oneTimeCharge/activate -S -s -H "Content-Type: application/json" -H "AUTHORIZATION: Bearer $TOKEN" -d '{"mode":"activate"}'
echo "$REP"
Is it possible to implement it in your API?
from viessmann-api.
Hello,
i have found a way to start the OneTimeCharge.
You only need to enable it with the "setRawJsonData" function as follows:
<?php
include __DIR__ . '/bootstrap.php';
$mode = "{\"mode\": \"activate\"}";
$viessmannApi->setRawJsonData("heating.dhw.oneTimeCharge", "activate", $mode);
And this code to deactivate:
<?php
include __DIR__ . '/bootstrap.php';
$mode = "{\"mode\": \"deactivate\"}";
$viessmannApi->setRawJsonData("heating.dhw.oneTimeCharge", "deactivate", $mode);
Best regards
from viessmann-api.
from viessmann-api.
from viessmann-api.
from viessmann-api.
Now i have it tested. The OneTimeCharge is starting on my heatingsystem, but i get this message in the browser:
Message: Return value of Viessmann\API\ViessmannAPI::startOneTimeDhwCharge() must be of the type string, null returned Code: 0
Here my code:
<?php
include __DIR__.'/bootstrap.php';
$viessmannApi->startOneTimeDhwCharge();
echo "OneTimeCharge is: ".$viessmannApi->isOneTimeDhwCharge();
The same message, when I'm stopping the OneTimeCharge:
Message: Return value of Viessmann\API\ViessmannAPI::stopOneTimeDhwCharge() must be of the type string, null returned Code: 0
Here are details from my heating:
Viessmann Vitodens 300-W B3HB
Viessmann Vitocell 100-W
from viessmann-api.
I think the code in ViessmannAPI should be:
public function isOneTimeDhwCharge(): bool
{
return $this->getEntity(ViessmannFeature::HEATING_DHW_ONETIMECHARGE)->getProperty("active")["value"];
}
public function startOneTimeDhwCharge()
{
$data = "{\"mode\": \"activate\"}";
return $this->setRawJsonData(ViessmannFeature::HEATING_DHW_ONETIMECHARGE, "activate", $data);
}
public function stopOneTimeDhwCharge()
{
$data = "{\"mode\": \"deactivate\"}";
return $this->setRawJsonData(ViessmannFeature::HEATING_DHW_ONETIMECHARGE, "deactivate", $data);
}
But its not tested
from viessmann-api.
from viessmann-api.
Thank you for your great work. Now it works fine.
I took some changes in the example/StartOneTimeCharge.php
Here is my file to start:
<?php
include __DIR__.'/bootstrap.php';
$viessmannApi->startOneTimeDhwCharge();
sleep(1);
echo (int)$viessmannApi->isOneTimeDhwCharge();
I have add the sleep(1);
for waiting a short time, so that the OneTimeCharge at my heating can start. After that waiting I get a response from API that the OneTimeCharge runs or not.
Best regards
from viessmann-api.
from viessmann-api.
Is the startOneTimeDhwCharge() working reliable? I'm not sure what the correct call is. In StartOneTimeCharge.php you call the startOneTimeDhwCharge() twice, whereas @rogrun calls it once, but has a delay of 1s before getting the status? Thanks.
from viessmann-api.
Hello, it is not nessesary to call it twice. In my use case, I call startOneTimeDhwCharge () once and wait a second to query whether it ran successfully.
I start OneTimeCharge in one PHP and query the status in another. This means that the methods are not executed via the cache.
Best regards
from viessmann-api.
Hello. I could also make startOneTimeDhwCharge() working now, but the script always returns 0. Even if I have a delay of 5s, it returns 0.
StartOneTimeCharge.php:
<?php
include __DIR__.'/bootstrap.php';
$viessmannApi->startOneTimeDhwCharge();
sleep(5);
echo (int)$viessmannApi->isOneTimeDhwCharge();
Once I call another script right after startOneTimeDhwCharge() to only get the status of isOneTimeDhwCharge() it is working.
Is there some kind of caching?
StatusOneTimeCharge.php
<?php
include __DIR__.'/bootstrap.php';
echo (int)$viessmannApi->isOneTimeDhwCharge();
from viessmann-api.
Hello, you have to call the request in each single php, because since the API is limited from Viessmann-Server last year, all requests in this API are cached. So this Code will failed:
include DIR.'/bootstrap.php';
$viessmannApi->startOneTimeDhwCharge();
sleep(5);
echo (int)$viessmannApi->isOneTimeDhwCharge();
from viessmann-api.
Related Issues (20)
- isHeatingCompressorsActive() no longer working HOT 5
- Is it possible to read the values of the energy balance? HOT 6
- Action activat et désactivate sur programme externe (external progams).
- API officiel Viessmann HOT 1
- Does setDhwTemperature2() for oneTimeCharge-Temp exist? HOT 1
- Install composer HOT 1
- Issues with new Viessmann API authentication HOT 3
- Unable to get token with 2.0.0 HOT 10
- for information, futures not working in new api for my OPT1 (Vitoconnect 100) but before working fine HOT 12
- getRawJsonData / setRawJsonData don't work with new V api? HOT 5
- The feature getDhwTemperature() is no longer working HOT 4
- from yesterday - Error during authentication process HOT 2
- Consommations électriques et gaz ne remontent plus HOT 18
- Some features broken (?) HOT 8
- Query zigbee devices -> room temp. HOT 9
- PHP Warning: Argument #2 ($key) must be passed by reference,
- $viessmannApi->getHeatingSolarStatistics() not working.
- Invalid REDIRECT_URL in ViessmannOauthClientImpl
- Error installation HOT 2
- Update to Version 2.0 pour novice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viessmann-api.