thetrueavatar / Viessmann-Api

Api pour récupérer les infos de chaudière exposées par le service Viessmannn
GNU General Public License v2.0
78 stars 37 forks source link

Want to read value from heating.primaryCircuit.sensors.temperature.return, #37

Closed thiborg closed 4 years ago

thiborg commented 4 years ago

Hello,

i'm a complete noob to php. I'm missing the primaryReturnTemperature within the features.

So i've copied and modified the ViesmannAPI.php

ViessmannFeature::HEATING_PRIMARYCIRCUIT_SENSORS_TEMPERATURE_SUPPLY to ViessmannFeature::HEATING_PRIMARYCIRCUIT_SENSORS_TEMPERATURE_RETURN

I've added the feature in the ViessmannFeature.php as well.

I've not compiled anything, just modified the php files. When I try to call then function I get:

@Message: Call to undefined method Viessmann\API\ViessmannAPI::getHeatingPrimaryCircuitTemperatureReturn()

what point i'm missing? thanks for your help Thorsten

thetrueavatar commented 4 years ago

You have to rebuild the phar which is a kind of zip file containing all php file. In the root directory php -d phar.readonly=0 phar-builder.phar package -n composer.json

thetrueavatar commented 4 years ago

If you have to test and retry you may use bootstrap-dev.php instead of bootstrap.php which will use php file from src instead of php files from the phar.