Giter Club home page Giter Club logo

easer's Introduction

Easer Build Status weblate codecov Download
matrix-chat Backers on Open Collective

Get it on F-Droid

See README.en.md for the English version.

注意:由於近期(2020下半年起)時間所限,Easer的維護速度會受到影響。不過由於程序主要框架已經穩定,除了增加對Event和Condition的遠程插件的支持(以及長期計劃中對多機器自動化互聯的支持)外,Easer的核心結構應當不會進行顯著修改(不過擴充功能仍不免需要進行一定修改)。有興趣者可以查看下面的相關章節,理解如何爲Easer添加你需要的功能,或者如何定位錯誤。作者會儘量抽時間看PR,然後先發佈的beta版本測試,隨後發佈正式版本。

簡介

Easer是一个讓智能手機更爲智能更爲自動化的軟件,能夠告訴手機在什麼情況下該做什麼事。Easer不僅可以處理事件,也可以檢查狀態,還能組合事件形成複雜的自定義事件。

如要查看對Easer功能完整的介紹,請參見網站

本文主要描述Easer的開發相關事宜。

擴展Easer

給Easer添加功能主要分爲三類:機制、技能以及遠程技能(插件)。

其中機制是Easer的核心部分,需要對Easer代碼有較好理解;也歡迎對現有代碼進行優化(但不要過度優化)。 對於多數情況下,所要做的是增加新Event、Condition和Operation,這通過增加新的技能或遠程技能(插件)實現。

技能

增加技能插件需要添加自己的Event、Condition或Operation至Easer代碼中的commons包下。有腳本以簡化該操作,並且現有插件均可作爲示例。

詳細請參見這個頁面

遠程技能(插件)

遠程技能是v0.7開始新增的功能,旨在通過獨立的軟件擴展Easer的功能。每個遠程技能是一個獨立的app;理論上也可以在一個app中包含多個遠程技能。注意該功能較新,接口暫不穩定(但應該不會大改)。

暫時遠程技能僅有Operation,該倉庫是一個示例。本倉庫中diagram目錄下有相關文件,比如其時序圖

支持Easer

協助翻譯

Easer的翻譯工作託管在Hosted Weblate。它是weblate(一個FLOSS的在線翻譯貢獻平臺)的官方託管實例。

十分歡迎有志者幫助翻譯工作,聚沙成塔集腋成裘。 如無特別說明,翻譯文本將使用CC-0協議,這意味着它們會進入公有領域;如果希望使用其他協議,請事先聯繫我們。

另請注意,由於Easer作者的個人偏好,中文主體取傳統漢字作爲模字,不取大陸所爲簡化字也不取臺灣所爲正體字。凡涉及翻譯自外文等情況導致地區用語不一致時,模字以大陸版爲主。(計劃後續加入基於OpenCC的自動轉換,擬通過CI達成,只是暫時無此精力。歡迎有經驗或有興趣者協助。)

提出、評論以及解決issue

如果在使用Easer時發現了什麼問題,你可以提出一個issue。在可行的情況下(當然,這不是強制的),相關信息給得越多越好,以便更早定位問題所在。
如果你覺得Easer應當添加某些功能,你也可以提出一個issue。

對於現有的issue,無論你有相同的問題(或想法)、你可以提供更多信息、或是你不認同其中的說法,請對其進行評論。十分歡迎對問題進行討論。 其中較需要多方意見的issue被標爲RFC,歡迎任何人的意見/建議。

如有興趣參與更多但不知道從何下手,可以查看被標爲GFC (Good For Contributors) L0L1L2 的issue。一般而言,它們都是目的較爲清晰、涉及組件較少的issue;L0、L1、L2是我個人主觀按難度遞增順序進行的劃分。

在某些情況下(如果你是一個開發者),你也許具有解決某些issue的能力。你可以fork本倉庫,編寫代碼,然後創建pull request。這樣,如果你的代碼的確解決了其問題,則你的代碼會進入主幹,他人均會受益於你的貢獻(並且你會被列在Contributors列表中)。
同樣歡迎對非現有issue創建pull request,但建議首先創建一個issue來描述你將要進行的工作(使得其他人意識到此事)。

測試覆蓋

測試實是重要。 而Easer目前遠不及過分測試的程度——事實上,多數代碼並沒有相應的自動測試。

如願意幫助貢獻測試代碼——尤其是對於核心部分(包括UI、數據後端以及服務)的測試——這裏實在感激不盡。

捐助

如果您願意給Easer的開發提供任何額度的捐助,請參看DONATE.md

感謝任何額度的支持。

鳴謝

協助者

Easer的開發離不開社區的幫助及捐贈。十分感謝各位。

詳細列表請見Contributor文檔。

第三方

版權協議

Copyright (c) 2016 - 2019 Rui Zhao (renyuneyun) [email protected]

除非額外說明,程序代碼以GPLv3+協議分發(參見LICENSE)

utils/目錄下工具以Apache 2.0協議分發(參見utils/LICENSE

爲何使用GPL?

Easer的期望功能中包含大量對隱私信息(比如位置信息、日曆信息)的捕捉,而且擁有對網絡的訪問能力。我們永遠不會希望一個本該方便生活的工具變成對自己生活的監視工具,所以必須儘可能保證該腐化不會發生。其唯一方法就是確保Easer的各個部分都允許任何人覈查,即保證Easer(及如果存在的衍生軟件)爲開源軟件。
而由於設計中Easer的各個功能(在將來)會變爲模塊/插件,因而也需要保證這些模塊/插件不會成爲潛在的黑手,故而希望依靠GPL的特性(鏈接軟件也需要爲GPL)來強制這一點。

事實上,強制各衍生/擴展品爲GPL並不必要,因爲只需要它們開源即可。但GPL是(我)目前所知的唯一可以保證衍生/擴展品爲開源軟件的協議,所以選擇它。

easer's People

Contributors

ahohnmyc avatar akcansoft avatar atalanttore avatar coderbm1 avatar comradekingu avatar fipwmaqzufheoxq92ebc avatar gabriellluz avatar hvdwolf avatar idealist1508 avatar jakubfabijan avatar louies0623 avatar mattiasmun avatar mikachu2333 avatar mingun avatar mvn23 avatar namhyeonjeong avatar naofum avatar pjammo avatar renyuneyun avatar rezaalmanda avatar santossi avatar sr093906 avatar subhamjena avatar superrnovae avatar twikedk avatar unbiaseduser avatar verytastytomato avatar weblate avatar wellinkstein avatar wtuemura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easer's Issues

How does this work?

Hi,

I have created a profile with bluetooth on and maximum brightness. Then I created an event, selected the profilem checked the clock button and entered a time. When this time has come, nothing happend. Outline was running. Did I miss something?

Unable to import events/profiles

I exported on 0.47 (fdroid version) and tried to import on the latest (0.52 from github), however the file picker won't let me select the exported zip file. This is on Android 8.1.

This screenshot shows that the exports from Easer are not selectable:

screenshot_20180113-192100

Add ability to run ordered actions in a profile

This request is to add the ability to add multiple actions to an event. For example I have this scenario where I have a profile to run an action (play music) when I connect to certain Bluetooth devices. In other IFTTT apps, I've had to add a pause event before sending the play intent for it to work reliably with my devices.

easer doesn't start on boot

Using the latest version on f-droid as of this report, 0.3.5, easer doesn't start on boot despite enabling the option in settings to do so. I experienced this issue a few times after rebooting my device and meeting certain conditions that should have triggered an action in easer (e.g. connected to wifi AP --> do some action). If I manually launch easer, then suddenly the event triggers.

add event and profile parameter about access point activation

Please add an option "Activation/Deactivation of the the Access point functionality"

  • in the event configuration
  • in the profile confguration
    If I understand well how Easer works, it would permit to :
  1. deactivate the access point functionality of my smartphone if the battery is discharging
  2. activate the access point functionality of my smartphone if the battery is charging

I would also interested by an option that permits to put my smartphone in airplane mode if it is discharging to save the battery.

last version not in the f-droid repos

In #32, it seems that the last version of Easer is v0.3.7.
The version on f-droid is 0.3.6.1.
There is a problem in the automatic process or it is not an automatic process ;-)

By the way, is there a "release notes" place for Easer? Very useful to see the evolution of this app.

version of the app in the app

Please add the version of the app somewhere (in the About menu for example)

You could also give the website addtess of the code.

Enable/disable lockscreen when f.ex. "trusted WiFi" is connected

It would be nice, if the lockscreen could be disabled, after it got manually unlocked once while connected to a known and registered WiFi and reenabled when this WiFi is left.

To add some Security by Obscurity the MAC of an AP or sth. like that could be checked.

Instead of relying on the SSID, Easer could query a URL on the local network, only reachable from within that network, whenever the trusted WiFi is active and verify that a pre-shared key can be downloaded or something like that so that it's not that trivial to trick the phone into unlocking.

Crash on every launch

I have just installed versioin 0.3.5 and it crashes on every launch, never even got to see the main screen.
Running android 4.4.4

Unintuitive UI behaviour on configuration change

Hello, congratulation for your work.

The unintuitive behaviour can be reproduced as follows:

  • open the drawer
  • tap on either "Profile" or "Event"
  • rotate the screen

After these steps, the "Outline" interface is shown but the user would expect the application to still show the previously chosen interface.
Keep in mind that screen rotation is just one of the several configuration changes that can produce this behaviour, such as a phone call

Add support for NFC tag events

It would be great to have an event that triggers when NFC tags are scanned, for example to activate car mode when entering the car.

easer doesn't start on boot

I'm not able to re-open #25, but this is still an issue for me on Android 8. I see the 'start on boot' permission is listed for Easer in Android, but after a boot the app does not start. I have to manually launch it and select 'start' before it is active and responding to events.

Latest updates to Easer are not posted on F-Droid

@renyuneyun I'm assuming you are the one responsible for 'maintaining' Easer on F-droid, do you know what's up? I know the F-droid system was having issues with building apps, which led to several days of no updates for any apps being posted, but that seems to be resolved now as other apps I have installed through F-droid are now receiving updates.

App controls unresponsive for 'event' and 'scenario'

To reproduce this:

  1. tap the + to add a new event or scenario (does not matter which) under the appropriate section in the app

  2. swipe the swipe view control thing at the bottom left or right

After doing the above steps, the radio buttons and text fields presented when editing a new or existing event or scenario do not always react to finger taps. The buttons at the top (the 'X', 'save' and 'menu') do not work at all.

Strangely enough, I can still swipe the swipe view thing.

When this occurs, the phone's back button also does not function.

There was nothing interesting in the easer log, but here are the contents just in case (after I tapped around a bit in a new event)

1516846746524,2018.01.24 18:19:06.524,ASSERT,PRETTY_LOGGER,======Easer started======
1516846746856,2018.01.24 18:19:06.856,DEBUG,PRETTY_LOGGER,Permission for plugin <cell location> not satisfied
1516846749524,2018.01.24 18:19:09.524,VERBOSE,PRETTY_LOGGER,item: Scenario
1516846749539,2018.01.24 18:19:09.539,VERBOSE,PRETTY_LOGGER,All profiles: []
1516846749541,2018.01.24 18:19:09.541,DEBUG,PRETTY_LOGGER,reloadList()
1516846749542,2018.01.24 18:19:09.542,VERBOSE,PRETTY_LOGGER,All profiles: []
1516846750396,2018.01.24 18:19:10.396,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846750445,2018.01.24 18:19:10.445,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846750446,2018.01.24 18:19:10.446,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846750448,2018.01.24 18:19:10.448,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846750505,2018.01.24 18:19:10.505,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846750506,2018.01.24 18:19:10.506,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846750511,2018.01.24 18:19:10.511,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846750527,2018.01.24 18:19:10.527,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846750528,2018.01.24 18:19:10.528,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846754487,2018.01.24 18:19:14.487,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846754499,2018.01.24 18:19:14.499,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846754499,2018.01.24 18:19:14.499,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846754501,2018.01.24 18:19:14.501,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846755561,2018.01.24 18:19:15.561,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846755682,2018.01.24 18:19:15.682,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846755802,2018.01.24 18:19:15.802,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846755919,2018.01.24 18:19:15.919,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846755964,2018.01.24 18:19:15.964,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846755975,2018.01.24 18:19:15.975,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846755978,2018.01.24 18:19:15.978,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 0
1516846756045,2018.01.24 18:19:16.045,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846756163,2018.01.24 18:19:16.163,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846756273,2018.01.24 18:19:16.273,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846756392,2018.01.24 18:19:16.392,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1
1516846756506,2018.01.24 18:19:16.506,DEBUG,PRETTY_LOGGER,[FillDataJob] tick on 1

Fix translations

Building the latest releases errors with following information:

:app:processReleaseResourceswarning: string 'myGithub' has no default translation.
warning: string 'myWebsite' has no default translation.


:app:generateReleaseSources
:app:incrementalReleaseJavaCompilationSafeguard
:app:javaPreCompileRelease
:app:compileReleaseJavaWithJavac
:app:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:4: Error: "title_activity_main" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="title_activity_main">MainActivity</string>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:8: Error: "title_application" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="title_application">App</string>
            ~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:23: Error: "null_content" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="null_content">NULL CONTENT</string>
            ~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:25: Error: "navigation_drawer_open" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="navigation_drawer_open">Open navigation drawer</string>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:26: Error: "navigation_drawer_close" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="navigation_drawer_close">Close navigation drawer</string>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:45: Error: "liscence_stringa" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="liscence_stringa">This program is free software: you can redistribute it and/or modify
            ~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:50: Error: "liscence_stringb" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="liscence_stringb">This program is distributed in the hope that it will be useful,
            ~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:55: Error: "liscence_stringc" is not translated in "zh" (Chinese) [MissingTranslation]
    <string name="liscence_stringc">You should have received a copy of the GNU General Public License
            ~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values/strings.xml:63: Error: "operation_ringer_mode" is not translated in "ja" (Japanese) [MissingTranslation]
    <string name="operation_ringer_mode">Ringer Mode</string>
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "MissingTranslation":
   If an application has more than one locale, then all the strings declared
   in one language should also be translated in all other languages.

   If the string should not be translated, you can add the attribute
   translatable="false" on the <string> element, or you can define all your
   non-translatable strings in a resource file called donottranslate.xml. Or,
   you can ignore the issue with a tools:ignore="MissingTranslation"
   attribute.

   By default this detector allows regions of a language to just provide a
   subset of the strings and fall back to the standard language strings. You
   can require all regions to provide a full translation by setting the
   environment variable ANDROID_LINT_COMPLETE_REGIONS.

   You can tell lint (and other tools) which language is the default language
   in your res/values/ folder by specifying tools:locale="languageCode" for
   the root <resources> element in your resource file. (The tools prefix
   refers to the namespace declaration http://schemas.android.com/tools.)

/home/vagrant/build/ryey.easer/app/src/main/res/values-ja/strings.xml:57: Error: The resource string "myGithub" has been marked as translatable="false" [ExtraTranslation]
    <string name="myGithub">https://github.com/renyuneyun/Easer</string>
            ~~~~~~~~~~~~~~~
/home/vagrant/build/ryey.easer/app/src/main/res/values-ja/strings.xml:59: Error: The resource string "myWebsite" has been marked as translatable="false" [ExtraTranslation]
    <string name="myWebsite">http://renyuneyun.is-programmer.com/</string>
            ~~~~~~~~~~~~~~~~

   Explanation for issues of type "ExtraTranslation":
   If a string appears in a specific language translation file, but there is
   no corresponding string in the default locale, then this string is probably
   unused. (It's technically possible that your application is only intended
   to run in a specific locale, but it's still a good idea to provide a
   fallback.).

   Note that these strings can lead to crashes if the string is looked up on
   any locale not providing a translation, so it's important to clean them
   up.

11 errors, 0 warnings
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.

I work around that locally by ignoring MissingTranslation and ExtraTranslation errors like echo -e "android { lintOptions { disable 'MissingTranslation'\n\ndisable 'ExtraTranslation' }}" >> app/build.gradle, but this should in fact be handled in upstream.

Crash when entering text in Cell Location field

I want to enable/disable data roaming, (or just data) when entering/leaving a country, I live near the frontier to 2 other countries, for one I get no data roaming charges at all but for the other I get very very expensive charges for data roaming, so I tried to use the Cell Location field putting there the country code, or the phone company name, the result is a crash when saving the event.

logcat-crash-Cell-Location.txt

Note that the above logcat is for when entering letters in the cell location field, if instead I enter digits and the entered number is 1234 the crash tells about Array Index Out of Bounds.

What is the accepted format for the Cell Location and where to find the right values?

Add a event for "under operation"

Allow easer to trigger an event when the phone gets/stops getting used. Maybe the simples idea would be to check for a locked screen.
E.g. disable WIFI and mobile data completely, as long as I am not using the phone.

Better expressivity of events

I'm planning to change Events to real events (i.e. from some states to some states) so the expression is more natural and also acts as a first step towards #19 (whichever Easer will eventually embrace that style or not).

However I'm stuck on several questions:

  1. How to handle chained events? How to check the status of them? Check from the beginning or use cached event status (and add expiration for each real event)?
  2. Should a "satisfied" event be able to be re-checked immediately?

Any suggestions or discussions are welcome.

NFC tag not working

This is a known problem that when defining an event listening to NFC tag, that won't work.

This is because Android only dispatches NFC events to Activity but not to custom BroadcastReceiver registered programmically from a Service.

This will be fixed in v0.5.2.

Add option for detecting headphone plug/unplug events

Since the media play/pause is implemented, having a way to trigger on headphone plug/unplug would be great! Some media players don't have an option for automatically playing when headphones are inserted, or maybe I would want to set a different ringer mode when headphones are unplugged.. etc.

Events do not trigger unless 'refresh' is pressed

Android version: 7.1
Device: Nexus 5x
Easer version: 0.3.3 (from f-droid)

I have created a super simple way to reproduce this behavior:

  1. Add a profile that enabled bluetooth (and nothing else)

  2. Add an event that triggers on "Battery Status" -> Is Charging

  3. Plug in device to power so that it is charging.

Expected behavior: Easer enables bluetooth

Actual behavior: Nothing happens. If I load Easer and hit the 'refresh' floating button, then it triggers and enables bluetooth. I have tried the following and the behavior does not change:

  • Waiting several minutes for it to trigger
  • Enabling permission for Easer to set system settings
  • Disabled battery optimization for Easer

None of those actions resolve this issue.

I have tried monitoring logcat to see if anything useful is printed, but logcat is super noisy when this chain of events if happening. If there's a specific tag/filter I can apply to logcat to show only messages from Easer, then please let me know what that is so I can (hopefully) collect useful information for you!

This may be an unrelated issue, but if I leave the device plugged in/charging, and disable bluetooth and hit the 'refresh' button in Easer again, then Easer will re-enable bluetooth. This seems to happen every single time I hit refresh, even though the 'charging' state never changes (i.e. it is always charging)

Migrate the mechanism of listening events to monitor style

During the development and by reading the issues (feature requests), I find that there seem to be needs to listen for multiple instances of the each event (e.g. DateEventPlugin) and/or make decisions by the dynamic of some events (e.g. #14); by using Easer myself, I find sometimes several Events will need to have the same data but with different types and/or different parents, e.g. tell whether I just entered home or left home by using CellLocationEventPlugin.

Therefore, I'm thinking of migrating the current (rather simple) way of listening to events to a more powerful and (in principle) more battery-friendly style: monitor. However, this idea is still quite primitive, so I'd welcome people to talk about it.

If using the monitor style, the change to Easer will be like this:

  • Split Event into two parts: Condition and Link (names to be decided)
    • Condition is a single EventPlugin with data
    • Link contains the situation whether a Condition is satisfied or not, and the action to take (i.e. which Profile to load) for satisfied or unsatisfied
  • A (or several) Service(s) (which acts as monitor) keep(s) listening for different EventPlugins, and check(s) which Link should be changed to satisfied or unsatisfied, and load(s) corresponding Profile

Then the user logic will be:

  • User defines Profile
  • User defines Condition
  • User defines Link by linking a Profile and a Condition

The benefits of changing to this way include:

  1. More battery friendly (because there will be fewer Listeners).
  2. Better logic expressivity because (in reality) conditions could be combined (into the tree struture, for example) but taking action is not.
  3. User could reuse Conditions on different Links. For example, the user can define a "Home" Condition (e.g. according to location) and use it in two different Links (one for "entering home" and the other for "leaving home"). Thus, when the user needs to modify the "definition" of "Home", he/she only needs to edit it once and the modification would be applied everywhere.

So, to achieve these, my current problems are:

  1. Will this make users harder to use (because although spliting an event into condition and satisfied or not is intuitive for programmers, it may not be that intuitive for other people)?
  2. Where to place EventType? In Condition or in Link? (My current thought is to place in Condition and keep Link only contains satisfied/true and unsatisfied/false, but not yet quite sure.)
  3. How should events be chained?
    3.1. Should the existing "parent" field be put into each Condition or each Link? (If Link is only boolean, I'd prefer to place into Condition.)
    3.2. How to enable the possible future extention to allow a graph structure of events rather than simply trees? Example use case of graph structure could be: check if time is after 9:00 when [is charging] or [battery level is high], and then turn on WiFi.
  4. I'm not quite sure the Service way of implementing monitor is the best option or not. Are ther any other options?

Any suggestions or simply talks are welcome (whether they are from a programmer perspective or a normal user perspective) :)

Add log functionality to aid with debugging

This is a feature request to add logging functionality to the app to log events & debug info to aid with debugging. Ideally the log should be accessible in-app, and at the very least is should be written to disk or have an option to output to disk so that it can be included in bug reports.

Right now, when issues are encountered, it is very difficult to determine if 1) the user didn't set something up correctly, or 2) if it's actually a bug in Easer.

Add option for 'events' to be based on actual events, and not continuous behavior

The way that 'events' are implemented now seems to result in an event triggering quite regularly even if there were no change in the state that the event is 'monitoring'. Let me explain with an example:

I create an event that runs some profile based on 'battery status: is NOT charging'. The profile that runs turns off bluetooth. Now, if my device is not charging and I manually turn on bluetooth, easer will turn it off after some amount of time. Instead, the event should only run once (e.g. power cord disconnected and no longer charging) and not execute continuously while 'not charging'.

This would allow users to temporarily override Easer behavior without having to outright disable/stop Easer (which means Easer is now unavailable to process other, new events that might happen).

Another example is a profile that enables 'vibrate' ringer mode when connected to a specific wifi network (the event). I may want to enable a different ringer mode on this network (e.g. 'do not disturb') at one point, but Easer will revert my manual config change to 'vibrate mode'.

Ideally, an event would happen once (e.g. 'device is now connected to wifi network X' or 'charging cable has been unplugged and now device is not charging), and the associated profile with the event would be run once. Users could then temporarily override it if necessary.

Please let me know if you need any more clarification about what I am asking for. I have a long history of using IFTTT apps on Android (llama, tasker, automagic), and what I am describing has been the way that all of the ones I have used have all behaved :)

Crash on every launch

I have just installed versioin 0.3.5 and it crashes on every launch, never even got to see the main screen.
Running android 4.4.4

Easer claims not to have all permissions.

When I want to add a profile that changes the "Ringer Mode", a dialog opens which shows that I have granted access to " notifications". I press back, but no entry is added to the profile.

Several profiles didn't always update correctly

I try almost all profile options on two different phones with two different versions of Android.

Conclusion:

  • The Outline page does not update always in the same manner.
  • The effectiveness of the different options is not always the same too.

The test is made with Battery is or is not discharging event.
Each profile selects only one option on/off or normal/silent sound or manual/auto brightnesse
Battery is charging -> select profile with option on
Battery is discharging -> select profile with option off
Then I put the power on/off several times, waiting between both. I tried to activate/desactivate the functionality by the parameters of the phone if Easer didn't works correctly to see what works (on or off).
I had several crashes during the tests but I didn't succeed to identify the conditions to predict them.

Results of the test below.

  • With Samsung Galaxy Note 2, Android 5.1.1, CM 12.1
    bluetooth: everything works fine
    auto rotation: everything works fine
    hotspot: everything works fine
    ring: almost ok but the option silent activate "only priority rings", not real silent mode.
    data on: page updated, but doesn't put data on
    data off: page not updated, doesn't put data off
    wifi on: page updated, but doesn't put wifi on
    wifi off: page not updated, doesn't put data off
    brightness auto when discharging: page updated but do nothing on brightness
    brightness manual when charging: not updated and do nothing on brightness

  • With Samsung S4, Android 6.0.1, LineageOS 13.0
    bluetooth: everything works fine
    ring: almost ok but the option silent activate "only priority rings", not real silent mode.
    wifi: page updated, but doesn't activate nor desactivate wifi
    hotspot off: page updated but doesn't desactivate hotspot
    hotspot on: page not updated and doesn't activate hotspot
    data on: page updated, but doesn't put data on
    data off: page not updated, doesn't put data off
    auto rotation on or off: crash Easer
    brightness auto when discharging: page updated but do nothing on brightness
    brightness manual when charging: page not updated and do nothing on brightness

Alright, I hope that this tests will be helpful for this already promising app! ;-)

implement timer event

I'd like to make a keepalive for a bluetooth device, therefore i need something to trigger after an event, that will countdown, then trigger another event, or a profile.
maybe there's a cmd line that would do it, then send a broadcast?

Operation: set preferred network type

I would like to automatically set the preferred network type to "gsm only" when I am in a specific Wifi in order to reduce battery drainage due to low network signal.
Moreover I would like to change the preferred network type back to "GSM/WCDMA" as soon as I am NOT in that Wifi anymore, but I guess this would be possible when #5 is done.

Thank you for your work!

Crash on every open

Every time I created more than 2 profiles and 2 events, the app crashes. If I clear the app data and the cache manually now, I can start it until I created the profiles and events. I only used WiFi and time in the events if this help you.

Events with periodisity

Hi. I would really like to be able to toggle my WiFi every 10 minutes. The current way of doing that would to be to create a lot of events for every 10 minutes over the day.

Could you add an option to run an event every X minutes?

[FR] Couple with huginn

Just an idea: It would be nice to let huginn play together with easer. Hugin is a server side IFTTT clone. It could provide additional triggers or receive events from the phone. Also the actions (aka profiles in easer) could be coordinated.

About page fix.

Thanks for the app!

I would like to help by filling in the about page.
The idea would be to add links to your github, website and the license as well as a brief app description. I plan to use strings so it is translatable. My hope is also to make it look aesthetically pleasing.

I will work on it and do a pull request.

Add profile alarm and event from notification

First, I want to thank you for this project. Android needed an open source "Tasker".

A couple of suggestions:

  1. Add a profile that allows to trigger an alarm. I dont know if this can be done through Intent or it needs its own setup.

  2. Event that triggers from notifications. Ideally you can filter the notifications by program that emitted the notification and by content of the notification (f.e. the notification contains certain word)

Consider accepting donations over librepay?

Hi! This app is extremely useful (I've been hoping for a FLOSS IFTTT thing for years..). It looks like you only accept donations via bountysource.com, which is rather unfortunate!

Have you considered a freedom-respecting platform like librepay? quite a few FLOSS projects use this.

Also, for what it's worth, it looks like bountysource.com was just acquired by some buzzwordy blockchain company called Canya.io... I definitely don't want to sign up for bountysource now.

Add support for muting

I would like to make my mobile phone at 9pm quiet. Can you add such a setting for profiles?

FloatingActionButton to add events and profiles

It would be nice to have a FloatingActionButton in the events and in the profiles menu to add events and profiles. This would be much more convenient than having to click on the three dots and choosing "Add".

Adding ESSID with a space in name does not work unless quoted

When adding an ESSID with a space in the name, like 'Super Cool Wifi', does not result in any actions being taken unless the ESSID is surrounded in double quotes. This is unintuitive, and I only discovered it after trying to figure out why events were not triggering when connected/not connected to specific networks.

I suggest implementing this such that the SSID can be entered with spaces, and any quotation is handled by the app.

Ordering of events and Profiles

Currently events and profiles are displayed in the order of their creation. It would be good to show them in a tree instead of a list to show their dependency and also to allow them to be manually reordered.

The tree could use an "&" sign to indicate, that the hierarchy has the meaning of logically and the events to make them fire. (Or did I get this wrong?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.