Active Topics

 



Notices


Reply
Thread Tools
Posts: 287 | Thanked: 862 times | Joined on Dec 2015
#561
Hey RobertMe! I was worried you'd jumped ship...

Originally Posted by RobertMe View Post
I'm just wondering how you're going keep up with RockWork and the other way around. As I've contributed a lot of code (including the Sailfish port) to Kodimote (previously Xbmcremote) which is developed by mzanetti, but we had everything in one repo so a lot of features were already available in both apps without changing any platform specific code. But as you're hosting on GitHub, and thus are using Git, and RockWork is hosted on Launchpad and using Bazaar you can't just pull in changes from one another.
What I have right now is nowhere near ready for integration, but as there's lots of different things to do and a big need for this then I thought it would be better to share it early so we can all get it working. Then I'll merge a minimal set of changes with Rockwork, and we'll be there. This gives me more flexibility to mess around without impacting Rockwork, which is now quite stable.

I've been occasionally updating the Rockwork base already. It's very well separated into platform and generic lib, so it's not difficult. I've got a parallel branch that I keep on vanilla rockwork and merge. These things are a lot less trouble with Git, after all.

Originally Posted by RobertMe View Post
I might be able to help in this area. As I've got my own small daemon for the Pebble (but didn't do any development on it the last months), and filling the timeline based on the calendar is one of the things I do have working. And the same goes for call handling, which I've got operational too (so I might be able to fix the crasher there).
Ace. I think I'm not far off with the call handling. How have you got the calls working? I tried with TelepathyQt like they had, but it seemed to be empty just like QOrganizer. I brought VoiceCallManager over from pebbled, which is the source of the crashing, but there might be a better way. We might have more libs available than pebbled did - Quazip was previously static, but I switched that to a dependency.

The calendar stuff would be great, thanks!

Originally Posted by RobertMe View Post
Which is about everything I have working actually . Timeline for notifications, email (not using notifications, so I can show a full message preview, which differs from at least Pebbled, haven't check RockWork yet), calendar, phone call handling and the app fetching (but I don't have a UI either, so that also only works by putting the app file in the correct directory).
I connected it up to the notifications, but in a simpler way than pebbled, using the transient property to filter the wrong ones out. Fetching the message individually would be better though, especially to get it in the right place in the timeline. I did notification actions, but I think dismiss should be possible both ways?
 

The Following 5 Users Say Thank You to abranson For This Useful Post:
Posts: 59 | Thanked: 168 times | Joined on Jun 2012
#562
Originally Posted by abranson View Post
Hey RobertMe! I was worried you'd jumped ship...
Nope, still alive and kicking . Although I didn't do any development in my spare time the last couple of months.


Ace. I think I'm not far off with the call handling. How have you got the calls working? I tried with TelepathyQt like they had, but it seemed to be empty just like QOrganizer. I brought VoiceCallManager over from pebbled, which is the source of the crashing, but there might be a better way.
I tried two different routes. Both using direct/"low level" DBus calls instead of creating a QDBusInterface or QDBusAbastractAdapter. I tried using both the more low level/generic oFono (which I used in Kodimote) and the Nemo based Nemo VoiceCall DBus API. I tried both because there is an issue were calling "hangup" on an incoming (ringing) call gives odd results (in most cases the phone (and Pebble) start ringing again and when calling "hangup" on the new call the other end gets a message that there was a problem setting up the connection instead of going to voicemail the first time already). But in the end I sticked with the Nemo VoiceCall API as that one allows muting an incoming call (instead of hanging up), although I didn't implement it. But it's most likely some issue in you're code which makes it crash and not in the API you're using.

The calendar stuff would be great, thanks!
Most of it actually isn't that hard and I based it on some code made by javispedro, which can be found here (the agendamanager files). But you'll also need to append a line to some permissions file of Sailfish, otherwise you can't open the sqlite database. How to do this can be found in the RPM spec file of the previously linked repo.


I connected it up to the notifications, but in a simpler way than pebbled, using the transient property to filter the wrong ones out. Fetching the message individually would be better though, especially to get it in the right place in the timeline. I did notification actions, but I think dismiss should be possible both ways?
Using Pebbleds code for notification handling is IMHO kinda stupid. This because it uses Qts DBus library to monitor the creation of notifications. But it doesn't allow to "sniff" the notification id which is send in response to the app creating the notification. This means you can't monitor which notifications get closed or updated. So you can't remove or update a notification on the Pebble when it gets removed or updated on the phone (especially annoying when using WhatsApp as I had the Pebble crash/reboot multiple times when removing a lot of notifications using Pebbled). So to be able to get the notifications including its id I used some other code from javispedro, which are the notification files found here.

Getting the individual notifications for new emails (as shown on the events screen) is however fairly easy, as the email app actually sends N+1 notifications when N emails are received. IIRC Pebbled currently uses some ".summary" name/hint to get the notification, but that indeed just contains the "N new emails" text. But the other notifications contain both the sender and subject of the individual emails as shown on the events screen. But those notifications use a different name/hint, which you can easily get by running "dbus-monitor" when receiving the mails and reading the output.

But for the email notifications and pins* I'm not using the notifications at all, but I'm actually using the Qt Messaging Framework (QMF). As this allows to get a (plain text) preview of the email which the notification doesn't contain. And using the library/framework would also be the way to go if you want to support the "respond" actions of the Pebble. As it allows you so create new emails and send them, without opening the email app on the phone.

* For email, SMS and missed calls notifications I create both a pin on the timeline and a notification. This using the timeline spec. So I'm able to fully parse any JSON pin that the Android and iOS apps support and which can be used by other services to push pins to the Pebble. This is possible because Pebble actually publishes the description of the layout (all fields, which attribute id they have, and of which type they are) as part of the firmware update endpoint. And this also allows me to for example conditionally add the "createNotification" field to a pin based on whether the email already has been marked as read or not (when it has been read on another device).
But as far as I've seen the implementation in RockWatch is hardcoded to those supported by it (notifications of a specific type or calendar events). So it doesn't allow the fully dynamic usage of the timeline pins.
 

The Following 7 Users Say Thank You to RobertMe For This Useful Post:
Posts: 287 | Thanked: 862 times | Joined on Dec 2015
#563
Thanks for that. The calendar permission thing is exactly the problem I saw, but with no idea how the mechanism worked. After looking at it, I'm thinking a dependency to libwatchfish would be the right way to do this. Might only need a bit of glue between that and Rockwork's platform interface.

I'm away for a week, but I'll play with that when I get back. Thanks again, and glad you're still around
 

The Following 5 Users Say Thank You to abranson For This Useful Post:
Posts: 287 | Thanked: 862 times | Joined on Dec 2015
#564
Originally Posted by RobertMe View Post
IIRC Pebbled currently uses some ".summary" name/hint to get the notification, but that indeed just contains the "N new emails" text. But the other notifications contain both the sender and subject of the individual emails as shown on the events screen. But those notifications use a different name/hint, which you can easily get by running "dbus-monitor" when receiving the mails and reading the output.
I looked into these a couple of months ago, and there are actually three notifications for some things, including a separate distinct group one that supplies an integer unread message count. I've noticed that I'm not getting the '2 new messages' notification through to the watch at all now, since I started dropping the transient and hidden notifications, and prioritizing the Notify arguments over the hints for the content. It's quite a clean solution.

Originally Posted by RobertMe View Post
For email, SMS and missed calls notifications I create both a pin on the timeline and a notification. This using the timeline spec. So I'm able to fully parse any JSON pin that the Android and iOS apps support and which can be used by other services to push pins to the Pebble. This is possible because Pebble actually publishes the description of the layout (all fields, which attribute id they have, and of which type they are) as part of the firmware update endpoint. And this also allows me to for example conditionally add the "createNotification" field to a pin based on whether the email already has been marked as read or not (when it has been read on another device).
But as far as I've seen the implementation in RockWatch is hardcoded to those supported by it (notifications of a specific type or calendar events). So it doesn't allow the fully dynamic usage of the timeline pins.
I've proposed this to the rockwork guys, as I believe it'll be the cleaner solution in the long run. Katherine recommends using looking up the icon names in the firmware's layout.json.auto file, and using that as a guide to structure, which I'm assuming is the same thing.

Right now I'm trying to get the calendar access working. I've mimicked the mapplauncher entry from saltoq, but I'm still getting errors opening the mkcal db. Was that all I have to do? I saw some people were setting the uid and gid of the process, but that seems a bit strange.
 

The Following 4 Users Say Thank You to abranson For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#565
Originally Posted by abranson View Post
Right now I'm trying to get the calendar access working. I've mimicked the mapplauncher entry from saltoq, but I'm still getting errors opening the mkcal db. Was that all I have to do? I saw some people were setting the uid and gid of the process, but that seems a bit strange.
For the mapplauncher entry to work you also need to launch it via mapplauncher

There is a bunch of changes involved (libsailfishapp automatizes a bunch of them, though): add "qt5-boostable" to pkg-config imports list, add Q_DECL_EXPORT to main(), and invoke your program like

/usr/bin/invoker -o --type=qt5 /usr/bin/saltoqd

If it still doesn't work there are some ways to debug it. For example do "devel-sh --privileged" to switch into the privileged user, and then you can gdb/strace your program to see where it fails.

(Alternatively, some people just make the binary setgid, so that it always launches in the privileged group...).
 

The Following 5 Users Say Thank You to javispedro For This Useful Post:
Posts: 287 | Thanked: 862 times | Joined on Dec 2015
#566
Originally Posted by javispedro View Post
For the mapplauncher entry to work you also need to launch it via mapplauncher

There is a bunch of changes involved (libsailfishapp automatizes a bunch of them, though): add "qt5-boostable" to pkg-config imports list, add Q_DECL_EXPORT to main(), and invoke your program like

/usr/bin/invoker -o --type=qt5 /usr/bin/saltoqd

If it still doesn't work there are some ways to debug it. For example do "devel-sh --privileged" to switch into the privileged user, and then you can gdb/strace your program to see where it fails.

(Alternatively, some people just make the binary setgid, so that it always launches in the privileged group...).
Excellent, thank you. I see calendars!
 

The Following 3 Users Say Thank You to abranson For This Useful Post:
Posts: 287 | Thanked: 862 times | Joined on Dec 2015
#567
Latest code on github now pushes calendar events to the timeline! I've also switched to the libwatchfish music monitor, with added Pulseaudio volume controls. Does anyone want to try it in this (gui-less) state?
 

The Following 4 Users Say Thank You to abranson For This Useful Post:
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#568
Good work! If you can package it and put it on openrepos, I'd love to try it out.
 

The Following User Says Thank You to Feathers McGraw For This Useful Post:
Posts: 287 | Thanked: 862 times | Joined on Dec 2015
#569
Originally Posted by Feathers McGraw View Post
Good work! If you can package it and put it on openrepos, I'd love to try it out.
Done!

https://openrepos.net/content/abranson/rockpool
 

The Following 4 Users Say Thank You to abranson For This Useful Post:
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#570
Originally Posted by abranson View Post
Done!

https://openrepos.net/content/abranson/rockpool
Thank you!

This is probably a really stupid question, but I can't seem to enable the rockpoold service, any pointers?

Code:
nemo ~ $ zypper info rockpool 
Loading repository data...
Reading installed packages...


Information for package rockpool:

Repository: openrepos-abranson
Name: rockpool
Version: 0.1-2
Arch: armv7hl
Vendor: 
Installed: Yes
Status: up-to-date
Installed Size: 1.4 MiB
Summary: Support for Pebble watches in SailfishOS
Description: 
Support for Pebble watch on SailfishOS devices.
Code:
nemo ~ $ sudo systemctl status rockpoold
nemo's password:
rockpoold.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
Code:
nemo ~ $ rpm -ql rockpool                                                                    
/usr/bin                                                                                     
/usr/bin/rockpool                                                                            
/usr/bin/rockpoold                                                                           
/usr/lib/systemd/user/rockpoold.service                                                      
/usr/lib/systemd/user/user-session.target.wants/rockpoold.service                            
/usr/share/applications/rockpool.desktop                                                     
/usr/share/icons/hicolor/86x86/apps/rockpool.png                                             
/usr/share/rockpool/qml                                                                      
/usr/share/rockpool/qml/AppSettingsPage.qml                                                  
/usr/share/rockpool/qml/AppStoreDetailsPage.qml                                              
/usr/share/rockpool/qml/AppStorePage.qml                                                     
/usr/share/rockpool/qml/ContentPeerPickerPage.qml                                            
/usr/share/rockpool/qml/CoverPage.qml                                                        
/usr/share/rockpool/qml/DeveloperToolsPage.qml                                               
/usr/share/rockpool/qml/FirmwareUpgradePage.qml                                              
/usr/share/rockpool/qml/HealthSettingsDialog.qml
/usr/share/rockpool/qml/ImportPackagePage.qml
/usr/share/rockpool/qml/InfoPage.qml
/usr/share/rockpool/qml/InstalledAppDelegate.qml
/usr/share/rockpool/qml/InstalledAppsPage.qml
/usr/share/rockpool/qml/Main.qml
/usr/share/rockpool/qml/MainMenuPage.qml
/usr/share/rockpool/qml/NotificationsPage.qml
/usr/share/rockpool/qml/PebbleModels.qml
/usr/share/rockpool/qml/PebblesPage.qml
/usr/share/rockpool/qml/ScreenshotsPage.qml
/usr/share/rockpool/qml/SettingsPage.qml
/usr/share/rockpool/qml/SystemAppIcon.qml
Code:
nemo ~ $ cat /usr/lib/systemd/user/rockpoold.service
[Unit]
Description=Rockpool daemon for Pebble smartwatches
Requires=dbus.socket bluetooth.target booster-qt5.service
After=pre-user-session.target lipstick.service dbus.socket bluetooth.target booster-qt5.service

[Service]
ExecStart=/usr/bin/invoker -o --type=qt5 /usr/bin/rockpoold
Restart=always

[Install]
WantedBy=user-session.target
 
Reply

Tags
pebble, pebble time, pebbled


 
Forum Jump


All times are GMT. The time now is 07:15.