[LIVE] Web application with groups of devices
Moderator: Telldus
Re: [LIVE] Web application with groups of devices
Hi,
I'd like to use this with my Qnap web server. I downloaded the .zip file, extracted it into the web directory of Qnap and put my public & private key into common.php (i.e. replaced 'YOUR_KEY' 'YOUR_SECRET_KEY' with public & private key I got from http://api.telldus.com/keys/index). Should this be enough to see something when accessing the page? Because for me Firefox gives a blank page and IE gives HTTP 500 Internal Server Error. phpMyAdmin and such work ok so I don't think there's a problem with the server...
Could you point me to what I should do next to get started?
I'd like to use this with my Qnap web server. I downloaded the .zip file, extracted it into the web directory of Qnap and put my public & private key into common.php (i.e. replaced 'YOUR_KEY' 'YOUR_SECRET_KEY' with public & private key I got from http://api.telldus.com/keys/index). Should this be enough to see something when accessing the page? Because for me Firefox gives a blank page and IE gives HTTP 500 Internal Server Error. phpMyAdmin and such work ok so I don't think there's a problem with the server...
Could you point me to what I should do next to get started?
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: [LIVE] Web application with groups of devices
Try enabling error_reporting and display_error in your php-installation so you get an error message.
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
Re: [LIVE] Web application with groups of devices
Thanks for the tip, here's the output after adding those:micke.prag wrote:Try enabling error_reporting and display_error in your php-installation so you get an error message.
Code: Select all
Warning: require_once(HTTP/OAuth/Consumer.php) [function.require-once]: failed to open stream: No such file or directory in /share/MD0_DATA/Web/telldus-groups/common.php on line 5
Fatal error: require_once() [function.require]: Failed opening required 'HTTP/OAuth/Consumer.php' (include_path='.:/etc/config/php') in /share/MD0_DATA/Web/telldus-groups/common.php on line 5
Thanks!
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: [LIVE] Web application with groups of devices
If you look a the documentation, this package (PEAR::HTTP_OAuth) is written as a requirement.
http://pear.php.net/package/HTTP_OAuth/
http://pear.php.net/package/HTTP_OAuth/
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
Re: [LIVE] Web application with groups of devices
I eventually got it working (it was maybe a bit more complicated with the Qnap OS) but then lost my interest a little bit as it provided basically the same functionality as the standard page (which shows devices in alphabetic order and thus can made to resembles the group approach almost 1:1) and I lack the skills to develop it further Nonetheless, great work Manticus and I'm sure it serves your purpose very well!micke.prag wrote:If you look a the documentation, this package (PEAR::HTTP_OAuth) is written as a requirement.
http://pear.php.net/package/HTTP_OAuth/
What I was hoping to do was to utilize this somehow to allow also Harmony universal remote control my lights through HTPC (running perhaps Eventghost or similar). Only way I've come up with to do it would be through executing a url but I have not been able to figure out if that is possible with the php script. Do you think there's any possibility for this - or is there some 3rd party application which would allow this with Telldus Live?
By the way, I thought that with telldus-groups I would be able to also control (on/off) all devices within the same group with one click. However, this does not seem to be a function at the moment? Could you Manticus consider adding this kind of functionality? I tried to play around with it a little bit but with no prior php experience I did not get very far...
Re: [LIVE] Web application with groups of devices
Thank you Manticus for your classes. Great job and very usefull.
Re: [LIVE] Web application with groups of devices
You'r welcome
sorry for time to reply, I'm back on telldus !
sorry for time to reply, I'm back on telldus !
Re: [LIVE] Web application with groups of devices
I downloaded the package and have it running on my web site.
Could someone give me a hint how to hardcode my keys and tokens into the application to avoid to have to logon to telldus servers?
Could someone give me a hint how to hardcode my keys and tokens into the application to avoid to have to logon to telldus servers?
Re: [LIVE] Web application with groups of devices
search in my other topic :
http://www.telldus.com/forum/viewtopic.php?f=11&t=1981
( with crontab and 3 lines in the index.php )
http://www.telldus.com/forum/viewtopic.php?f=11&t=1981
( with crontab and 3 lines in the index.php )
Re: [LIVE] Web application with groups of devices
I still didn't really get what to add in index.php. Got myself confused with session ID's etc.
I have earlier wrapped together (copycat coding) a simple .php file that extracts all parameters for a sensor. I did this by putting in all the keys into the .php, no need for session ID.
The full script can be seen in thread http://www.telldus.com/forum/viewtopic. ... 174#p14244
Could I do the same with your code, just enter the relevant keys in index.php or common.php?
I have earlier wrapped together (copycat coding) a simple .php file that extracts all parameters for a sensor. I did this by putting in all the keys into the .php, no need for session ID.
The full script can be seen in thread http://www.telldus.com/forum/viewtopic. ... 174#p14244
Could I do the same with your code, just enter the relevant keys in index.php or common.php?
Code: Select all
// Keys for demo user from http://api.telldus.com/keys/showToken
define('PUBLIC_KEY', 'FEHUVEW84RAFR5SP22RABURUPHAFRUNU');
define('PRIVATE_KEY', 'ZUXEVEGA9USTAZEWRETHAQUBUR69U6EF');
define('TOKEN', '0af6933e26366c308117c191784fb48e04eab090c');
define('TOKEN_SECRET', '6f206a2e194af3d4c3dc36e749edbd52');
Re: [LIVE] Web application with groups of devices
@Nautilus!
Could you help me with solution for HTTP_OAuth on Qnap. Got it working with ipkg install php-pear and then wget http://pear.php.net/go-pear.phar
and php go-pear.phar. But it make changes i dont feel comfortable with. And after restart of NAS its all gone. (power loss in the snow storm)
How did you solve it?
(I got it running, saving data in mysql and nice output in google chart but now I lost the OAuth and want to do it right this time.)
Thnx
Could you help me with solution for HTTP_OAuth on Qnap. Got it working with ipkg install php-pear and then wget http://pear.php.net/go-pear.phar
and php go-pear.phar. But it make changes i dont feel comfortable with. And after restart of NAS its all gone. (power loss in the snow storm)
How did you solve it?
(I got it running, saving data in mysql and nice output in google chart but now I lost the OAuth and want to do it right this time.)
Thnx
Tellstick.net, Qnap TS212 for collecting data and generate webchart.
Re: [LIVE] Web application with groups of devices
Hi,Pasque wrote:@Nautilus!
Could you help me with solution for HTTP_OAuth on Qnap. Got it working with ipkg install php-pear and then wget http://pear.php.net/go-pear.phar
and php go-pear.phar. But it make changes i dont feel comfortable with. And after restart of NAS its all gone. (power loss in the snow storm)
How did you solve it?
(I got it running, saving data in mysql and nice output in google chart but now I lost the OAuth and want to do it right this time.)
Thnx
I have TS-259 Pro II which I think is a little bit different from the HW viewpoint as TS-212, therefore the same procedure might not work. And unfortunately I don't have any clear guide in any case as I just pretty much did with trial and error without documenting any steps, sorry
Re: [LIVE] Web application with groups of devices
Did you get the widget working? I'm looking for this for my windows 7 when im working on my computer
Re: [LIVE] Web application with groups of devices
Hi, sorry I'm on windows 8 so no widget on desktop in this os ...
I'm working only on the android app (DomoSpeak) and in this time I don't have the time to continue to add features on it
I'm working only on the android app (DomoSpeak) and in this time I don't have the time to continue to add features on it