![]() |
[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
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
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 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
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 Of course, this post will be updated when new features comes. |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
OBS link not set correctly
|
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 :)
|
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. |
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. (:
|
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 .. :) |
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 |
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. |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
I might use timed to do some alarm clock integration though. |
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. |
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 |
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?
|
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:
http://abload.de/img/harbour-phonebot-bigbqp01.png (yes, thats all SVG) |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
EDIT: you need to keep the window opened right now. Quote:
|
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
0.1.2 testing version includes:
Get it at OBS Next targets:
|
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
Here is output: Code:
[nemo@Jolla ~]$ /usr/bin/harbour-phonebot Code:
import org.SfietKonstantin.phonebot 1.0 Code:
import org.SfietKonstantin.phonebot.profile 1.0 Quote:
EDIT: Installed new version, same result, not work from the icon and work from terminal. |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
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 ? |
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 |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
|
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
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. |
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
|
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
|
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
|
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
It not work from icon, only from terminal... |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
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' |
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.
|
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 |
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:
|
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" 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/|/\//" Code:
Home : /usr/share/ambience/babyflower/babyflower.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. |
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. |
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! :) |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
EDIT: it looks quite good, with airplane mode etc. I guess I have to be at least at this level of standard :) |
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 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 ? |
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. |
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. |
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 I also tried to install via Code:
pkcon install-local /home/nemo/Downdloads/phonebot-0.1.5-10.30.1.jolla.armv7hl.rpm There should be an icon, right? |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
I'm not sure how to solve this package manager error. Maybe reboot to clean it from memory, then uninstall/reinstall ? |
Re: [WIP] Phonebot: a mix between profilematic, IFTTT and on{X} to schedule actions on your phone
Quote:
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