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 »

Nautilus wrote:
csom wrote: The link to the chart should be right because the file in the inc-folder is called chart.php under the public sub-folder. I assume that it's the public mainpage.php you are referring to, right?
Hi, I was referring to the private mainpage. I thought the link was meant to go the the chart_sensor.php as it contains the "&id=[sensor id]" part and at least in the original setup chart.php shows all charts and not an individual based on the id (but this new chart_sensor.php does it). So I thought that either there is some new include-rule in the chart.php (which I did not notice) or then link should point directly to chart_sensor.php.

mainpage.php (row 114):

Code: Select all

echo "<a href='?page=chart&id=$sensorID'><img style='height:16px;' src='../images/chart_line.png' /> {$lang['View chart']}</a>";
The codeline you are referring to is not present in the private mainpage it's only present in the public page. And the public page's chart is called chart.php so therefor the link is right. And that chart.php requires the "id" set because it's presenting just one sensor and not combined view. It's located under: fuTelldus / public / inc / chart.php
Nautilus wrote: A feature for the scheduler that might be interesting to copy from the "official" event scheduler is the "execute http request to a custom url". So that if device state changes you'd be able to execute a http request (or maybe any script if run from self maintained web server). Unfortunately I don't have an idea how one would go about to implement something like this, so I'm just throwing the idea out there...:)
OK thank's for the idea! I'll look into it and the if I can throw something together. :)
Nautilus wrote: Also, it would be nice if the user could overwrite all the standard notification texts (like the pushTitle and mailMessage / mailSubject) with custom ones. Meaning that the if the custom text exists, it would be used instead of the standard one.
I can look into that one as well.
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

csom wrote: The codeline you are referring to is not present in the private mainpage it's only present in the public page. And the public page's chart is called chart.php so therefor the link is right. And that chart.php requires the "id" set because it's presenting just one sensor and not combined view. It's located under: fuTelldus / public / inc / chart.php
I must have somehow confused the public and private mainpage :)

Well, now I added this type link to each private sensor (though pointing to chart_sensor.php) on mainpage as I thought it is convenient add-on (because of the above mentioned "confusion", I thought this was what you had intended with the private mainpage...)

Alos, sounds great if you'll be able to find some solution to the earlier mentioned items!

By the way, I'd like to be able to open the app to a specific sub-page via this type of "webapp" link, do you think there is some elegant way to do it? I was just thinking about forking something into auth.php but probably there is a better way.
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

Hi,

I was wondering if there is any easy way to enable IFTTT integration through maker channel to manipulate Telldus Live devices - with the help of fuTelldus? Using the "webapp" login I allowed passing "state" and "id" to ajax_light_control.php (in auth.php) and it works in a browser also when not already logged in. i.e. I just get the url: http://server/fuTelldus/ajax_light_cont ... p=XXYYYZZZ -> turns on device XYZ. But when I put this to IFTTT Maker as web request (GET) url it does not work. Any ideas what I'd need to enable in order to get this to work.

I was also thinking about adding a third option on top of email and push notification, a web request to IFTTT maker. Though I guess it is already doable to send an email to IFTTT and execute something like that based on a device state change...
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

Hi,

any idea why even though I change the outgoing mail address in Page settings (and it updated the db table where the config values are read), the sender for notification mails stays as the original one (i.e. before the change)?
goashem
Posts: 5
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: fuTelldus - PHP application for sensor-logging

Post by goashem »

Incoming and outcoming events/messages from and to IFTTT via fuTelldus would be a nice feature indeed! It'd make my life, well, not necessarily easier but definitely much more interesting :D 8) .

EDIT: Installed it on my Raspberry Pi 2. No problems whatsoever. Now my head's full of ideas...
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

goashem wrote:Incoming and outcoming events/messages from and to IFTTT via fuTelldus would be a nice feature indeed! It'd make my life, well, not necessarily easier but definitely much more interesting :D 8) .

EDIT: Installed it on my Raspberry Pi 2. No problems whatsoever. Now my head's full of ideas...
Hi,

I set up a few triggers so that fuTelldus sends a mail (with hashtag) to IFTTT based on device state change or sensor value. This works quite well. But I haven't been able trigger any device actions from IFTTT. Please share if you succeed in this... :) And of course, any new ideas are welcome, I'd like to hear what kind of integrations or tweaks people have managed to pull of with this... :idea:
goashem
Posts: 5
Joined: Fri Mar 17, 2023 9:45 am
Contact:

Re: fuTelldus - PHP application for sensor-logging

Post by goashem »

Nautilus wrote:
goashem wrote:Incoming and outcoming events/messages from and to IFTTT via fuTelldus would be a nice feature indeed! It'd make my life, well, not necessarily easier but definitely much more interesting :D 8) .

EDIT: Installed it on my Raspberry Pi 2. No problems whatsoever. Now my head's full of ideas...
Hi,

I set up a few triggers so that fuTelldus sends a mail (with hashtag) to IFTTT based on device state change or sensor value. This works quite well. But I haven't been able trigger any device actions from IFTTT. Please share if you succeed in this... :) And of course, any new ideas are welcome, I'd like to hear what kind of integrations or tweaks people have managed to pull of with this... :idea:
I'm thinking of the following things:

* Making a Chromecast app that would show the Tellstick Live information on TV. Naturally, this would be a separate software that could use the information in the futelldus_sensors table. Well, it could be done right now - I could just cast the fuTelldus home page to my TV but that would be a lazy man's solution to this "problem" :D.
* Finding out which family members are currently in the house. This would require some regular pinging and static IPs for the phones. Now, the following scenario could happen: Let's say there's three members in the family but none of them are at home (the system doesn't get responses from any of the static IPs ie. any of the phones). In this case, it'd be futile to turn on any lights because nobody's home :D. (Well, unless the system would be in the holiday mode which would tell the possible burglars there are people in the house...)
* Using external date sources as a device or something similar. For example, in the morning I could get the temperature forecast for the afternoon via HTTP. If the evening temperature would be too hot, there could be an event to turn on the air conditioning for some hours.
** That being said, it would be nice to have a functionality to turn on a device for a minute, an hour, two seconds and so on... For things like a corridor lamp when the front door opens.

And yeah, technically speaking, I'm able to send a Maker event to IFTTT. See this: http://developer.telldus.com/ticket/307 In practice, it doesn't work. One of my freezer sensors went crazy yesterday and I had to reboot it. During that rebooting procedure, the temperature of the sensor went above the freezing point. Now, Telldus Live should have triggered an event: 1) sending me a warning email and 2) sending a Maker event to IFTTT. Neither of this things happened. Now I have set some email warnings in fuTelldus as well but naturally, it'd be good if fuTelldus could send and receive IFTTT Maker events :).
Stimo
Posts: 24
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Stimo »

Is still working on synalogy NAS? Is IT worth trying to setup?
Nautilus
Posts: 80
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Nautilus »

Stimo wrote:Is still working on synalogy NAS? Is IT worth trying to setup?
I've been running it on a Qnap NAS for a couple of years now and from my point of view it has been a worthwhile system to setup. At least after adding some more home automation stuff (such as surveillance cameras and energy consumption) to fit in the same layout.

But I guess there are other options as well. For example Domoticz seems to be a nice home automation package with integration to a wide variety of switches / devices / sensors etc. I think that is available for Synology as well. I've integrated the Telldus Live sensors to Domoticz (which I've been running on RPi2 for a few weeks) through MQTT / Node-RED as described a bit here: http://www.telldus.com/forum/viewtopic.php?f=22&t=5494. Though I still also have the fuTelldus running...
Stefantastic
Posts: 5
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Stefantastic »

So I wanted to try futelldus for some sensor logging but I' m pretty much a complete noob when it comes to linux.

But anyway I thought it would be worth a try on an old laptop that got ubuntu installed.
I managed to install apache, mysql and php. I created the databases with fuTelldus_csom.sql.
I changed the mysql info in the config.inc.php and I can log in to http://myIP/futelldus but my sensors isn't showing (I have put in my API keys in settings).
When I try to run the cron_temp_log.php I get

Code: Select all

 PHP Warning:  require_once(HTTP/OAuth/Consumer.php): failed to open stream: No such file or directory in /var/www/fuTelldus/cron_temp_log.php on line 30
PHP Fatal error:  require_once(): Failed opening required 'HTTP/OAuth/Consumer.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/fuTelldus/cron_temp_log.php on line 30 
I thought that I had installed oauth but I'm guessing I've installed the wrong one. How do you get the HTTP/OAuth?
petzno
Posts: 116
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by petzno »

Stefantastic wrote:So I wanted to try futelldus for some sensor logging but I' m pretty much a complete noob when it comes to linux.

But anyway I thought it would be worth a try on an old laptop that got ubuntu installed.
I managed to install apache, mysql and php. I created the databases with fuTelldus_csom.sql.
I changed the mysql info in the config.inc.php and I can log in to http://myIP/futelldus but my sensors isn't showing (I have put in my API keys in settings).
When I try to run the cron_temp_log.php I get

Code: Select all

 PHP Warning:  require_once(HTTP/OAuth/Consumer.php): failed to open stream: No such file or directory in /var/www/fuTelldus/cron_temp_log.php on line 30
PHP Fatal error:  require_once(): Failed opening required 'HTTP/OAuth/Consumer.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/fuTelldus/cron_temp_log.php on line 30 
I thought that I had installed oauth but I'm guessing I've installed the wrong one. How do you get the HTTP/OAuth?
Your path to Oauth is wrong. Look at the first post in this thread, there you will find a link to download Oauth. Copy the folder/files to your server and make sure the path within the files are correct. If I remember correct you can set the path in one of the config files in fuTelldus.
pederU
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by pederU »

After I updated to DSM 6 the cronjob stopped working, but a lot of googling finally gave results. If you change the command-line in the chrontab from:

Code: Select all

/usr/bin/php /volume1/web/futelldus/cron_temp_log.php
/usr/bin/php /volume1/web/futelldus/cron_schedule.php
to:

Code: Select all

php56 /volume1/web/futelldus/cron_temp_log.php
php56 /volume1/web/futelldus/cron_schedule.php
mvee
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by mvee »

Does anyone know where I can find the "PEAR_package_fuTelldus.zip"?
Haugan
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by Haugan »

Hi. My Cronjob stop working since I updated Synology NAS to DSM 6. The solution is posted already (above), but I cant find my way to implement it. Can anyone give me some detailed instructions. I used the guide for futelldus installation to set up the cronjob, but I cant find it any more.

Can anyone help me?

Br Håkan
GoffyOne
Posts: 7
Joined: Fri Mar 17, 2023 9:45 am

Re: fuTelldus - PHP application for sensor-logging

Post by GoffyOne »

Haugan wrote:Hi. My Cronjob stop working since I updated Synology NAS to DSM 6. The solution is posted already (above), but I cant find my way to implement it. Can anyone give me some detailed instructions. I used the guide for futelldus installation to set up the cronjob, but I cant find it any more.

Can anyone help me?

Br Håkan
You have to enable Telnet in Nas if you don´t have it active.
then log in (I use putty) as admin
After that you have to change to root with
Sudo su -

after that you need to edit the crontab file by using
vi //etc/crontab
and change the php to php56 as mentioned before.

ps. not sure if only changing php to php56 is sufficient, I changed from
*/5 * * * * root /usr/bin/php56 /volume1/web/fuTelldus/cron_temp_log.php
to
*/5 * * * * root /volume1/@appstore/PHP5.6/usr/local/bin/php56 /volume1/web/fuTelldus/cron_temp_log.php
Post Reply