You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
Describe the bug:
After setting up macos-ifttt-control I learned that while my IFTTT applets were writing commands to my mac's hash, the commands weren't being executed. After digging into the code I found the daemon and tried invoking it:
I noticed that there's a recent update to this program in which configuration files were moved. I did some testing with service.php and sure enough when I pointed to the correct path for the configuration file my macos hash file was correctly read and the program works. Here's the changes I made to get services.php and the functionality I needed to work:
I've forked and updated the service.php, update.php, and triggers.php files with the changes. Feel free to accept/reject them. I only tested services.php though the changes for the other files are similar.
To Reproduce:
Download v1.1.4
Configure Dropbox, macOS IFTTT Control, and create an IFTTT applet with the dropbox action
Trigger said applet
Ensure that the file in your macOS hash is appended with the correctly formatted string for macOS IFTTT Control and that the "action" is not carried out by macOS IFTTT Control
Expected behavior:
Applet actions should be carried out after command is successfully received on the macOS host running the service.php daemon.
Screenshots:
Same as above:
System Information:
macOS Version: Mojave 10.14.3
macOS IFTTT Version: 1.1.4
Involved Applet (link to IFTTT): The one I was using before/after macOS IFTTT Control began working:
Additional context
I read over the codebase, and I'm not a seasoned PHP dev, but I did attempt to understand how this works. I noticed that the config files in were copied to the new path in the index.html (/Applications/macOSIFTTTControl.app/Contents/Resources/app/index.html), but that service.php, update.php, and triggers.php seem to not be configured to point at these new locations, hence the filenotfound error. As to if you're having the same issue I'm not sure. Love this app! I'm using it in a google routine when I'm leaving to shut everything off. Time saver ⏲🙌
The text was updated successfully, but these errors were encountered:
codycodes
changed the title
service.php not looking for configuration in new location
php scripts not looking for configuration in new location
Jun 10, 2019
Thanks @codycodes! I was able to reproduce the error, and your pull request works as expected. I will merge the pull request to the dev branch and release an update with the fix soon.
Describe the bug:
After setting up macos-ifttt-control I learned that while my IFTTT applets were writing commands to my mac's hash, the commands weren't being executed. After digging into the code I found the daemon and tried invoking it:
I noticed that there's a recent update to this program in which configuration files were moved. I did some testing with
service.php
and sure enough when I pointed to the correct path for the configuration file my macos hash file was correctly read and the program works. Here's the changes I made to getservices.php
and the functionality I needed to work:$config = file_get_contents(APPDIR . 'assets' . DS . 'json' . DS . 'config.json');
changed to:
$config = file_get_contents($_SERVER['HOME'] . DS . '.mic_config.json');
and
$webhooks = @file_get_contents(APPDIR . 'assets' . DS . 'json' . DS . 'events.json');
changed to:
$webhooks = @file_get_contents(APPDIR . 'assets' . DS . 'json' . DS . 'events.json');
I've forked and updated the
service.php
,update.php
, andtriggers.php
files with the changes. Feel free to accept/reject them. I only testedservices.php
though the changes for the other files are similar.To Reproduce:
Expected behavior:
Applet actions should be carried out after command is successfully received on the macOS host running the
service.php
daemon.Screenshots:
Same as above:
System Information:
Additional context
I read over the codebase, and I'm not a seasoned PHP dev, but I did attempt to understand how this works. I noticed that the config files in were copied to the new path in the
index.html
(/Applications/macOSIFTTTControl.app/Contents/Resources/app/index.html), but thatservice.php
,update.php
, andtriggers.php
seem to not be configured to point at these new locations, hence the filenotfound error. As to if you're having the same issue I'm not sure. Love this app! I'm using it in a google routine when I'm leaving to shut everything off. Time saver ⏲🙌The text was updated successfully, but these errors were encountered: