Giter Club home page Giter Club logo

Comments (14)

thetrueavatar avatar thetrueavatar commented on July 19, 2024

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

Hi Claude,
If I try to run the modified bootstrap.php - I get following error message:

PHP Notice: Undefined offset: 2 in /etc/openhab2/scripts/viessmann/bootstrap.php on line 13
PHP Notice: Undefined offset: 3 in /etc/openhab2/scripts/viessmann/bootstrap.php on line 14
Message: syntax error, unexpected '?'
Code: 0

Still I don't know where to find gatewayID & installationID
Thanks for your help
Georg

from viessmann-api.

thetrueavatar avatar thetrueavatar commented on July 19, 2024

from viessmann-api.

JueBag avatar JueBag commented on July 19, 2024

Getting the IDs is working like a charm!

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

I was using 1.4.0-SNAPSHOT.
I tried to get Installation Information with GetInstallationInformation.php. using 1.3.1.phar:

Message: Call to undefined method Viessmann\API\ViessmannAPI::getInstallationId()
Code: 0
I don't find 1.3.2.phar only the source code.
Thanks for help
Georg

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

Getting the IDs is working like a charm!

Which version of the API are you using?

from viessmann-api.

thetrueavatar avatar thetrueavatar commented on July 19, 2024

1.3.2 is now available. I had to do a small fix before. Please notre I haave swapped gatewayId and installationId order. credentials.properties should contain:

  • username
  • password
  • installationId
  • gatewayId

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

Thanks!
my bootstrap.php is like this

`include 'phar://' . DIR . '/Viessmann-Api-1.3.2.phar/index.php';

$credentials = file(DIR . "/credentials.properties");
$params = [
"user" => trim("$credentials[0]"),
"pwd" => trim("$credentials[1]"),
// "installationId" =>trim("$credentials[2]"),
// "gatewayId" =>trim("$credentials[3]"),
// "deviceId" => "0",
// "circuitId" => "0"
];`

my GetinstallationInformation.php is:

<?php include __DIR__.'/bootstrap.php'; echo "InstallationId: ".$viessmannApi->getInstallationId()."\n"; echo "GatewayId: ".$viessmannApi->getGatewayId();

now I get following error message:

Message: syntax error, unexpected '?'
Code: 0

Any idea what is wrong?
Thanks Georg

from viessmann-api.

thetrueavatar avatar thetrueavatar commented on July 19, 2024

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

Hi,
i have upgraded to

php -v
PHP 7.1.20-1+b2 (cli) (built: Aug 3 2018 03:45:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.20-1+b2, Copyright (c) 1999-2018, by Zend Technologies

if I call GetinstallationInformation.php following error message:

PHP Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 48
PHP Notice: Use of undefined constant CURLOPT_URL - assumed 'CURLOPT_URL' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 72
PHP Notice: Use of undefined constant CURLOPT_HTTPHEADER - assumed 'CURLOPT_HTTPHEADER' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 73
PHP Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 74
PHP Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 75
PHP Notice: Use of undefined constant CURLOPT_USERPWD - assumed 'CURLOPT_USERPWD' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 76
PHP Notice: Use of undefined constant CURLOPT_HTTPAUTH - assumed 'CURLOPT_HTTPAUTH' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 77
PHP Notice: Use of undefined constant CURLAUTH_BASIC - assumed 'CURLAUTH_BASIC' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 77
PHP Notice: Use of undefined constant CURLOPT_POST - assumed 'CURLOPT_POST' in phar:///etc/openhab2/scripts/viessmann/Viessmann-Api-1.3.2.phar/src/Oauth/ViessmannOauthClientImpl.php on line 78
Message: Call to undefined function Viessmann\Oauth\curl_init()
Code: 0

Sorry, but I have no idea how to solve this problem.
Georg

from viessmann-api.

thetrueavatar avatar thetrueavatar commented on July 19, 2024

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

Sorry - I have upgraded to php7.1-curl now it seems to work.
Which version are you proposing 1.3.2. or 1.4.0-SNAPSHOT?
Thanks Georg

from viessmann-api.

thetrueavatar avatar thetrueavatar commented on July 19, 2024

from viessmann-api.

JungeG avatar JungeG commented on July 19, 2024

Thanks Claude,
I will stay on 1.3.2. until you recommend to upgrade.
Georg

from viessmann-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.