maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [SFOS] [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone (https://talk.maemo.org/showthread.php?t=93424)

Sfiet_Konstantin 2014-07-08 17:38

[WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Hi everybody,

After some discussions on TJC and some brainstorm, I'm proud to introduce phonebot, a scheduling daemon that takes inspiration from profilematic, IFTTT and on{X}

It has the following features
  • React to phone events, just like profilematic
  • If {events occurs} then {do something}, a bit like IFTTT (and profilematic too)
  • Scriptable using JS, just like on{X}, and QML

Architecture

phonebot isn't trying to reinvent the wheel. Since we are with Qt, we can take advantage of QML and JS to write rules. Actually phonebot is just reading QML files that contains rules. It uses the powerful QQmlEngine to do all the hard work of parsing, interpreting etc.

A Rule in phonebot is a QML component that have 3 properties
  • trigger: something that triggers the rule
  • condition: a condition (or conditions) to respect for the rule to be active
  • actions: a series of actions to execute when the rule is triggered, and when conditions are respected
The Trigger is in charge of emitting signals to run the Rule. Triggers could be: when it's 10pm, when you enter in the home wifi zone, when Battery reached a certain level etc.

The Condition do not provide any signal, and represent more a state. A Condition could be "when driving", "when at home" etc. (even if implementing this kind of condition is rather tricky).

An Action is what to run: execute a program, turn on / off some settings, change an ambience, or use DBus to do stuff.

Here is an example of scripted rule. You will also be able to configure rule with a friendly UI (using default Triggers, Conditions and Actions).

Code:

import org.SfietKonstantin.phonebot 1.0
import org.SfietKonstantin.phonebot.debug 1.0

Rule {
    name: "SimpleRule"
    trigger: DebugTrigger { path: "/test" }
    actions: LoggerAction {}
}

Rules are stored inside ~/.config/harbour-phonebot/<rule-folder>/rule.qml, you can add your own rule or take a look at rules generated by the client.

How to use

If you are running the harbour version (that is the only version being released), you should keep the application always on to have rules working.

To add a rule, use the pull down menu on the main page, you will then have to
  • Give a name (optionnal)
  • Configure a trigger
  • Configure a condition (optionnal)
  • Add some actions

Configure a component (Trigger, Condition or Action)

First, select the component you want to configure. A dialog will appear, asking you to select a component type. By clicking on this entry, you will be shown a list of components. Select the one you want.

Then, you will come back to the previous dialog. You will see that the selected component is shown in the component type, and you will be able to configure it.

Configure it, and accept to have the component configured. Remember that you need at least a trigger, to trigger an action, and an action to be triggered.

Download
  • harbour-phonebot 0.1.1: OBS
  • phonebot source code: GitHub

Of course, this post will be updated when new features comes.

TMavica 2014-07-08 17:47

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
OBS link not set correctly

coderus 2014-07-08 17:57

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Links will be added when links will be ready, obliviously :)

Sfiet_Konstantin 2014-07-08 18:49

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
OBS always fails the first time you build your project :(
Sent a fix, hope this works.

evk 2014-07-08 20:36

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Nice started, started to write something like this. Now I can use the time to ignore my other projects instead. (:

Kaacz 2014-07-09 10:52

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
I was little modify and add list of cond&actions on Together.. :)

For example Jolla as all MeeGo devices have Ring volume and Media volume separately .. :)

Sfiet_Konstantin 2014-07-09 12:09

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
One rule for your own entertainment. Better rules will come at some point

Code:

import org.SfietKonstantin.phonebot 1.0
import org.SfietKonstantin.phonebot.debug 1.0
import org.SfietKonstantin.phonebot.profile 1.0

Rule {
    trigger: DebugTrigger { path: "/silent" }
    action: [ ProfileAction { profile: "silent" }, LoggingRule {} ]
}

qdbus org.SfietKonstantin.phonebotdebug /silent org.SfietKonstantin.phonebotdebug.Ping will silent your phone (how impressive :D)

nodevel 2014-07-09 13:32

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Thank you, this looks very promising!

Have you looked into timedclient support integration? I'm using it (in a very hackish way though) in one of my apps and it's a great tool.

Sfiet_Konstantin 2014-07-09 19:50

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by nodevel (Post 1432251)
Thank you, this looks very promising!

Have you looked into timedclient support integration? I'm using it (in a very hackish way though) in one of my apps and it's a great tool.

I'm using https://github.com/nemomobile/nemo-keepalive right now.
I might use timed to do some alarm clock integration though.

Sfiet_Konstantin 2014-08-01 20:19

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Right ... you should get a first release of the harbour enabled phonebot today for testing ... Right now, OBS is building it.

EDIT: 3 fails

And it's out. First release is very raw but lay down basis for enhancements. Please test and tell what you want next :)

Download here

PS: as it's the harbour verion, you need to keep the app open. The more integrated version will come quite soon.

EDIT2: hum, the release is pretty broken: no cover, and failing to create the rules. Will provide a fix asap
EDIT3: fix online: grab 0.1.1.
EDIT4: huhu, you actually got a SIGBUS when trying to save a rule, not nice ...
EDIT5: finally fixed, use the 0.1.1 link to DL.

Schturman 2014-08-02 06:14

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Thanks for this app.
But it not wotk for me...
Tried to create 2 rules (silent and general) and it doesn't change the profile..
Also, can you please add in action option for running command (as root/user) ?
Thanks

akira.pwr 2014-08-02 06:28

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
It's an interesting app, but can you do a step by step tutorial for how to create a rule and which rule we can create?

Morpog 2014-08-02 09:20

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
As you are offline atm on IRC, I'm posting it here:

Quote:

<Sfiet_Konstantin> Morpog_PC__: ping ?
<Sfiet_Konstantin> I'm searching for yet another icon, this time for phonebot
<Sfiet_Konstantin> I'm thinking of HAL 3000's eye :D
<tbr> 9000
<Sfiet_Konstantin> oh dear
<Sfiet_Konstantin> 9000
<Sfiet_Konstantin> :/
https://db.tt/MBCDqj0m

http://abload.de/img/harbour-phonebot-bigbqp01.png
(yes, thats all SVG)

Sfiet_Konstantin 2014-08-02 14:24

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Schturman (Post 1434594)
Thanks for this app.
But it not wotk for me...
Tried to create 2 rules (silent and general) and it doesn't change the profile..
Also, can you please add in action option for running command (as root/user) ?
Thanks

Interesting, can you run phonebot (harbour-phonebot) from the terminal and paste me what's shown ? Also, can you give me the QML files inside ~/.config/harbour/phonebot/ruleXXXXX ?

EDIT: you need to keep the window opened right now.

Quote:

Originally Posted by akira.pwr (Post 1434596)
It's an interesting app, but can you do a step by step tutorial for how to create a rule and which rule we can create?

Updated first page for how to create a rule.

Sfiet_Konstantin 2014-08-02 20:53

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
0.1.2 testing version includes:
  • UI fixes
  • You can see a summary of the rule in the main page, as well as summary of a component when creating a rule
  • Week day condition, allowing triggering events only on some days of the week
  • HAL watching you while you are on launcher grid

Get it at OBS

Next targets:
  • System daemon + jolla settings
  • DBus trigger and action
  • Notifications
  • Brightness control
  • Switch connectivitiy stuff
  • Entering a wifi area
  • Location

Schturman 2014-08-02 21:25

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Sfiet_Konstantin (Post 1434634)
Interesting, can you run phonebot (harbour-phonebot) from the terminal and paste me what's shown ? Also, can you give me the QML files inside ~/.config/harbour/phonebot/ruleXXXXX ?

When I run app from terminal it work, but it start rule immediately even if it should wait 1m for trigger time.
Here is output:
Code:

[nemo@Jolla ~]$ /usr/bin/harbour-phonebot
[D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using Wayland-EGL
[D] EngineManager::reloadEngine:242 - Using "/home/nemo/.config/harbour-phonebot/harbour-phonebot/" to search rules
[D] EngineManager::reloadEngine:253 - Rule found: "/home/nemo/.config/harbour-phonebot/harbour-phonebot/rule_00000/rule.qml"
[D] EngineManager::reloadEngine:253 - Rule found: "/home/nemo/.config/harbour-phonebot/harbour-phonebot/rule_00001/rule.qml"
[W] QQmlImportDatabase::importPlugin:1697 - Module 'Sailfish.Silica' does not contain a module identifier directive - it cannot be protected from external registrations.
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "DebugTrigger" : DebugTrigger don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "DebugTrigger" : DebugTrigger don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "LoggerAction" : LoggerAction don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "LoggerAction" : LoggerAction don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[D] TimeTrigger::setTime:103 - Time set: QTime("00:16:00")
[D] TimeTrigger::setTime:103 - Time set: QTime("00:18:00")
DeclarativeCoverWindow: I have a default alpha buffer
[D] TimeTriggerPrivate::slotTriggered:66 - Triggered time: QTime("00:15:19")
[D] Profile::setActiveProfile:211 - bool Profile::setActiveProfile(QString) "silent"
[D] TimeTriggerPrivate::slotTriggered:66 - Triggered time: QTime("00:18:24")
[D] Profile::setActiveProfile:211 - bool Profile::setActiveProfile(QString) "ambience"
[nemo@Jolla ~]$

Here is my rules:
Code:

import org.SfietKonstantin.phonebot 1.0
import org.SfietKonstantin.phonebot.profile 1.0
import org.SfietKonstantin.phonebot.time 1.0

Rule {
    actions: [
        ProfileAction {
            profile: "silent"
        }
    ]
    mappers: [
        TimeMapper {
            id: mapper0
            hour: 0
            minute: 16
        }
    ]
    name: "Silent profile"
    trigger: TimeTrigger {
        time: mapper0.value
    }
}

and
Code:

import org.SfietKonstantin.phonebot.profile 1.0
import org.SfietKonstantin.phonebot 1.0
import org.SfietKonstantin.phonebot.time 1.0

Rule {
    actions: [
        ProfileAction {
            profile: "ambience"
        }
    ]
    mappers: [
        TimeMapper {
            id: mapper0
            hour: 0
            minute: 18
        }
    ]
    name: "Ambience profile"
    trigger: TimeTrigger {
        time: mapper0.value
    }
}

Quote:

Originally Posted by Sfiet_Konstantin (Post 1434634)
EDIT: you need to keep the window opened right now.

I know ;)

EDIT: Installed new version, same result, not work from the icon and work from terminal.

Sfiet_Konstantin 2014-08-03 06:26

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Schturman (Post 1434669)
When I run app from terminal it work, but it start rule immediately even if it should wait 1m for trigger time.
Here is output:
Code:

[nemo@Jolla ~]$ /usr/bin/harbour-phonebot
[D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using Wayland-EGL
[D] EngineManager::reloadEngine:242 - Using "/home/nemo/.config/harbour-phonebot/harbour-phonebot/" to search rules
[D] EngineManager::reloadEngine:253 - Rule found: "/home/nemo/.config/harbour-phonebot/harbour-phonebot/rule_00000/rule.qml"
[D] EngineManager::reloadEngine:253 - Rule found: "/home/nemo/.config/harbour-phonebot/harbour-phonebot/rule_00001/rule.qml"
[W] QQmlImportDatabase::importPlugin:1697 - Module 'Sailfish.Silica' does not contain a module identifier directive - it cannot be protected from external registrations.
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "DebugTrigger" : DebugTrigger don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "DebugTrigger" : DebugTrigger don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "LoggerAction" : LoggerAction don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[W] MetaTypeCachePrivate::populateCacheForType:251 - Cannot get Phonebot metadata from "LoggerAction" : LoggerAction don't have a Phonebot metatype. Did you forgot PHONEBOT_METADATA macro ?
[D] TimeTrigger::setTime:103 - Time set: QTime("00:16:00")
[D] TimeTrigger::setTime:103 - Time set: QTime("00:18:00")
DeclarativeCoverWindow: I have a default alpha buffer
[D] TimeTriggerPrivate::slotTriggered:66 - Triggered time: QTime("00:15:19")
[D] Profile::setActiveProfile:211 - bool Profile::setActiveProfile(QString) "silent"
[D] TimeTriggerPrivate::slotTriggered:66 - Triggered time: QTime("00:18:24")
[D] Profile::setActiveProfile:211 - bool Profile::setActiveProfile(QString) "ambience"
[nemo@Jolla ~]$

Here is my rules:
Code:

import org.SfietKonstantin.phonebot 1.0
import org.SfietKonstantin.phonebot.profile 1.0
import org.SfietKonstantin.phonebot.time 1.0

Rule {
    actions: [
        ProfileAction {
            profile: "silent"
        }
    ]
    mappers: [
        TimeMapper {
            id: mapper0
            hour: 0
            minute: 16
        }
    ]
    name: "Silent profile"
    trigger: TimeTrigger {
        time: mapper0.value
    }
}

and
Code:

import org.SfietKonstantin.phonebot.profile 1.0
import org.SfietKonstantin.phonebot 1.0
import org.SfietKonstantin.phonebot.time 1.0

Rule {
    actions: [
        ProfileAction {
            profile: "ambience"
        }
    ]
    mappers: [
        TimeMapper {
            id: mapper0
            hour: 0
            minute: 18
        }
    ]
    name: "Ambience profile"
    trigger: TimeTrigger {
        time: mapper0.value
    }
}

I know ;)

EDIT: Installed new version, same result, not work from the icon and work from terminal.

PhoneBot use system aligned timer, and I'm using the 5 min precision, meaning that the trigger can be triggered between t - 2:30 and t + 2:30.

If it do not work only with the icon-invoked phonebot, you can launch it and go root, journalctl /usr/bin/harbour-phonebot to get logs. Mind trying ?

Schturman 2014-08-03 10:32

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Tried to run journalctl as root and get only one line:
Code:

[root@Jolla ~]# journalctl /usr/bin/harbour-phonebot
-- Logs begin at Sun 2014-08-03 11:54:56 IDT, end at Sun 2014-08-03 13:30:59 IDT. --
[root@Jolla ~]#


Sfiet_Konstantin 2014-08-04 06:45

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Schturman (Post 1434699)
Tried to run journalctl as root and get only one line:
Code:

[root@Jolla ~]# journalctl /usr/bin/harbour-phonebot
-- Logs begin at Sun 2014-08-03 11:54:56 IDT, end at Sun 2014-08-03 13:30:59 IDT. --
[root@Jolla ~]#


hum ... reproduced here too. qDebug is not enough to log stuff in journal ... the problem is that I cannot reproduce from my side. could you try again with some real-life rules ?

Schturman 2014-08-04 07:10

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Sfiet_Konstantin (Post 1434779)
hum ... reproduced here too. qDebug is not enough to log stuff in journal ... the problem is that I cannot reproduce from my side. could you try again with some real-life rules ?

Already tried a few times again (also after reboot).
Tried to start rule after 5, 10 min and second rule also after 5, 10 min (silent -> ambience), but nothing... It just not work and I don't know how to get log for you.

coderus 2014-08-04 07:17

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
try to start executable without invoker in terminal

Sfiet_Konstantin 2014-08-04 07:38

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by coderus (Post 1434783)
try to start executable without invoker in terminal

Already tried, and this works ... I wonder.

coderus 2014-08-04 07:42

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
well, from my past experience with Schturman - he is professional bug-finder. All his devices producing many very rare bugs for every application, so do not be surprised :D

Schturman 2014-08-04 07:48

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by coderus (Post 1434787)
well, from my past experience with Schturman - he is professional bug-finder. All his devices producing many very rare bugs for every application, so do not be surprised :D

Bla bla bla :D
It not work from icon, only from terminal...

M_NP 2014-09-04 06:21

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Sfiet_Konstantin (Post 1434665)
0.1.2 testing version includes:
  • UI fixes
  • You can see a summary of the rule in the main page, as well as summary of a component when creating a rule
  • Week day condition, allowing triggering events only on some days of the week
  • HAL watching you while you are on launcher grid

Get it at OBS

Next targets:
  • System daemon + jolla settings
  • DBus trigger and action
  • Notifications
  • Brightness control
  • Switch connectivitiy stuff
  • Entering a wifi area
  • Location

Hello!

This is great, just what I have been waiting for.
On my Jolla the latest version works just fine. Those new features you mentioned above are most welcome!
Hopefully you have time for this project, I'm sure there are many others who are waiting for this into their Jollas'

malkavian 2014-10-28 22:47

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Is this project alive yet? I like it. The rpm link is broken.

McCloud 2014-11-29 20:46

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Here is the link: http://repo.merproject.org/obs//home...la.armv7hl.rpm

Can we please have some other examples, like for BT and/or WiFi ON/OFF

Sfiet_Konstantin 2014-12-13 15:39

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Hi !
I'm working on this again !

Coming soon, easy stuff:
  • Turning network stuff on/off
  • Launching apps
  • Showing notifications
  • IM status

Zeta 2014-12-22 18:16

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Hi,

I am looking at an ambience switch action.

I have a lot to learn in the process, from qml (I'm a widget guy...) to dbus, through packaging hell. ;)


Anyway, here are what I found so far:

Ambiances can be changed using the following dbus command:
Code:

$ dbus-send --type=method_call --dest=com.jolla.ambienced /com/jolla/ambienced com.jolla.ambienced.setAmbience string:"file:///usr/share/ambience/storm/storm.ambience"
The string containing the image to use as an ambience.

Then, to discover which ambiences exist, and in particular which ones are favorited (so that they can contain ringtone/volume parameters), we need to dig into a hidden sqlite database which requires root access so far (or at least privileged rights):

Code:

# echo "SELECT file.displayName, directory.path,file.filename FROM ambience INNER JOIN file ON file.id = ambience.fileId INNER JOIN directory ON directory.id = file.directoryId WHERE ambience.favorite = 1;" | sqlite3 /home/nemo/.local/share/system/privileged/Ambienced/ambienced.sqlite | sed -e "s/|/ : /" -e "s/|/\//"
This returns the favorited ambiences only (you can remove this condition in the query if you want all) in the following format "name : path", like shown here:
Code:

Home : /usr/share/ambience/babyflower/babyflower.ambience
Night : /usr/share/ambience/redtrain/redtrain.ambience
Work : /usr/share/ambience/storm/storm.ambience

By the way, custom ambiences have a jpeg (or other) extension, not ".ambience".

My next step will be to integrate the DBus command (using proper Qt class, bash commands where simply used to test the functionnality) into an AmbienceAction plugin, hardcoding the ambiances path in the GUI.
Then we will need a way to get the favorited ambiances without needing privilege access to read the sqlite database...

I'll let you know when I reach the next step.

Zeta 2014-12-27 18:18

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
1 Attachment(s)
I got the ambiance switch working.

So far, on the UI side the ambiances names and path are hard coded, but the path can be changed manually in the scripts.


I need to do some clean-up and will push it to github to do a pull request.

Here is a screenshot of phone bot interface with some ambiance rules.

nodevel 2015-01-02 02:53

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Just a heads up:
An application called Situations was just released to the Jolla Store.

It looks like it shares its goals with Phonebot and has many features. However, it is closed source so the need for Phonebot as a open source alternative is still great! :)

Sfiet_Konstantin 2015-01-02 09:46

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by nodevel (Post 1454730)
Just a heads up:
An application called Situations was just released to the Jolla Store.

It looks like it shares its goals with Phonebot and has many features. However, it is closed source so the need for Phonebot as a open source alternative is still great! :)

I have seen this. Let's see what they come with.
EDIT: it looks quite good, with airplane mode etc. I guess I have to be at least at this level of standard :)

Zeta 2015-01-04 22:57

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
I updated the pull request for the ambience action:
https://github.com/SfietKonstantin/phonebot/pull/1

I still have to send a message to developer-care or the mailing list to check a way to properly get ambience info for the UI...


On another subject, I played a bit with the input devices files:
Code:

/dev/input/by-path/platform-gpio-keys-event
/dev/input/by-path/platform-pm8xxx-pwrkey-event
/dev/input/by-path/platform-pm8xxx-vib-event
/dev/input/by-path/platform-soc-audio.0-event
/dev/input/by-path/platform-soc-audio.0-event-headset-button

From there you can get any button events, like the power and volume buttons, including the audio jack plugin in and out (to auto-start the media player for example), or the headset button.

But this may be too much low level for using it in phonebot, and there is probably something in nemo or Qt for this kind of things, even for a daemon or an app that don't have focus ?

Zeta 2015-01-07 01:12

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
1 Attachment(s)
New plugin in progress (now only working in standalone, but will integrate it in phonebot soon) :

An action that gets a weather report and puts its data as a notification.

So just create a "morning weather report" rule, to have a quick notification with min/max temperature and comment (cloudy/foggy/...) waiting for you to wake up !

See the notification in the image joined.

Zeta 2015-01-18 23:29

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
2 Attachment(s)
Added a dummy "Notification" plugin, with custom summary and body message.
Not that useful as such, but will be helpful for debugging some rules on the run (by seeing directly in events feed what's happening).

We could add some magic-keys to have replacement of some parts of the string automatically by anything to make it more useful than static text. For example an $IP keywork to be replaced by the IP address (can be used in a rule triggered when changing network)...
Let me know if you have any ideas.

I'm now working on Wifi networks detection (using QNetwork), and cell id localisation (using ofono). I made some tests and it seems to be usable. I'll try to make a trigger plugin for both during the month.

Code will be uploaded to github when possible, and proposed as a pull request.

zagrim 2015-02-10 11:23

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Hi,
I'm keen to get some profile/settings automation running in my Jolla phone and as Situations is not (edit: not yet) so great at the moment (at least for me), I thought I'd give Phonebot a try but I'm having issues with installation.

I downloaded the current release from http://repo.merproject.org/obs//home...ishos/armv7hl/ and tapped phonebot-0.1.5-10.30.1.jolla.armv7hl.rpm. Confirmed that it should be installed. Sailfish reports that installation was successful, but I don't see the icon in the apps screen. Also noticed using terminal that there was a
Code:

store-client install /home/nemo/Downdloads/phonebot-0.1.5-10.30.1.jolla.armv7hl.rpm
started by the invoker left running in the background. Opening Store app acts as nothing has happened (don't really know if it should somehow acknowledge the installation in anyway, though).

I also tried to install via
Code:

pkcon install-local /home/nemo/Downdloads/phonebot-0.1.5-10.30.1.jolla.armv7hl.rpm
and it was successful, but still I'm not seeing the icon...
There should be an icon, right?

Zeta 2015-02-13 20:24

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by zagrim (Post 1460317)
I also tried to install via
Code:

pkcon install /home/nemo/Downdloads/phonebot-0.1.5-10.30.1.jolla.armv7hl.rpm
and it was successful, but still I'm not seeing the icon...
There should be an icon, right?

Yes, there should be an icon. The red eye of HAL9000 (in 2001: A space Odyssey) on a black background.
I'm not sure how to solve this package manager error. Maybe reboot to clean it from memory, then uninstall/reinstall ?

zagrim 2015-02-18 10:56

Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
 
Quote:

Originally Posted by Zeta (Post 1460713)
Yes, there should be an icon. The red eye of HAL9000 (in 2001: A space Odyssey) on a black background.
I'm not sure how to solve this package manager error. Maybe reboot to clean it from memory, then uninstall/reinstall ?

Unfortunately it just doesn't seem to succeed. I've retried all three methods ("install" from file manager, "pkcon install-local" and "store-client install"). "Install" from file manager as well as the pkcon method always claims success, but no app icon appears. Installing with executing store-client install in terminal acts a bit weird to me, but I don't know if it is normal... If I haven't fired up Store app after reboot, I get Account credentials need update but updating the credentials / login info via the GUI just doesn't seem to do any good, and I need to kill the store-client process. After that "store-client install" fails with Service name is already in use: "com.jolla.jollastore".

I'll give up with this for now unless someone is able to suggest something. At least I've been able to install Warehouse manually and the Store client works ok with the official content...


All times are GMT. The time now is 05:31.

vBulletin® Version 3.8.8