maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [SFOS] [Announce] Rockpool - Pebble daemon for Sailfish (https://talk.maemo.org/showthread.php?t=96490)

abranson 2016-04-12 07:56

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by ruff (Post 1503305)
value("true").toInt() == 1

I was just a little bit sick in my mouth :)

Can you replicate that? Everyone seems to be getting a 0 there, including me, but stupidly I didn't notice before because I'd repaired my watch and so had a fresh file. I assumed that converting it directly to an int would return 0 for any string that wouldn't parse as an int, for the sake of the children. I've added a bit of a dirty hack to skip the parsing and return Enabled when the value is "true", but I'd remove it if I could.

ruff 2016-04-12 10:01

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by abranson (Post 1503355)
I assumed that converting it directly to an int would return 0 for any string that wouldn't parse as an int, for the sake of the children.

Now that I think of it - it seems to me it was a result of partial code migration. I.e. since I've not changed the type in all places yet to int - metatype was set to bool, and boolean conversion resulted to true=>1. While doing end-to-end test I spotted that one call was still using bool - I was unable to change value to always-enabled from gui ( or rather i was able but returned update signal carried 1 instead of 2 even though 2 was set). so when I fixed that to int my config was already saved as integers with true replaced by 1 and subsequent cleanup didn't affect that.

abranson 2016-04-12 10:03

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Ok, I'll leave that in then. It won't do any hard. The icon thing is bugging me so I'm trying to store the notif icons as they come in. Just putting off solving the phone call end segfault...

taixzo 2016-04-12 14:25

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
It seems there's no way to disable an "ongoing" Android system notification? Like, when the Play store is updating apps, it puts up a notification saying "Updating gmail" or whatever, and if I close that on the Pebble it re-opens in ten seconds or so.This effectively makes the rest of the Pebble useless until apps are done updating.

abranson 2016-04-12 17:07

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by taixzo (Post 1503381)
It seems there's no way to disable an "ongoing" Android system notification? Like, when the Play store is updating apps, it puts up a notification saying "Updating gmail" or whatever, and if I close that on the Pebble it re-opens in ten seconds or so.This effectively makes the rest of the Pebble useless until apps are done updating.

This has been a problem since Pebbled, what do the official apps do in these situations?

HtheB 2016-04-14 13:14

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Is there a way to receive notifications after getting the first one?
Because it stops receiving notifications after the first one, untill I open the app (Skype for example)
I wish there was an option to receive all messages without this limitation


Edit: The problem is: It shows the messages on the notifications of the phone, but not as a NEW notification. It replaces the old one, which is probably the problem why Rockpool does not detect it :(

abranson 2016-04-14 14:45

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I'm rejigging the notification part a lot right now to support replacesId, and I don't think we're doing anything if the notification already exists so it doesn't get sent. I'd wondered when that would be the case, but you've just told me. Skype messages?

ruff 2016-04-14 18:24

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
While you're at it - can you also extend struct which is sent for notification filters to the client as well as the string used for id? The way it works now is a bit cumbersome - normalized name to be presented as a source_id (which it isn't actually) and then this stupid attempt to guess who the hell was that in the client.
I.e. I have now almost all filters set to some localized string (eg. Nachrichten) so if i switch locale all my filters become obsolete. Also the icon for the mail notification is now assigned if id contains @ - which would not be true for let say jabber.
While original messages contain proper info we need:
Code:

method call sender=:1.35 -> dest=org.freedesktop.Notifications serial=2004 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
  string "xy@zz.ie"
  uint32 0
  string "image://theme/icon-m-service-generic-email"
  string "Project Turris"
  string "Password reset on omnia.turris.cz"
  array [
      string "default"
      string ""
      string "app"
      string ""
  ]
  array [
      dict entry(
        string "x-nemo-remote-action-default"
        variant            string "com.jolla.email.ui /com/jolla/email/ui com.jolla.email.ui openMessage AAAAAgAAAAi6"
...


abranson 2016-04-14 18:30

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Did you pull my latest master? I'm already storing the icon from the notification. Source id from x-nemo-owner would make more sense though. I'll have a look at storing that alongside a separate friendly/locale specific name.

ruff 2016-04-14 18:50

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Not yet, still enchanting websockets to cast them to devconnection. let me rebase...

HtheB 2016-04-14 19:28

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by abranson (Post 1503569)
I'm rejigging the notification part a lot right now to support replacesId, and I don't think we're doing anything if the notification already exists so it doesn't get sent. I'd wondered when that would be the case, but you've just told me. Skype messages?

Yes, Skype (Android) messages somehow comes through, but only replaces the last notification without a new one...

I've also noticed that some other apps, just stops receiving ANY notification at all once it has received 1 notification of that app... (Like "KakaoTalk" also for Android)

P@t 2016-04-15 07:38

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
After a week or so of use, some comments of what seems not to work:
- timeline: I am not sure how it works. I have the option enabled in the parameters and it did sync at first but now I am arriving at Friday and I have a 'end' after appointments of today while I still have entries for tomorrow and next week in the phone?
- misfit: i have regular error messages of 'sync failed'...
- during the night i usually put my phone and watch in flight mode. Sometimes it does not reconnect in the morning and I have to use the 'disable service' in the developer tools...

no big problems anyway
thanks again

Feathers McGraw 2016-04-15 07:59

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Why not use quiet time instead of flight mode?

P@t 2016-04-15 10:18

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by Feathers McGraw (Post 1503629)
Why not use quiet time instead of flight mode?

No big reasons except that I feel better that my body receives less waves during nights + misfit is not working in quiet mode afaik

Fuzzillogic 2016-04-15 10:34

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by Feathers McGraw (Post 1503629)
Why not use quiet time instead of flight mode?

Better yet: standby-mode. It disables bluetooth when the watch is motionless for half an hour (i.e. when not wearing it), and reconnects when picked up. Works well, saves battery, and since rockpool can automatically switch profile based on whether it's connected, my phone automatically enables the ringtone when not wearing the watch.

abranson 2016-04-15 11:46

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Thanks for these. Very helpful.

Quote:

Originally Posted by P@t (Post 1503626)
- timeline: I am not sure how it works. I have the option enabled in the parameters and it did sync at first but now I am arriving at Friday and I have a 'end' after appointments of today while I still have entries for tomorrow and next week in the phone?

Hmm, the calendar should sync after every calendar change, and I thought that happened quite often whether you edited your calendar or not. It's possible that these events aren't being triggered. The logic we inherited from RockWork only syncs events that started less than two days ago, or in the next 5 days. The watch itself then restricts your view to the today, tomorrow and the day after. Would be good to see a startup log, as it should always sync then.

Quote:

Originally Posted by P@t (Post 1503626)
- misfit: i have regular error messages of 'sync failed'...

Are you on the latest version? Misfit syncs should have been fixed in 0.8-3. It works on my phone, but then I was messing about with the JS to debug it.

Quote:

Originally Posted by P@t (Post 1503626)
- during the night i usually put my phone and watch in flight mode. Sometimes it does not reconnect in the morning and I have to use the 'disable service' in the developer tools...

I've noticed this too, Rockpool is unable to connect after the bluetooth is disabled and re-enabled needs to go in the issue list I think.

P@t 2016-04-15 12:14

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
1 Attachment(s)
Thanks for the reply.
Regarding the timeline, do you mean the logs available in 'developer tools' ? I have opened it but is not meaningful to me ;). Anyway I have attached a shorter version (because tmo is restricting the size) so I have kept only what has happened today and the last line of other 'generation'... let me know if you need something else.

Regarding Misfit, I have tried to uninstall it and reinstall it (to make sure I have latest version because i am not sure how to check the version of the app I have) but it is still failing at sync, it reports 'Sync initiated - Wifi required' and then 2s later 'Sync failed - network error'. If I go to settings of the app, I can see that 'your pebble is connected to Misfit account successfully [...]' and all i can do is close or switch account.

abranson 2016-04-15 12:26

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by P@t (Post 1503654)
Thanks for the reply.
Regarding the timeline, do you mean the logs available in 'developer tools' ? I have opened it but is not meaningful to me ;). Anyway I have attached a shorter version (because tmo is restricting the size) so I have kept only what has happened today and the last line of other 'generation'... let me know if you need something else.

Wow I haven't seen those before - they must be the watch logs that ruff fixed last time! It's the rockpoold logs we need, but I don't think they're part of that yet. We'll have to add something to pull those out of the journal and include them. Log extraction would be very handy.

Quote:

Originally Posted by P@t (Post 1503654)
Regarding Misfit, I have tried to uninstall it and reinstall it (to make sure I have latest version because i am not sure how to check the version of the app I have) but it is still failing at sync, it reports 'Sync initiated - Wifi required' and then 2s later 'Sync failed - network error'. If I go to settings of the app, I can see that 'your pebble is connected to Misfit account successfully [...]' and all i can do is close or switch account.

'About' on the pulley menu of the RockPool main window. Version should be at the top. Occasionally I've forgotten to update it when building a new package, but not very often :o

P@t 2016-04-15 14:02

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Using latest version of everything I think:
rockpool 0.9-4
firmware v3.11.1

abranson 2016-04-15 14:22

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Hmm ok. Maybe I should reset my Misfit to see if I'd left any changes in. It's quite nice seeing the graphs of your activity on their website once the upload works.

ruff 2016-04-15 15:23

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by P@t (Post 1503654)
Regarding the timeline, do you mean the logs available in 'developer tools' ? I have opened it but is not meaningful to me ;)

Not really. In RockWork it could be used to send phone logs (what is actually needed) and pebble logs. On Jolla services log to journald so you cannot just pick the file and send, need to add certain _dumper_ interface to extract it from journald first.
So currently in rockpool you can only send pebble logs.
That means to extract phone logs you need to ssh to phone and start /usr/bin/rockpoold manually (disable service prior to this in the app) and collect the output.

abranson 2016-04-15 15:45

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by ruff (Post 1503680)
Not really. In RockWork it could be used to send phone logs (what is actually needed) and pebble logs. On Jolla services log to journald so you cannot just pick the file and send, need to add certain _dumper_ interface to extract it from journald first.
So currently in rockpool you can only send pebble logs.
That means to extract phone logs you need to ssh to phone and start /usr/bin/rockpoold manually (disable service prior to this in the app) and collect the output.

You could also grep journalctl -la for the app name, except we've not set it yet. I should do that too, it's was there in the pebbled debug calls.

ruff 2016-04-15 16:25

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I guess you need devel-su for it? It logs to system journal, even for user session.

Fuzzillogic 2016-04-15 17:26

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by P@t (Post 1503626)
- during the night i usually put my phone and watch in flight mode. Sometimes it does not reconnect in the morning and I have to use the 'disable service' in the developer tools...

It did occur to me that using the standby-mode, connection can take longer. Probably due to

Code:

        qDebug() << "Attempting to reconnect in 15 minutes";
        m_reconnectTimer.start(1000 * 60 * 15);

in watchconnection.cpp. After long standby-time, in which the phone was still active and tried to reconnect, the reconnection attempt interval can go up to 15 minutes.

How costly, in terms of energy, is it to try to reconnect more often? I.e. what impact would it have to try to reconnect every 15 seconds, instead of every 15 minutes?

Also, I wonder if this is the only or best strategy. When the watch' bluetooth connection becomes active, it seems it merely makes itself discoverable. I'd assume it would try to reconnect itself at least once. What strategy does the android app use?

abranson 2016-04-15 18:06

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
15 mins is too long I agree. But we could also detect when the bluetooth adaptor is re-enabled and try to connect immediately.

ruff 2016-04-15 18:19

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Ok, this is a start (not related to conversation above, just a dev connection)
Code:

$ pebble ping --phone jolla -vvv
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 209.118.208.39
DEBUG:pebble_tool.util.analytics:Queueing analytics data: {'platform': 'native_sdk', 'data': {}, 'event': 'invoke_command_ping', 'identity': {'sdk_client_id': 'e69fce62-a758-43ed-b84f-55c96c539e0b', 'user': u'56b6bd9e33376500234f0b00'}, 'sdk': {'host': {'platform': 'Linux-4.5.0-x86_64-with-glibc2.2.5', 'python_version': '2.7.11', 'is_vm': False}, 'version': u'3.11.1', 'tool_version': '4.2.1'}}
DEBUG:libpebble2.communication:-> WatchVersion(command=None, data=WatchVersionRequest())
DEBUG:requests.packages.urllib3.connectionpool:"HEAD / HTTP/1.1" 301 0
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): td.getpebble.com
DEBUG:libpebble2.communication:<- WatchVersion(command=1, data=WatchVersionResponse(running=WatchFirmwareVersion(timestamp=1459810639, version_tag=v3.11.1, git_hash=4a040a3, is_recovery=False, hardware_platform=11, metadata_version=1), recovery=WatchFirmwareVersion(timestamp=1440968436, version_tag=v3.2-prf5, git_hash=5354924, is_recovery=True, hardware_platform=11, metadata_version=1), bootloader_timestamp=1436823217, board=spauld13, serial=Q554445E018Y, bt_address=29c2f548b4b0, resource_crc=2271546058, resource_timestamp=0, language=ru_RU, language_version=3, capabilities=2047, is_unfaithful=False))
DEBUG:libpebble2.communication:-> PingPong(command=None, cookie=187190662, message=Ping(idle=False))
DEBUG:libpebble2.communication:<- BlobResponse(token=44287, response=BlobStatus.Success)
DEBUG:libpebble2.communication:<- BlobResponse(token=31638, response=BlobStatus.Success)
DEBUG:libpebble2.communication:<- PingPong(command=1, cookie=187190662, message=Pong())
Pong!
DEBUG:requests.packages.urllib3.connectionpool:"POST /td.pebble.sdk_events HTTP/1.1" 200 0
INFO:root:Spent 0.516337 seconds waiting for analytics.


abranson 2016-04-15 18:30

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Fantastic!

Fuzzillogic 2016-04-15 18:41

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by abranson (Post 1503701)
15 mins is too long I agree. But we could also detect when the bluetooth adaptor is re-enabled and try to connect immediately.

The host's adapter? Seems to be the case already. In the same file:
Code:

case QBluetoothLocalDevice::HostConnectable:
case QBluetoothLocalDevice::HostDiscoverable:
case QBluetoothLocalDevice::HostDiscoverableLimitedInquiry:
    …
    scheduleReconnect();

Indeed, when the watch is connectable and I disable flight mode on the phone, Rockpool reconnects immediately.

ruff 2016-04-15 22:27

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Now almost usable:
Code:

$ pebble install --phone jolla -vvv
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 209.118.208.39
DEBUG:pebble_tool.util.analytics:Queueing analytics data: {'platform': 'native_sdk', 'data': {}, 'event': 'invoke_command_install', 'identity': {'sdk_client_id': 'e69fce62-a758-43ed-b84f-55c96c539e0b', 'user': u'56b6bd9e33376500234f0b00'}, 'sdk': {'project': {'sdk': u'3', 'is_watchface': True, 'type': 'native', 'uuid': 'e8ff74f0-b103-4d99-8b3f-ee7d02b6f4b9', 'app_name': u'Petorial'}, 'host': {'platform': 'Linux-4.5.0-x86_64-with-glibc2.2.5', 'python_version': '2.7.11', 'is_vm': False}, 'version': u'3.11.1', 'tool_version': '4.2.1'}}
DEBUG:requests.packages.urllib3.connectionpool:"HEAD / HTTP/1.1" 301 0
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): td.getpebble.com
DEBUG:libpebble2.communication:-> WatchVersion(command=None, data=WatchVersionRequest())
DEBUG:requests.packages.urllib3.connectionpool:"POST /td.pebble.sdk_events HTTP/1.1" 200 0
DEBUG:libpebble2.communication:<- WatchVersion(command=1, data=WatchVersionResponse(running=WatchFirmwareVersion(timestamp=1459810639, version_tag=v3.11.1, git_hash=4a040a3, is_recovery=False, hardware_platform=11, metadata_version=1), recovery=WatchFirmwareVersion(timestamp=1440968436, version_tag=v3.2-prf5, git_hash=5354924, is_recovery=True, hardware_platform=11, metadata_version=1), bootloader_timestamp=1436823217, board=spauld13, serial=Q554445E018Y, bt_address=29c2f548b4b0, resource_crc=2271546058, resource_timestamp=0, language=ru_RU, language_version=3, capabilities=2047, is_unfaithful=False))
Installing app...
DEBUG:libpebble2.communication:<- BlobResponse(token=52545, response=BlobStatus.Success)
App install succeeded.
INFO:root:Spent 0.001549 seconds waiting for analytics.


P@t 2016-04-16 06:58

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by abranson (Post 1503658)
Wow I haven't seen those before - they must be the watch logs that ruff fixed last time! It's the rockpoold logs we need, but I don't think they're part of that yet. We'll have to add something to pull those out of the journal and include them. Log extraction would be very handy.



'About' on the pulley menu of the RockPool main window. Version should be at the top. Occasionally I've forgotten to update it when building a new package, but not very often :o

about the timeline sync, i have just realized that the events I do not see are those from caldav accounts. when using gmail calendar it works ok!

abranson 2016-04-16 08:49

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by Fuzzillogic (Post 1503711)
Indeed, when the watch is connectable and I disable flight mode on the phone, Rockpool reconnects immediately.

I had a suspicion that it was in there, but must be broken to cause P@t's problem. I'll check if the timer interval gets reset in that case - it should.

Edit: yes it is reset. I'll investigate properly when I get chance then.

HtheB 2016-04-16 10:13

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I've noticed that the Timeline does not work anymore since a couple fw's ago :(
Anyone else noticed as well?

abranson 2016-04-16 11:13

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by HtheB (Post 1503753)
I've noticed that the Timeline does not work anymore since a couple fw's ago :(
Anyone else noticed as well?

No? What does it do?

HtheB 2016-04-16 11:15

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by abranson (Post 1503756)
No? What does it do?

I can't see the match scores and the prayertimes anymore. However, it did work before on an older version. Can't remember what version it was. Or is it because I have the newest fw on the watch now?

abranson 2016-04-16 19:14

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by HtheB (Post 1503757)
I can't see the match scores and the prayertimes anymore. However, it did work before on an older version. Can't remember what version it was. Or is it because I have the newest fw on the watch now?

Could they have been left over from an android or iOS pairing? Because custom timeline items aren't supported yet - it all has to go through subscriptions on pebble.com. That'll be a major bit of work.

HtheB 2016-04-17 09:16

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Quote:

Originally Posted by abranson (Post 1503804)
Could they have been left over from an android or iOS pairing? Because custom timeline items aren't supported yet - it all has to go through subscriptions on pebble.com. That'll be a major bit of work.

That's weird... I really had some timeline features on the first few couple versions O_o

ruff 2016-04-17 12:49

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
DeveloperConnection RPM went to beta. Don't forget to add websockets.

It also means it went with WebSockets API enabled in the JSkit - another thing to test.
CloudConnection proxy not implemented - only direct (lan) connectivity (--phone target).
PhoneAppLog is not yet implemented, watch log should work (as it uses relay feature).

In general since DevCon does not use any auth - it's actually quite a dangerous backdoor.
hence current behaviour is that it never starts automatically, should be enabled explicitly in the GUI.

abranson 2016-04-17 14:34

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
That's great news, will definitely try it out.

Any suggestions on how we could manage this QtWebSockets dependency in the main app? At the moment they'd have to explictly enable Coderus' repo, and upgraders won't catch that. Should I mirror it?

ruff 2016-04-17 16:02

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Well, yes, probably would make sense to prepare two rpms, with WS linked as a subproject, and _light_ rpm relying on external dependency. We could even slim static version down by removing declarative (qml) part.

Fuzzillogic 2016-04-17 17:04

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Why are libs statically linked anyway? Compatibility? Using shared libraries could save a few precious kilobytes.


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

vBulletin® Version 3.8.8