fuTelldus - PHP application for sensor-logging

Moderator: Telldus

csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

I've updated the script and modified it a bit.

1. Added so you can see history of devices.
2. Added so you can see more sensor info if you click on the specified sensor on sensor page.
3. Added support for notification on device changed state.
4. Added support for push notifications where you before only could get E-mail notifications.

If anyone are interested in testing my modifications please email me so I can set you up with a username/password and I'll also provide you with the site-url.

email: p o s t m a s t e r @ m o l l t o r p . n u

/B.R. Pär
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

csom wrote:I've updated the script and modified it a bit.

1. Added so you can see history of devices.
2. Added so you can see more sensor info if you click on the specified sensor on sensor page.
3. Added support for notification on device changed state.
4. Added support for push notifications where you before only could get E-mail notifications.

If anyone are interested in testing my modifications please email me so I can set you up with a username/password and I'll also provide you with the site-url.

email: p o s t m a s t e r @ m o l l t o r p . n u

/B.R. Pär
Hi,

would be very interested to test it! Any chance you'd consider posting it to the Git page: https://github.com/dico/fuTelldus? :)
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

My plan is to release the modification to the public in the future eventually.

But for now I would like for as many users as possible to test it out and evaluate it so I can fix problems that shows up
and make it a bit more stable and add more functions on feedback basis.

So If anybody is up to it and test it just email me.

/BR Pär
Rubbytomas
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Rubbytomas »

I cant get this to work on my raspberry pi.
On the synology nas there was no problem.
But I want it to work on my pi as well.
I am a newbie on the raspberry so I wonder if someone could make a detailed step by step installation guide for the raspberry pi? I would be so grateful...

edit:
I've got phpmyadmin working and I can access my phpmyadmin's webpage (192.168.1.75/phpmyadmin) and I've created the futelldus database in phpmyadmin but I cant access 192.168.1.75/futelldus.
Futelldus folder is located in /var/www/

Got it working...

//Tomas THN
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

I've now uploaded my new mod of fuTelldus to GitHub.
It's still in the test-phase.

the new mod is available on: https://github.com/csom/fuTelldus

please contribute with tips and new functions you'd like and issues you stumble upon.

Modifications from dicos initial release.
-----------------------------------------------------------------------------------------------------------------------------------------------------
1.Theme/design changes.
2.More info on each sensor by clicking sensor table-row on sensors page.
3.Ability to use combined highcharts instead of rGraph (choose in user-settings).
4.List Telldus Events/Schedules and ability to activate/deactivate.
5.Show device history by clicking table-row on device-page.
6.Set alerts on device change state (schedule page).
7.Option to get push-alerts on schedules (uses PushOver and Curl "Server needs to have Curl for PHP installed").
8.Ignore and UnIgnore Telldus sensors under settings/sensors page, posibility to delete unwanted sensor from database.
9.Public page-chart uses highcharts instead of rGraph.
10.Log users last activity (activate on general settings-page).
11.Mobile-device webapp login-link on user settings-page (needed to autologin on Iphones webapp).
12.Minor bugfixes from initial release.


/BR Pär.
Tony
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Tony »

Hi

I cant se sensors or devices with the new version, i have the Token and Token secret keys from Telldus.
I am using the same server as the old version, what could be wrong?

I am very new to Telldus and server management.

/Tony
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

Have you updated your database with the new sql script?

Have you installed HTTP and OAuth and Net?

I don't know what could be wrong, I haven't changed anything regarding how the devices and sensors is added to the database.

Do you get some error logs?

/Pär
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

csom wrote:I've now uploaded my new mod of fuTelldus to GitHub.
It's still in the test-phase.

the new mod is available on: https://github.com/csom/fuTelldus

please contribute with tips and new functions you'd like and issues you stumble upon.

/BR Pär.
Works nicely, thanks! I noted that the api returns dummy hour / minute for some of the schedules in schedule/joblist. I made a ticket about that to Telldus so let's see about the answer...:)

It would be a nice feature to sort the schedules list the same way as on the web ui (by name) but I guess the xml object cannot be sorted in any easy way? Need to test next the PushOver feature for device state...
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

Nautilus wrote:I noted that the api returns dummy hour / minute for some of the schedules in schedule/joblist.
Ok, the answer was that if type is "sunrise" / "sunset" it will not have any meaningful values in "hour" or "minute". In case it is active schedule, the next run time tells the correct (next) run time and if inactive I guess it would need to be left zero...
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

Nautilus wrote: Works nicely, thanks! I noted that the api returns dummy hour / minute for some of the schedules in schedule/joblist. I made a ticket about that to Telldus so let's see about the answer...:)

It would be a nice feature to sort the schedules list the same way as on the web ui (by name) but I guess the xml object cannot be sorted in any easy way? Need to test next the PushOver feature for device state...
I appreciate the feedback.
It's possible to sort the list by id/name/days. Now the list is sorted by the next job scheduled to run on the top and chronological order ascending.

Ok, regarding the dummy time presented to you I haven't got any so I can't fill you in on that subject.

Please return with your thoughts on Push-service when you have had any time to test it.
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

csom wrote:It's possible to sort the list by id/name/days. Now the list is sorted by the next job scheduled to run on the top and chronological order ascending..
Does the api return the list in this order or where does the sorting happen?

I guess I need to build some condition that if type = sunset / sunrise and schedule = inactive, then time = 0:00. And perhaps it is simpler to take the time from the next run date than from the hour/minute (as in any case this will give false info for sunset/sunrise type of schedules, even the active ones).
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

Nautilus wrote: Does the api return the list in this order or where does the sorting happen?
Yes the API returns the result in that order so my script doesn't do any type of sorting to the result.
Nautilus wrote: I guess I need to build some condition that if type = sunset / sunrise and schedule = inactive, then time = 0:00. And perhaps it is simpler to take the time from the next run date than from the hour/minute (as in any case this will give false info for sunset/sunrise type of schedules, even the active ones).
Yes, it's possible to build an if statement to rule out sunrise controlled schedules. And as you say it could be more efiicient to use the nextRunTime attribute.

I'll look into it and try it out.
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

csom wrote: I'll look into it and try it out.
I've updated the event-page and it's now uploaded on gitHub.

It now shows the next time the schedules suppose to run instead of planned hour:minute.
Tony
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Tony »

csom wrote:Have you updated your database with the new sql script?

Have you installed HTTP and OAuth and Net?

I don't know what could be wrong, I haven't changed anything regarding how the devices and sensors is added to the database.

Do you get some error logs?

/Pär
I have managed to get the old version running without the sensor logging unfortunately(45 years since last update) but I can se some info if i click on the senors like temp and humidity.
Any idea what I am doing wrong?
The lights list works.

What would be the best way of upgrading to your modified version?

Sorry for all the questions, I have tried to resinstall the old version for a couple of hours and getting nowhere with the logging.

/Tony
csom
Posts: 20
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by csom »

Tony wrote:
I have managed to get the old version running without the sensor logging unfortunately(45 years since last update) but I can se some info if i click on the senors like temp and humidity.
Any idea what I am doing wrong?
The lights list works.

What would be the best way of upgrading to your modified version?

Sorry for all the questions, I have tried to resinstall the old version for a couple of hours and getting nowhere with the logging.

/Tony
If I understand you right the sensors_table in the database shows your sensors? and the device table shows your devices?
But your sensors_log table does not get the results from cron_temp_log.php script, right?

The best way to upgrade would be to make a new database if you don't want to erase your current one and run fuTelldus_csom.sql to import all the necessary info.
Simply start from scratch and import all the files from my gitHub source.

and then just put in your database info in config.inc.php and then login.
Post Reply