Hinweis auf Cookies und der Datenschutzgrundverordnung
LiebeR BesucherIN. Beim Betreten unserer Webseite werden Cookies gespeichert. Diese Cookies beinhalten deine IP-Adresse zur besseren Verwendung unserer Seite und Services. Bei registrierten UserInnen werden ebenso die IP-Adresse, sowie eine Session-ID gespeichert. Eure bekanntgegebenen Daten werden ausschließlich auf österreichischen Servern bei World4You gespeichert, dies betrifft insbesondere Benutzername, e-Mail-Adresse und IP-Adresse, welche personenbezogen sind. Die Daten werden nicht für Werbung oder anderwärtige Kommerzielle Dinge verwendet, ebenso werden diese Daten auch nicht an Dritte weiter gegeben. Bitte beachte auch unsere Nutzungsbedingungen und Datenschutzrichtlinie. Solltest du damit nicht einverstanden sein, verlasse bitte unsere Seite. Hinweis aufgrund der DSGVO. Euer SHC-Team!

php Devolo Home Control API

DIY Lösungen mit Raspberry PI, FHEM usw. Präsentiere uns deine Eigen-Kreation.

Moderator: Moderatoren

Benutzeravatar
KiboOst
Smart-Routinier
Smart-Routinier
Beiträge: 191
Registriert: Sa 11. Mär 2017, 14:56
Spezialgebiet: DHC / Development

Re: php Devolo Home Control API

Beitragvon KiboOst » Di 21. Mär 2017, 12:58

If anyone have some Hue and want to try, I would be curious if it works.
I haven't Hue so I can't test, but running https://github.com/KiboOst/php-devoloDH ... upport.php should give enough infos.

If someone has qubino or fibaro relays, would be fun to test too.



Benutzeravatar
spleijers
Smart-Nerd
Smart-Nerd
Beiträge: 30
Registriert: Di 22. Mär 2016, 16:54
Spezialgebiet: IT

Re: php Devolo Home Control API

Beitragvon spleijers » Mi 22. Mär 2017, 16:34

devolo.zip
Attached is some small demo files of how I am using the API right now, might be useful for others....

devolo_alarm_check.php:
I use this as a GPS geofencing alarm system. With IFTTT on my phone, I call this script if I am home. And so does my girlfriend. If someone is at home; the alarm turns of.

manager/devolo_alarm_manage_users.php:
small management script to manage users in the geofencing/ devolo_alarm_check.php system database.

devolo_api.php:
Used to directly access the api via GET urls like: http://<IP/URL-from-your-webserver>/devolo_api.php?action=turnGroupOnOff&name=NAME&value=1

devolo_esp.php:
Used for a ESP8266 board to fetch Infrared codes and convert them to API actions.

samsungremote.php:
Control a Samsung TV via your DHC...

yamahareciever.php:
Control a Yamaha via your DHC...

Oh, no warranties or what-so-ever on these scripts. I'm not a professional coder. Bugs are almost guaranteed! :lol:
Zuletzt geändert von spleijers am Mi 22. Mär 2017, 16:56, insgesamt 2-mal geändert.

Benutzeravatar
KiboOst
Smart-Routinier
Smart-Routinier
Beiträge: 191
Registriert: Sa 11. Mär 2017, 14:56
Spezialgebiet: DHC / Development

Re: php Devolo Home Control API

Beitragvon KiboOst » Mi 22. Mär 2017, 16:52

WoW :shock:

Amazing work dude, really nice seeing it used, it show how can Devolo HC be extended with such API ;)
Just prove how important APIs are today, even just for a few adavanced users 8-)

Thanks for sharing, nice to see the hard work isn't just for myself :lol:

Benutzeravatar
KiboOst
Smart-Routinier
Smart-Routinier
Beiträge: 191
Registriert: Sa 11. Mär 2017, 14:56
Spezialgebiet: DHC / Development

Re: php Devolo Home Control API

Beitragvon KiboOst » Mi 22. Mär 2017, 18:39

Hi,

yes the Devolo dash board is nice but on a tablet with that amount of sensors etc. the icons are to big and some times with informtation I do not need. I don't want to scrool whole pages to find the information I need. Thats why I need a smaller version.

For example just a wall plug icon which turns green or red depending on the state, not the whole Devolo big blue version.

Nevertheless Devolo dash board is much better than other ones of course.
Hi,
If you want to make heavy polling, I have made a class extending the API to directly connect locally to the central. So you wouldn't do any request to Devolo server, once you have your Devolo central uuid and passkey.
Let me know if you need it, I may post it on github with some readme about it.

It would also provide old login method in case Devolo change their online authentication.

Benutzeravatar
darki
Smart-Routinier
Smart-Routinier
Beiträge: 165
Registriert: So 20. Nov 2016, 22:25
Spezialgebiet: -kA-

Re: php Devolo Home Control API

Beitragvon darki » Mi 22. Mär 2017, 21:12

If you can post it on guthub without to much effort it would be very nice. I would try some things and I guess if I can stay local with my requests it should be a bit faster.

My aim would be to use your APi together with Bootstrap to build some kind of dashboard.

Where can I get my UUID and the passkey?
devolo_alarm_check.php:
I use this as a GPS geofencing alarm system. With IFTTT on my phone, I call this script if I am home. And so does my girlfriend. If someone is at home; the alarm turns of.
Great idea - I would like to use some kind of script like that to control the heatings depending on if someone is at home or not

Benutzeravatar
KiboOst
Smart-Routinier
Smart-Routinier
Beiträge: 191
Registriert: Sa 11. Mär 2017, 14:56
Spezialgebiet: DHC / Development

Re: php Devolo Home Control API

Beitragvon KiboOst » Do 23. Mär 2017, 08:57

Here you are:
https://github.com/KiboOst/php-devoloDH ... Connection

Also get the last API v2.21!

;)

Benutzeravatar
darki
Smart-Routinier
Smart-Routinier
Beiträge: 165
Registriert: So 20. Nov 2016, 22:25
Spezialgebiet: -kA-

Re: php Devolo Home Control API

Beitragvon darki » Do 23. Mär 2017, 09:14

Great thanks! I will give it a try and hopefully be able to use the local connection :)

Benutzeravatar
darki
Smart-Routinier
Smart-Routinier
Beiträge: 165
Registriert: So 20. Nov 2016, 22:25
Spezialgebiet: -kA-

Re: php Devolo Home Control API

Beitragvon darki » Do 23. Mär 2017, 09:43

Works great, thank you!

I changed one number in the passkey and got an error message so I guess I'am really using the local connection :)

Benutzeravatar
KiboOst
Smart-Routinier
Smart-Routinier
Beiträge: 191
Registriert: Sa 11. Mär 2017, 14:56
Spezialgebiet: DHC / Development

Re: php Devolo Home Control API

Beitragvon KiboOst » Do 23. Mär 2017, 09:47

Yes, if you start it with false as last argument, it won't even try normal connection.

If you provide true, it will use normal login. But in case it fail, it then try local connection. This can be a fail check and alternative login if Devolo decide to change authentication on their website.

Benutzeravatar
darki
Smart-Routinier
Smart-Routinier
Beiträge: 165
Registriert: So 20. Nov 2016, 22:25
Spezialgebiet: -kA-

Re: php Devolo Home Control API

Beitragvon darki » Do 23. Mär 2017, 10:56

I'm a bit lost now :( I tried every array function I now but can't get the correct result.

How do I get one exact value for a device - for example the value "totalValue" from a binary switch?


Zurück zu „DIY - Do It Yourself“



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast