We have moved to a new Sailfish OS Forum. Please start new discussions there.
16

How can I repair/bypassed the new bug in the application Situations2 after update OS to 2.1.1.26? [answered]

asked 2017-09-01 23:09:20 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2017-09-09 00:32:04 +0200

olf gravatar image

After the OS update to 2.1.1.26 my important Sailfish App "Situations2" had two problems. The actions switch on/off WLAN and BT doesen't work. I ask the developer "PastilliLabs" and got follow answer: "Latest Sailfish release does not allow third parties to control WLAN & BT...Currently it cannot be fixed on application side" Can I manage this problem by myself?

A other older problem is that PastilliLabs unfortunately can not create the same calendar function as in the Android version (switch silent if a calendar event), because the calendar is not compatible. What is the best way to fix this or had anybody a othe app? I use HARBOUR-SITUATIONS2APPLICATION-2.6.114-114. Here's the answer from PastilliLabs: "Unfortunately Sailfish does not provide a working calendar API for 3rd parties, so currently there is no way to make it work..."

The best solution or better idea would be that Sailfish take over all features into Ambience. I mean auto change ambience by calendar entries, time, battery status and free selectable actions like loudness, screen brightness, WLAN, BT, mobile network etc. But temporarily would help me as I can restore the access via Situations2 on WLAN and BT again.

Thanks in advance

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Ralf
close date 2017-09-15 00:40:24.919211

Comments

On SFOS warehouse provide feedback to the Situations developer on new SFOS updatw and making it compatible.

DarkTuring ( 2017-09-01 23:37:46 +0200 )edit
3

@DarkTuring: @Ralf clearly wrote in the first paragraph that he was already in contact with the developer, who informed him it's apparently a new Sailfish OS limitation for third parties.

nthn ( 2017-09-02 00:07:49 +0200 )edit
1

I noticed the same behaviour since I use Situations to enable WiFi based on my location. Hopefully there will be a fix for this or Jolla re-enables this option. Running around with WiFi turned on all the time is a real privacy disaster :(

ghling ( 2017-09-02 10:09:43 +0200 )edit
1

Maybe we can write a script and start this with the action command line from Situations. In the moment I use this to play a sound if the profile will change. For play a sound I use follow line: paplay /home/nemo/Music/Situation/ZuHause.wav this is certainly also interesting for other users. In MeeGo was it only aplay /pfad/*.wav I will look if I found the right line for WLAN and BT and becouse I a beginner. And then I need the line to start this script. Just I have to learn to write this kind of scripts. I am a expert in Visual Basic but not in linux scripting. We get in contact... Thanks all in advance who has a solution until the problem is solved by the developer.

Ralf ( 2017-09-02 10:35:09 +0200 )edit
2

on the evening I will test the followings: command line: sudo /home/nemo/atwork.sh My first script:

# script At Work
#!/bin/sh
# play my ambience sound
paplay /home/nemo/Music/Situation/atwork.wav
# switch off WLAN
dbus-send --system --print-reply --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:"Powered" variant:boolean:false

I hope it is right. Maybe anybody can correct the false parts? For BT I can't found a line :o(

Ralf ( 2017-09-02 11:22:19 +0200 )edit

4 Answers

Sort by » oldest newest most voted
4

answered 2017-09-13 01:34:56 +0200

Schturman gravatar image

updated 2017-09-13 02:44:06 +0200

Simple WIFI on/off:https://openrepos.net/content/schturman/simple-wifi-onoff
Quick BT on/off:https://openrepos.net/content/schturman/quick-bt-onoff
Patch: BT timer (Only ON):https://openrepos.net/content/schturman/patch-bt-timer-only
Quick Internet on/off (both wifi and 3g):https://openrepos.net/content/schturman/quick-internet-onoff

Enjoy :).

edit flag offensive delete publish link more

Comments

Thank you very mutch!!! You are a hero for me.

If you allow me, I try to modify Wifi On/Off in two different apps? One for wifi on and one for wifi off because athome only on and at work should be switch off. With toggle it is not a safe solution that it can work in the false direction.

Now only one feature is not solved for Situations on Jolla C. On N9 I could controll the profile or now ambience with calendar events to make silent in meetings. Is there also a easy solution possible? It don't have to be with a key word. The developer wrote me that is not possible. I tryed also to make a solution, but without positive results.

Ralf ( 2017-09-13 16:11:29 +0200 )edit

If you want to use command separately for On and OFF, use it in Situations app:
For Start WIFI:
/usr/share/openrepos-wifionoff/start-wifi-root

For Stop WIFI:
/usr/share/openrepos-wifionoff/stop-wifi-root

About silent profile, as far as I remember the Situation app can change the Ambience and also Silent profile...

Schturman ( 2017-09-13 21:15:44 +0200 )edit

Thank you for this useful tip - I have not known that I can use more than one command line in Situations. It’s also a good solution. In the moment I create two files.desktop in /usr/share(applications/ and new scripts. To the silent mode - yes I am already changing the Ambiences with Situation but I wish that it works automatically controlled from calendar events. E.g. if starts a meeting at work my phone switch without me automatically to Ambience Meeting and is silent.

Ralf ( 2017-09-13 21:55:24 +0200 )edit

Hmm Situations don't have calendar events option. You probably need to create script for this...

Schturman ( 2017-09-13 23:59:07 +0200 )edit

@Schturman is there a chance you also create a "simple flightmode on/off" app? ;) so all possible situations could be covered...

breiti_oi ( 2017-10-12 12:33:36 +0200 )edit
1

answered 2017-09-12 09:03:25 +0200

pawel gravatar image

In openrepos you will find something like connect to Internet, made by schturman. install it and see if you can trigger it via situations. This app runs like a statemachine. All off, mobile, WiFi and mobile, all off. it is pretty simple to modify the file on your phone to do WiFi on off only. Was my first experience with 'coding' in sailfish.

edit flag offensive delete publish link more
0

answered 2017-09-13 20:31:04 +0200

pawel gravatar image

https://together.jolla.com/question/88643/question-how-can-i-switch-ambiences-from-terminal/

edit flag offensive delete publish link more
0

answered 2017-09-13 22:42:29 +0200

pawel gravatar image

regarding events: this might help

https://together.jolla.com/question/25537/how-to-trigger-shell-scripts-on-dbus-event/

edit flag offensive delete publish link more

Question tools

Follow
8 followers

Stats

Asked: 2017-09-01 23:09:20 +0200

Seen: 1,301 times

Last updated: Sep 13 '17