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)

ruff 2016-06-19 13:39

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Well, I remember when i first moved to timeline engine and my phone got rebooted I've received a bunch of empty messages with [Action] action - which at that moment I thought was bound to certain mistype in platform integration.
Since then I never got it again (neither normally nor on reboot) and i didn't manage to understand where they came from so my conclusion was similar that they were certain transient messages which slipped through watchfish monitor.
That time i didn't have pin persistance yet so there was no way i could catch them. Hoped they would be stored now but no luck again :)

So if anyone else is getting these empty messages with [Action] action - try not to restart daemon but instead capture logs using devel-su / journalctl or pebble SDK / Dev Connection.

BTW these normally looking json notifications - were they normally shown as notifications or you just see them stored but they weren't popping up on pebble (hence could potentially be empty malformed pins)?

MikeHG 2016-06-19 17:21

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

Originally Posted by ruff (Post 1507903)
BTW these normally looking json notifications - were they normally shown as notifications or you just see them stored but they weren't popping up on pebble (hence could potentially be empty malformed pins)?

They appeared just like normal notifications, complete with the watch buzzing. Just no text...

I didn't realise rebooting it would make them go away - I was just trying to get it to bring up a new one. Not much help for debugging though, sorry... :p

ruff 2016-06-19 20:19

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
pushed timeline7 beta. That includes UTF8 fix. Also it has TImeline Rest button - to resync timeline completely - including calendar and web pins.

I've found that when pebble resets it may lose certain pins. Web, calendar, reminders, whatever. However since they are stored locally and were acked - they are never redelivered. Also I've discovered that current timeline reset operation was a big mess, it basically didn't work. net result - timeline goes out of sync and there's no way to fix that (except of course stop daemon and wipe timeline folder).
So reset button does exactly that - wipes local storage, wipes watch pin blobdb, and requests resync from calendar and web.

DarthMax 2016-06-21 16:54

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

Originally Posted by ruff (Post 1507823)
timeline6 beta pushed to repo, that includes canned responses gui and gecko cache invalidation. Before it's mainlined would need some extensive testing, especially to pay attention to battery drain which I suspect might happen under certain conditions - which so far I'm unable to catch and/or reproduce under control/observation.
Maybe red herring though and drain is caused by something else - but apparently it happens from time to time to me now.

I would say that battery drain has increased significantly. I currently need to charge my phone twice a day (before every 1.5 days). However top says that max cpu usage of rockpool is ~1%

ruff 2016-06-21 19:43

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

Originally Posted by DarthMax (Post 1508094)
I would say that battery drain has increased significantly. I currently need to charge my phone twice a day (before every 1.5 days). However top says that max cpu usage of rockpool is ~1%

can you try timeline7 - i have increased wakeup timers there, just to compare.
Also does the increased drain happen disregarding whether websync is enabled or not (when sync account logged out websync is disabled)?

To my observation drain is inconsistent, I can spend whole day losing 10% and then for half an hour it eats remaining 90%. Mostly when there's connectivity problems (eg. in the tube)
Twice a day though is really hard case, i used to charge my jolla once a week, then twice a week (as battery wears out). Now when I'm debugging app it also discharges quite fast, but still, at least one or two days is what I consider normal :)

DarthMax 2016-06-21 21:34

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

Originally Posted by ruff (Post 1508112)
can you try timeline7 - i have increased wakeup timers there, just to compare.
Also does the increased drain happen disregarding whether websync is enabled or not (when sync account logged out websync is disabled)?

To my observation drain is inconsistent, I can spend whole day losing 10% and then for half an hour it eats remaining 90%. Mostly when there's connectivity problems (eg. in the tube)
Twice a day though is really hard case, i used to charge my jolla once a week, then twice a week (as battery wears out). Now when I'm debugging app it also discharges quite fast, but still, at least one or two days is what I consider normal :)

Okay I have installed it and will report later. If there is no change with the new version I will disable the web sync.

Jip it's quite annoying right now. Until recently the battery lastet about 2 days. Then I had a drop to about 1.5 days and now under one day. Once a week sounds awesome but I think that is not possible with alien dalvik activated :\

ruff 2016-06-22 08:58

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

Originally Posted by taixzo (Post 1507096)
nope, Saera currently uses Wit.ai as the optional speech recognition engine - google and AT&T are planned as options but not yet implemented.

I've reviewed google - too much overhead with their registration and stuff.
wit looks better although given that it's already linked to saera - see no reason to redo it natively.

The way I'm implementing transcription interaction now is following:
  1. Pebble sends voice setup request
  2. Rockpool receives request and attempts to create temp file where voice session will be dumped
  3. If temp file opening fails - it nacks request
  4. otherwise it acks request and emits dbus signal TranscriptionSessionStart(s:tempFile, s:format, s:appUuid)
  5. when first audio frame arrives it emits TranscriptionAudioStart(s:tempFile)
  6. when audioStop is received from pebble it flushes the file and emits TranscriptionAudioStop(s:tempFile) and fires up a timer for 4sec
  7. when TranscriptionResults(aass) is called timer is rearmed to 500ms
  8. till timer times out it collects additional results from other providers (if any), sorts results by confidence and after 500ms since first result it replies back with merged results
  9. finally sends TranscriptionSessionClosed(s:tempFile) and cleans up the mess
  10. when no results submitted over 4sec slot it replies back to pebble with RecognitionTimeout error, sends SessionClosed and cleans up the mess.
SessionStart format will be a string representation of the audio stream format in mime content-type form. Pebble now supports only speex so it will be "audio/speex; rate=16000; bitrate=12800; version=4; frame=320". appUuid will contain uuid of the application which initiated the transcription. will be empty (0-0-0-0-0) for system initiated (eg. response)

TranscriptionAudioStart - not sure if we need it, the idea is if transcription service can tail the file to speed up recognition. I doubt this is really possible so most probably will drop it.

TranscriptionResult aass structure will be a representation of native pebble transcription result structure, which is array of arrays of objects containing word and its confidence, eg. [ [ {"confidence":50, "word":"hello"}, {"confidence":50,"word":"world"} ], [ {"confidence":50, "word":"hello"}, {"confidence":40,"word":"word"} ] ]. That is - list of sentences, each sentence consisting of word:confidence pairs, word maybe printable word or punctuation mark.

At the moment going to dump raw speex bitstream to the file. Jolla has libspeex installed so technically could do stream decoding however apparently it should be performed in the platform integration, not libpebble (where it ends atm). And if I go for the platform - it would make sense to make at least one native implementation in the platform using some cloud service.

If anyone has any suggestion to improve/amend the interaction - please chime in.

ruff 2016-06-27 15:13

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Finishing voice endpoint and some clarifications revealed over the course of testing:
  • Pebble accepts just one sentence in reply, so rockpool will do sorting based on avg confidence (if there are more than one sentence in the reply) and send the highest one.
  • Pebble accepts recognition response only within two seconds window after audio stop. So rockpool will send response with timeout if there is no response for 1600ms after stop signal.

ruff 2016-07-07 05:56

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Some update on the current progress - which is going to land soon into next beta.

So voice endpoint as was written above is implemented. For now it will just send dictation result containing sentences "Noone dared to reply. Service timeout" as a proof of concept. However if anyone replies via dbus with proper results within allotted time slot - that result will replace the stub one.

Another feature addition is Pebble language support. Now you can change the language (and/or character set) of the Pebble watch from rockpool GUI. It uses official language packs from pebble fetching them using json API from bootstrap config provider.

Then there're several bugfixes.
Major one is daemon crash on call end - which improves daemon stability. Occasional crash on reconnect still remains though. But this one is less frequent.
Less obvious and not final yet is slight rework of timeline timers which fixes one of the high battery drains (the one I mentioned which happens in absence of internet).

Timeline power efficiency has not been completely resolved yet, which does not allow us to push it to mainline. That is - with timeline you may expect still "higher than usual" power consumption happening under certain unknown yet conditions.
Other known issues with timeline are pin re-delivery (fixing it now) and reminders not working properly (need yet to figure why). Once these are closed - new beta will be pushed,

ruff 2016-07-09 21:37

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
New beta posted, in addition to above-mentioned fixes I've also stepped up software release as communicated to pebble as well as extended protocol capabilities with Weather and SMS support. As result you would see new apps on pebble (Weather and Send SMS) - they however are not yet configurable so are quite useless till configuration protocol is implemented and hooked to GUI.

ruff 2016-07-11 14:27

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Found another issue with reminders where they were orphaned hence not allowing to execute any action except dismiss. With latest fix snooze and open work properly, snoozing the reminder and opening original calendar entry. Snooze works only in relation to pebble, not relaying information back to the phone yet - that part is not covered/documented in the libpebble so I'm currently reverse-engineering the protocol. Already found the way how to extract required info but still not clear what are options which are driving this particular reply format.
To get current calendar entries fixed would need to use Reset Timeline button to re-populate calendar to the timeline.
So new timeline9 beta now looks like a good candidate for another pull request.

MikeHG 2016-07-12 14:48

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I seem to be able to reliably crash the watch by phoning the Jolla, answering the call, then hitting the 'back' button on the Pebble while the call is ongoing.

Not sure if that's anything to do with Rockpool though (using 1.0-alpha1timeline9).

ruff 2016-07-12 17:42

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Yes, previously rockpool was crashing during such ops, now pebble is crashing instead. Rockpoold remains rock solid though :) I'm going to capture call progress on android to see what goes in and out, I think we miss some param or dialog which makes pebble crash. Previously it was getting nack due to daemon crash and hence survived.
Although it is intermittent, sometimes call goes through with no crash. Sometimes it crashes on call start, sometimes on call end.

Bundyo 2016-07-12 19:15

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
My pebble crashes on every call end :)

ruff 2016-07-17 09:05

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
The only difference I found between android and rockpool is that rockpool spams with phone progress messages while android just switches states. So if pebble internally lacks state machine implementation - such flood may cause it to hang/crash/reset
Eg. this is android session
Code:

Canceled:
I> 0016002104e48b9d12xxxxxxxxxxxxxxxxxxx
H< 0005002102e48b9d12
E> 0005002109e48b9d12

Answered:
I> 0016002104de290d48xxxxxxxxxxxxxxxxxxx
S> 0005002108de290d48
E> 0005002109de290d48

And this is rockpool
Code:

Canceled:
PhoneEndpoint> "045cd90b8dxxxxxxxxxxxxxx"
PhoneEndpoint< "025cd90b8d"
PhoneEndpoint> "095cd90b8d"
PhoneEndpoint> "095cd90b8d"

Answered:
PhoneEndpoint> "044e5bf8f8xxxxxxxxxxxxx"
PhoneEndpoint> "084e5bf8f8"
PhoneEndpoint> "084e5bf8f8"
PhoneEndpoint> "084e5bf8f8"
PhoneEndpoint> "094e5bf8f8"

So need to implement internal state machine in endpoint. Which means it would not support concurrent calls. Otherwise with dynamic call list - that list will be trashed with garbage over time.
Or actually state track could be implemented in platform which has visibility on active calls, so can clean up the mess.

ruff 2016-07-17 10:07

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Also seems I've spotted again that issue when on phone reboot watch is spammed with old messages. Cannot reliable reproduce it but i suspect this happens when
a) rockpoold starts very early
b) at this phase comhistoryd repopulates its events from persistent storage, emitting them on dbus.

Attempted to fix it by filtering out old events. I.e. if timestamp of event is out if timeline window - just ignore it (this actually is proper behaviour which was missing).
And if event is inside window - there two outcomes:
* If event is delivered to pebble and hence exists in persistent storage - will be ignored as duplicate.
* If event was discarded/dismissed/removed - it will be re-delivered to pebble (cant stop this to happen really).

ruff 2016-07-17 14:29

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Posted new beta with pebble crash on call fix, with stale messages fix (as above) and with new feature - Send Text message.

Send text applies as for ad-hock SMS sending using new builtin Send Text app for fav contacts, so to Call Manager app where you can reject the call with excuse SMS.

Setting these canned messages is currently not yet implemented, however you can connect pebble to android, set them and connect back to Jolla - jolla does not reset blobDBs with these configs so they are preserved from android.

Bundyo 2016-07-17 15:18

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Can confirm my Pebble doesn't crash after call now. Thanks! :)

mosen 2016-07-20 20:54

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
How could i contribute when wanting to correct german translation?
Is there a transifex link?
Awesome work guys!
All works smooth on Jolla C. Anything i could test for you, do you like to see any logs?

ruff 2016-07-21 19:16

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

Originally Posted by mosen (Post 1510221)
How could i contribute when wanting to correct german translation?

at the moment we don't have any community driven online service for translation management. I've posted request for free hosting to some - will see if anyone replies back.

For the testing - nothing specific atm, the only remaining concern so far is still power-profiling. As always - if you notice anything not working properly - there're basically 3 ways to collect logs - devel-su+journalctl, pebble sdk+devcon, stop service+run from cli.

thanks for feedback :)

HtheB 2016-07-21 20:09

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Any idea when the main package will be updated?

abranson 2016-07-21 20:28

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I just merged the latest changes, so I'll do it tomorrow. Maybe call it 1.0-beta? We should get to the bottom of the battery drain, and switch the logging off before it's final.

I can't quite believe how much ruff has done recently. A phenomenal amount of work. Thanks very much!

ruff 2016-07-22 19:07

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

Originally Posted by mosen (Post 1510221)
How could i contribute when wanting to correct german translation?

Got acceptance from weblate online project - so we can try to do it through this

mosen 2016-07-22 19:12

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
perfect, will do!

Edit, done!
Shortend some german sentences and corrected grammar and typos.

taixzo 2016-07-27 13:56

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Hi,

I'm trying to connect the Pebble to a freshly-installed OS. Rockpool says "No Pebble smart watches configured yet. Please connect your Pebble smart watch using System Settings." I went to System settings, enabled Bluetooth, and paired my Pebble. Returned to Rockpool and it still showed the same thing. Rebooted, still the same thing. How to I tell Rockpool that I've paired the watch?

abranson 2016-07-27 17:35

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

Originally Posted by taixzo (Post 1510970)
Hi,

I'm trying to connect the Pebble to a freshly-installed OS. Rockpool says "No Pebble smart watches configured yet. Please connect your Pebble smart watch using System Settings." I went to System settings, enabled Bluetooth, and paired my Pebble. Returned to Rockpool and it still showed the same thing. Rebooted, still the same thing. How to I tell Rockpool that I've paired the watch?

That happened to me - for some reason the pairing wouldn't work. I removed them on the watch and on the phone, repaired, and it worked.

taixzo 2016-07-27 17:50

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

Originally Posted by abranson (Post 1510993)
That happened to me - for some reason the pairing wouldn't work. I removed them on the watch and on the phone, repaired, and it worked.

I tried this several times, but it never showed up in Rockpool.

I note that in the Bluetooth screen on the watch, after pairing the connection still shows as "Now Discoverable".

abranson 2016-07-27 17:51

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
That just means it ready to pair with another device. Do you see the name of your phone in the list below?

taixzo 2016-07-27 18:56

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

Originally Posted by abranson (Post 1510997)
That just means it ready to pair with another device. Do you see the name of your phone in the list below?

Yep. I also tried renaming the phone in Bluetooth Settings and the new name showed up on the Pebble.

Feathers McGraw 2016-07-28 16:10

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I don't suppose you're using a Fairphone 2 or other port? The first time I pair after rebooting I have to restart rockpool before it recognises the watch is available via BT:

Code:

systemctl --user restart rockpoold
Assumed it was due to an imperfect port. If I walk in and out of range after pairing the first time it connects just fine automatically.

taixzo 2016-07-28 16:49

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I'm using a Nexus 5. I tried that, and now the watch says "connected" in the Pebble Bluetooth menu, but it still shows as "disconnected" in Rockpool (although the name of the watch is there now, and it shows an image of it).

abranson 2016-07-28 21:14

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
You don't by any chance have the old pebbled installed and running, do you? That was the case last time someone found themselves in that situation.

taixzo 2016-07-29 00:57

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

Originally Posted by abranson (Post 1511120)
You don't by any chance have the old pebbled installed and running, do you? That was the case last time someone found themselves in that situation.

How do I check? I don't remember installing such, unless it came with the Sailfish image. (which it may have, there were several preinstalled apps.)

ruff 2016-07-29 12:33

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

Originally Posted by taixzo (Post 1511130)
How do I check? I don't remember installing such, unless it came with the Sailfish image. (which it may have, there were several preinstalled apps.)

easiest way is to run cli (ssh/terminal) and do
Code:

ps axf|egrep 'pebble|rockpoold'
that should show
a) whether there's pebbled service running
b) how many instances of rockpoold are running

P.S. probably need to add a check for dbus before acquiring service path to avoid multiple instances running

mosen 2016-07-29 13:27

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
I have new observations on the "Rockpool crash/freeze when call ends on Jolla C"

Today i left my pebble at home but had rookpool service running.
I connected to my cheap Car Bluetooth, "Blaupunkt IF".
Got a call, ended it and had the same symptoms as if pebble was connected.
Jolla C froze for 2 minutes, i left it alone and it recovered without rebooting.
I stopped the service from Rockpool app -> developertools and tried again, no problem without rockpool running.
I will test with an Alpine unit in second car and Nokia Headset when i am @ home.

ruff 2016-07-29 14:12

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
yes, according to preliminary investigation the affected part is platform integration layer which is not bound to pebble connection. It is a glue between jolla's voicecall-ui/voicecall-manager which presumably causes the crash. I've just upgraded my os to 2.0.2.14 - will see if I experience same symptoms.

taixzo 2016-07-29 15:00

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

Originally Posted by ruff (Post 1511179)
easiest way is to run cli (ssh/terminal) and do
Code:

ps axf|egrep 'pebble|rockpoold'
that should show
a) whether there's pebbled service running
b) how many instances of rockpoold are running

P.S. probably need to add a check for dbus before acquiring service path to avoid multiple instances running

I got this:

Code:

[nemo@Jolla ~]$ ps ax | egrep 'pebble|rockpoold'
 9038 pts/1    S+    0:00 egrep pebble|rockpoold
21948 ?        Ssl    0:04 /usr/bin/rockpoold                                         
22114 ?        Ss    0:00 /usr/bin/invoker -o --type=qt5 /usr/bin/rockpoold

Are 21948 and 22114 two different instances?

ruff 2016-07-29 15:31

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

Originally Posted by taixzo (Post 1511196)
Are 21948 and 22114 two different instances?

No, they're representing the same service, invoker - to boost the process, and boosted process under maplauncher

when you watch is connected - in Bluetooth system settings is it also shown as connected?
or you can try in CLI
Code:

hcitool con
and see the connected devices.

taixzo 2016-07-29 18:31

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

hcitool con
returned nothing. I removed and re-paired the watch. Now, it shows
Code:

[nemo@Jolla ~]$ hcitool con
Connections:
        < ACL B0:B4:48:F6:EC:D2 handle 12 state 1 lm MASTER AUTH ENCRYPT

but now Rockpool is saying "No Pebble smartwatches configured yet."

Edit: I rebooted and now
Code:

hcitool con
is showing nothing again even though it shows the Pebble under "Paired devices." I'm thinking this is probably a bug with the Nexus 5 bluetooth. (Has anyone else with a Nexus 5 got Rockpool working?)

ruff 2016-07-29 19:05

Re: [Announce] Rockpool - Pebble daemon for Sailfish
 
Paired is not equal to connected. Paired means system knows the devce, knows how to connect to it (mac, profiles, auth key). Connected means the channel is actually established. Actual connection is triggered by rockpoold. If rockpoold does not see pebble it would not attempt to connect so paired but not connected after reboot is wrong but kind of expected based on your description.
To make a fresh start try following:
* stop rockpoold service (eg. disable in client)
* remove .local/share/rockpoold dir (eg. rm -rf .local/share/rockpoold) (this will remove all saved configuration of the rockpool. if any)
* Do not remove paired pebble in the system. Leave it as is. Or if you're not sure it's paired properly - you may again re-pair it, removing from both system and pebble existing connection.
* start rockpoold service again.

At this point rockpool should a) see it has no pebbles at all b) detect paired pebble in the system and add it internally, initiating connection.


All times are GMT. The time now is 08:13.

vBulletin® Version 3.8.8