kiboost / php-devolodhc Goto Github PK
View Code? Open in Web Editor NEWphp API providing control over Devolo Home Control
License: MIT License
php API providing control over Devolo Home Control
License: MIT License
So first of all thanks for your great API. I use it because the Devolo Home Control is not supporting all my cases and your API gives me the chance to integrate the non Devolo devices into other HA systems.
Currently I have an issue - I think it is related to Devolo Home Control itself but I wanted to ask you if you maybe have an idea or a solution with your API.
I included a Qubino relay 1D flush switch which works perfect ... until:
When I reset the device attach a temperature sensor and include it again (after I excluded it correctly) devolo sets the device up gives me a switch and shows the temperature - so everything right but if I change the switch state either with your API or with the Devolo Home Control the relay is not switch either On nor Off.
The Device data are as follows:
<pre>Device:<br>{ "result": { "items": [ { "UID": "hdm:ZWave:EADFD80F\/31", "objectClass": [ "com.devolo.fi.widget.DeviceWidget", "com.devolo.fi.widget.BaseWidget", "com.devolo.fi.widget.Widget", "com.devolo.fi.async.base.AsyncFunctionalItem", "com.prosyst.mbs.services.fim.FunctionalItem" ], "attributes": [], "properties": { "isOwn": true, "operationStatus": null, "wrongDevicePaired": false, "deviceModelUID": "devolo.model.Unknown:Device", "settingUIDs": [ "gds.hdm:ZWave:EADFD80F\/31" ], "isSecurelyIncluded": false, "statisticsUID": "st.hdm:ZWave:EADFD80F\/31", "icon": "icon_32", "description": null, "prodID": "0x0053", "prodTypeID": "0x0002", "secureInclusionCode": 0, "itemName": "Toranlage", "pendingOperations": null, "zone": "Werkstatt\/Garage", "elementUIDs": [ "devolo.BinarySwitch:hdm:ZWave:EADFD80F\/31#1", "devolo.MultiLevelSensor:hdm:ZWave:EADFD80F\/31#2" ], "manID": "0x0159", "zoneId": "hz_2", "batteryLow": false, "status": 2, "batteryLevel": -1 }, "tags": [] } ] }, "id": 5, "jsonrpc": "2.0" }</pre><br><pre>elementUIDs:<br>{ "result": { "items": [ { "UID": "devolo.BinarySwitch:hdm:ZWave:EADFD80F\/31#1", "objectClass": [ "com.devolo.fi.control.BinarySwitchFI", "com.devolo.fi.widget.WidgetElement", "com.devolo.fi.async.base.AsyncFunctionalItem", "com.prosyst.mbs.services.fim.FunctionalItem" ], "attributes": [], "properties": { "guiEnabled": true, "itemId": null, "operationStatus": { "requestID": "180", "name": "turnOn", "functionalItemUID": "devolo.BinarySwitch:hdm:ZWave:EADFD80F\/31#1", "status": 2, "timestamp": 1505893899514 }, "pendingOperations": null, "switchType": "normal", "targetState": 1, "state": 1, "type": 1, "widgetUID": "hdm:ZWave:EADFD80F\/31" }, "tags": [] }, { "UID": "devolo.MultiLevelSensor:hdm:ZWave:EADFD80F\/31#2", "objectClass": [ "com.devolo.fi.label.MultiLevelSensorFI", "com.devolo.fi.widget.WidgetElement", "com.prosyst.mbs.services.fim.FunctionalItem" ], "attributes": [], "properties": { "guiEnabled": true, "itemId": null, "sensorType": "temperature", "type": 2, "value": 12.9, "widgetUID": "hdm:ZWave:EADFD80F\/31" }, "tags": [] } ] }, "id": 6, "jsonrpc": "2.0" }</pre><br><pre>settingUIDs:<br>{ "result": { "items": [ { "UID": "gds.hdm:ZWave:EADFD80F\/31", "objectClass": [ "com.devolo.fi.setting.GeneralDeviceSettings", "com.devolo.fi.setting.DeviceSetting", "com.prosyst.mbs.services.fim.FunctionalItem" ], "attributes": [], "properties": { "settings": { "eventsEnabled": true, "name": "Toranlage", "icon": "icon_32", "zoneID": "hz_2" }, "itemId": null }, "tags": [] } ] }, "id": 7, "jsonrpc": "2.0"
So my you have an idea or possibility, otherwise I have to detach the sensor. Many thanks in advance.
Hi KiboOst,
just tried to figure out, how i can use your code.
Have installed an apache-server on a raspi.
php : PHP Version 5.4.45-0+deb7u8
curl: 7.26.0
got the code into phpDevoloAPI.php on the server
Startet this code
##############################################
<?php
echo "Test<br>";
require('inc/phpDevoloAPI.php');
//DHC login details
$login = "[email protected]";
$password = "MyDHCPassword";
$DHC = new DevoloDHC($login, $password);
if (isset($DHC->error)) echo $DHC->error;
//get some infos on your Devolo Home Control box:
echo "__infos__<br>";
$infos = $DHC->getInfos();
echo "<pre>".json_encode($infos['result'], JSON_PRETTY_PRINT)."</pre><br>";
?>
##########################################################
and got this answer:
Testzugriff
Couldn't find Devolo gateway.infos
null
I have some devices which are from different vendors.
When I query them I get debugging output that tells me to mail that to you.
I tried to do so, but the email address seems to be wrong.
Could you verifiy?
Thanks
Hi KiboOst,
First of all; Great work on this class! I saw that you made a version 2.0 with a new function 'turnRuleOnOff', that is fantastic! However, if I output the result form that function i get:
$result = $DHC->turnRuleOnOff($alarm_rulename, 0);
print_r($result);
//RESULT IS:
cURL error: Illegal characters found in URL
The Rule is however disabled....? How do I return a correct status?
Kind Regards,
Sander
Couldn't find a way to contact you directly, hopefully it's not a problem to post an issue about this.
Is it possible to port this to NodeJS? I've been trying, but no success in authorizing (cookies are messing up the stuff).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.