fuTelldus - PHP application for sensor-logging

Moderator: Telldus

dico
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by dico »

crazy wrote:@dico aka 'fuTelldus'-founder :)
I have integrated some minor changes based on your great fuTelldus which might be useful for the community. Because it seems to me that it is not possible to send you a private message, could you please provide me your eMail-address or tell me who of the 4-FU-guys you are? :) I'd like to contact you with further information.
I don't like to publish my mail open in the forum, as I don't want crawlers to spam me :-p But you will find my mailaddress in the readme.txt file.
My forum-settings says Yes to all activity from other users, so that's weird. Maybe we have to be friends?:-)

I have published fuTelldus @ Github - https://github.com/dico/fuTelldus. But as this is my first open source project, I haven't used Github for my own projects before.
Shouldn't it be possible for others to contribute in github?
Baltta
Posts: 10
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Baltta »

Hey,

Thank you for information how to install fu telldus. I install it yesterday. But I can't get any information my sensors. Where I put my telldus live USERNAME and PASSWORD. And I create own user in fu telldus and I destroy admin user. Do i have to create admin user again. And how can i do it. What data i have to fill in user /settings tab.

Terv. Baltta
dico
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by dico »

Baltta wrote:Hey,
Thank you for information how to install fu telldus. I install it yesterday. But I can't get any information my sensors. Where I put my telldus live USERNAME and PASSWORD. And I create own user in fu telldus and I destroy admin user. Do i have to create admin user again. And how can i do it. What data i have to fill in user /settings tab.
Terv. Baltta
You should only have to enter the telldus keys in the userprofile to get data. You also have to set monitoring to your sensors, if you got the list of the sensors itself. Have you entered the API keys from your Telldus-user into your fuTelldus profile?

EDIT: I just found a bug that that only allowed you to enter keys for the current logged in user. That means that you have to be logged in as the user to enter the keys. This bug will be fixed in the next version.
GoffyOne
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by GoffyOne »

do I have to have the public telldus key for the public page to work?

If I only have my private key and go to the public page it does say "No keys for Telldus has been added... Keys can be added under your userprofile." this only happens when going directly to the public page.
if I log in first and then use the popup menu to go to the public page then it shows the temperature even though there is a problem with the icons as talked about earlier on this forum.

would it be possible to have the public page having the garfs as well ?
dico
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by dico »

GoffyOne wrote:do I have to have the public telldus key for the public page to work?

If I only have my private key and go to the public page it does say "No keys for Telldus has been added... Keys can be added under your userprofile." this only happens when going directly to the public page.
if I log in first and then use the popup menu to go to the public page then it shows the temperature even though there is a problem with the icons as talked about earlier on this forum.

would it be possible to have the public page having the garfs as well ?
The public telldus key (and all the API keys) are only needed to pull data from Telldus.

How do you open the public page directly?
It should display the same data regardless of how you open it. I don't think the "No keys..." message should be included in the public page at all... (have to look at my code later)..

I looked at the icons, and they should be correct in version 3. They are displayed correctly in all my setups (Virtual box Ubuntu server, Synology box and third-party host).
You could check the image path here https://github.com/dico/fuTelldus/blob/ ... inpage.php (line 104) and compare it to your downloaded version.

The public page already have grafs/charts.. I will probably change them from RGraphs to highcharts in the next upcoming version.
GoffyOne
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by GoffyOne »

dico wrote:
GoffyOne wrote:do I have to have the public telldus key for the public page to work?

If I only have my private key and go to the public page it does say "No keys for Telldus has been added... Keys can be added under your userprofile." this only happens when going directly to the public page.
if I log in first and then use the popup menu to go to the public page then it shows the temperature even though there is a problem with the icons as talked about earlier on this forum.

would it be possible to have the public page having the garfs as well ?
The public telldus key (and all the API keys) are only needed to pull data from Telldus.

How do you open the public page directly?
It should display the same data regardless of how you open it. I don't think the "No keys..." message should be included in the public page at all... (have to look at my code later)..

I looked at the icons, and they should be correct in version 3. They are displayed correctly in all my setups (Virtual box Ubuntu server, Synology box and third-party host).
You could check the image path here https://github.com/dico/fuTelldus/blob/ ... inpage.php (line 104) and compare it to your downloaded version.

The public page already have grafs/charts.. I will probably change them from RGraphs to highcharts in the next upcoming version.
I get to the public page by clicking the link at the login screen. you can try it out, when I log in everything works.
http://84.55.70.36/fuTelldus/public/

I might try to reinstall it perhaps I didn't used the latest ver.

something strange also happened during last night the logging interval changed from 5 min to 10 min. se graph showing every step during that time. will check the CRON when I get home can´t do it from work :(
graf
graf
graf.jpg (19.89 KiB) Viewed 32327 times
GoffyOne
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by GoffyOne »

GoffyOne wrote:
dico wrote:
GoffyOne wrote:do I have to have the public telldus key for the public page to work?

If I only have my private key and go to the public page it does say "No keys for Telldus has been added... Keys can be added under your userprofile." this only happens when going directly to the public page.
if I log in first and then use the popup menu to go to the public page then it shows the temperature even though there is a problem with the icons as talked about earlier on this forum.

would it be possible to have the public page having the garfs as well ?
The public telldus key (and all the API keys) are only needed to pull data from Telldus.

How do you open the public page directly?
It should display the same data regardless of how you open it. I don't think the "No keys..." message should be included in the public page at all... (have to look at my code later)..

I looked at the icons, and they should be correct in version 3. They are displayed correctly in all my setups (Virtual box Ubuntu server, Synology box and third-party host).
You could check the image path here https://github.com/dico/fuTelldus/blob/ ... inpage.php (line 104) and compare it to your downloaded version.

The public page already have grafs/charts.. I will probably change them from RGraphs to highcharts in the next upcoming version.
I get to the public page by clicking the link at the login screen. you can try it out, when I log in everything works.
http://84.55.70.36/fuTelldus/public/

I might try to reinstall it perhaps I didn't used the latest ver.

something strange also happened during last night the logging interval changed from 5 min to 10 min. se graph showing every step during that time. will check the CRON when I get home can´t do it from work :(
graf.jpg
Been looking at mine problems and have run the public index.php in a php editor and I get the following error

Warning: require(../lib/base.inc.php): failed to open stream: No such file or directory in \\LITTLEHELPER\WEB\fuTelldus\public\index.php on line 2
Fatal error: require(): Failed opening required '../lib/base.inc.php' (include_path='.;C:\php5\pear') in \\LITTLEHELPER\WEB\fuTelldus\public\index.php on line 2

seams like the ../ dosen´t actually go back up to the previous folder. I am runing it on a synology btw. is there somewhere I should be adding include_path to futellus? I Have extremely little coding knowledge.

and the slower update might be because the tellink ended up another api server that has slower update, read about something like that on the forums.
dico
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by dico »

Hmm... there is something spooky going on inside the Synology-box :-)
If the includepath is set to /volume1/web/fuTelldus/, the synologybox will threat the inside of the public-folder as it's in the root-folder. That means when the includescript and mainpage is included to preview data for the public, it would pull it from the root - and not the public folder.

A quick fix for this is to set include_path (again) in index.php (in public folder), to overwrite any earlier ini_set for the include path.
If you have added ini_set('include_path... in base.inc.php or config.inc.php you would have to paste the new include path below this line require("../lib/base.inc.php");.

So try copy and paste this (check the path!) in public/index.php on line 3 or 4:

Code: Select all

ini_set('include_path', '/volume1/web/fuTelldus/public');

I will experiment and read some more about php, include and paths :-)
GoffyOne
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by GoffyOne »

dico wrote:Hmm... there is something spooky going on inside the Synology-box :-)
If the includepath is set to /volume1/web/fuTelldus/, the synologybox will threat the inside of the public-folder as it's in the root-folder. That means when the includescript and mainpage is included to preview data for the public, it would pull it from the root - and not the public folder.

A quick fix for this is to set include_path (again) in index.php (in public folder), to overwrite any earlier ini_set for the include path.
If you have added ini_set('include_path... in base.inc.php or config.inc.php you would have to paste the new include path below this line require("../lib/base.inc.php");.

So try copy and paste this (check the path!) in public/index.php on line 3 or 4:

Code: Select all

ini_set('include_path', '/volume1/web/fuTelldus/public');

I will experiment and read some more about php, include and paths :-)

Unfortunately don´t work. :(
dico
Posts: 40
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by dico »

GoffyOne wrote:Unfortunately don´t work. :(
It worked on my setup on my Synology NAS. Are you sure the path are correct? Have you added the ini_set('include_pat... beneath the require("../lib/base.inc...?

The most correct way to fix this would probably be to add the include path in the php.ini, but that is also a more advanced solution if your not that familiar with PHP.
GoffyOne
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by GoffyOne »

dico wrote:
GoffyOne wrote:Unfortunately don´t work. :(
It worked on my setup on my Synology NAS. Are you sure the path are correct? Have you added the ini_set('include_pat... beneath the require("../lib/base.inc...?

The most correct way to fix this would probably be to add the include path in the php.ini, but that is also a more advanced solution if your not that familiar with PHP.
I tried it again and it works now, must have done something wrong the first time.
thanks
stre
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Cron

Post by stre »

Hi, I have some trouble with the cron job. Apparently the job is ok to run via the test from the webpage, but when the job is started via cron the checks will not work. I have put log-code into the scripts so I know that the cron-job is running and going through the script, but its not activating or de-activating even if the conditions are right. Has anyone had similar problems? I'm running the fu-Telldus via the service provider Binero and they scheduled a job to activate the cron php-pages.
stre
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

The cron-problem...

Post by stre »

I got this error message when I run the script through cron: OAuth Verification Failed: Can't verify request, missing oauth_consumer_key or oauth_token

When I run it "manually" through the browser it works ok... anyone got a clue?!
stre
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: The cron-problem...

Post by stre »

I hard-coded the API keys in the cron-script, then got it to work so it has to be something wrong when the script is getting the API-keys from the database.
crazy
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by crazy »

With which User is the cron-Job running? And, did you configured the application Base-dir in the config-php-file?
Post Reply