Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c63deb0
Update README.md
appzer Mar 11, 2023
b67552c
Update README.md
appzer Mar 11, 2023
6ec76ad
Update PushsaferAccountConfiguration.java
appzer Mar 11, 2023
8feeb8a
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
12b8767
Update PushsaferAccountHandler.java
appzer Mar 11, 2023
cba35dd
Update PushsaferBindingConstants.java
appzer Mar 11, 2023
808aa91
Update addon.xml
appzer Mar 11, 2023
857b2ca
Update config.xml
appzer Mar 11, 2023
400f1c4
Update pushsafer.properties
appzer Mar 11, 2023
3477b7d
Update pushsafer_de.properties
appzer Mar 11, 2023
47709bb
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
9c68e4f
Update README.md
appzer Mar 11, 2023
cb985a8
Update README.md
appzer Mar 11, 2023
5599186
Update PushsaferBindingConstants.java
appzer Mar 11, 2023
5e90764
Update PushsaferAccountConfiguration.java
appzer Mar 11, 2023
b715a35
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
7bfc16b
Update PushsaferAccountHandler.java
appzer Mar 11, 2023
5d8ff14
Update addon.xml
appzer Mar 11, 2023
b5d08e5
Update config.xml
appzer Mar 11, 2023
a3c3b35
Update pushsafer.properties
appzer Mar 11, 2023
94b0640
Update pushsafer_de.properties
appzer Mar 11, 2023
862116a
Update README.md
appzer Mar 11, 2023
5b21355
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
ee8012b
Update addon.xml
appzer Mar 11, 2023
5de67fc
Add files via upload
appzer Mar 16, 2023
d86fd0f
Add files via upload
appzer Mar 16, 2023
1036bf2
Update addon.xml
appzer Mar 16, 2023
02ced18
Update addon.xml
appzer Mar 16, 2023
5551e94
Add files via upload
appzer Apr 15, 2023
6f97c38
Add files via upload
appzer Apr 15, 2023
6ff7ead
Update PushsaferAccountConfiguration.java
appzer Mar 11, 2023
5bc70bb
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
a32cf52
Update PushsaferAccountHandler.java
appzer Mar 11, 2023
1878b8c
Update PushsaferBindingConstants.java
appzer Mar 11, 2023
e38dd95
Update addon.xml
appzer Mar 11, 2023
bd33e08
Update config.xml
appzer Mar 11, 2023
04418ed
Update pushsafer.properties
appzer Mar 11, 2023
7211f49
Update pushsafer_de.properties
appzer Mar 11, 2023
c4b7722
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
bccc640
Update README.md
appzer Mar 11, 2023
2079697
Update README.md
appzer Mar 11, 2023
fe3ad48
Update PushsaferMessageBuilder.java
appzer Mar 11, 2023
31baf0b
Update addon.xml
appzer Mar 11, 2023
542c08b
Add files via upload
appzer Mar 16, 2023
ae3a1e9
Add files via upload
appzer Mar 16, 2023
fbc3024
Update addon.xml
appzer Mar 16, 2023
d11d163
Update addon.xml
appzer Mar 16, 2023
a542bc3
Add files via upload
appzer Apr 15, 2023
700e8d7
Merge branch 'main' of https://github.com/Pushsafer/openhab-addons
appzer Apr 15, 2023
b16761d
Merge branch 'main' into pr/14578
lsiepel Sep 29, 2024
dfeb831
Merge branch 'openhab:main' into main
lsiepel Mar 22, 2025
5e31eb3
Trivial change
lsiepel Mar 22, 2025
bbc3e0f
Fix attempt 1
lsiepel Mar 26, 2025
7f27975
Add config again
lsiepel Mar 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.pushsafer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ You are able to create multiple instances of this Thing to broadcast to differen
| `confirm` | integer | Integer 10-10800 (10s steps) Time in seconds after which a message should be sent again before it is confirmed. (default: `0`). **advanced** |
| `time2live` | integer | Time in minutes, after a message automatically gets purged (default: `0`). **advanced** |
| `answer` | integer | 1 = enables reply to push notifications (default: `0`). **advanced** |
| `answeroptions` | text | specify predefined answer options divided by a pipe character, e.g. Yes|No|Maybe **advanced** |
| `answerforce` | integer | 1 = force an answer. The user will be prompted to answer, the message will be open directly. (default: `0`). **advanced** |

The `retry` and `expire` parameters are only used for emergency-priority notifications.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public class PushsaferBindingConstants {
public static final String DEFAULT_VIBRATION = "1";
public static final int DEFAULT_CONFIRM = 0;
public static final boolean DEFAULT_ANSWER = false;
public static final String DEFAULT_ANSWEROPTIONS = "";
public static final boolean DEFAULT_ANSWERFORCE = false;
public static final int DEFAULT_TIME2LIVE = 0;
public static final String DEFAULT_TITLE = "openHAB";
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public class PushsaferAccountConfiguration {
public String url = DEFAULT_URL;
public String urlTitle = DEFAULT_URLTITLE;
public boolean answer = DEFAULT_ANSWER;
public String answeroptions = DEFAULT_ANSWEROPTIONS;
public boolean answerforce = DEFAULT_ANSWERFORCE;
public int confirm = DEFAULT_CONFIRM;
public int time2live = DEFAULT_TIME2LIVE;
public String vibration = DEFAULT_VIBRATION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public class PushsaferMessageBuilder {
private static final String MESSAGE_KEY_SOUND = "s";
private static final String MESSAGE_KEY_TIME2LIVE = "l";
private static final String MESSAGE_KEY_ANSWER = "a";
private static final String MESSAGE_KEY_ANSWEROPTIONS = "ao";
private static final String MESSAGE_KEY_ANSWERFORCE = "af";
private static final String MESSAGE_KEY_CONFIRM = "cr";
private static final String MESSAGE_KEY_ATTACHMENT = "p";
public static final String MESSAGE_KEY_HTML = "html";
Expand Down Expand Up @@ -90,6 +92,8 @@ public class PushsaferMessageBuilder {
private int confirm;
private int time2live;
private boolean answer;
private @Nullable String answeroptions;
private boolean answerforce;
private @Nullable String color;
private @Nullable String vibration;
private @Nullable String attachment;
Expand Down Expand Up @@ -180,6 +184,16 @@ public PushsaferMessageBuilder withAnswer(boolean answer) {
this.answer = answer;
return this;
}

public PushsaferMessageBuilder withAnswerForce(boolean answerforce) {
this.answerforce = answerforce;
return this;
}

public PushsaferMessageBuilder withAnswerOptions(String answeroptions) {
this.answeroptions = answeroptions;
return this;
}

public PushsaferMessageBuilder withTime2live(int time2live) {
this.time2live = time2live;
Expand Down Expand Up @@ -306,6 +320,10 @@ public ContentProvider build() throws PushsaferCommunicationException {
body.addFieldPart(MESSAGE_KEY_CONFIRM, new StringContentProvider(String.valueOf(confirm)), null);

body.addFieldPart(MESSAGE_KEY_ANSWER, new StringContentProvider(String.valueOf(answer)), null);

body.addFieldPart(MESSAGE_KEY_ANSWEROPTIONS, new StringContentProvider(String.valueOf(answeroptions)), null);

body.addFieldPart(MESSAGE_KEY_ANSWERFORCE, new StringContentProvider(String.valueOf(answerforce)), null);

body.addFieldPart(MESSAGE_KEY_TIME2LIVE, new StringContentProvider(String.valueOf(time2live)), null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ public PushsaferMessageBuilder getDefaultPushsaferMessageBuilder(String message)
if (DEFAULT_ANSWER != config.answer) {
builder.withAnswer(config.answer);
}
// add answeroptions if defined
if (DEFAULT_ANSWEROPTIONS != config.answeroptions) {
builder.withAnswerOptions(config.answeroptions);
}
// add answerforce if defined
if (DEFAULT_ANSWERFORCE != config.answerforce) {
builder.withAnswerForce(config.answerforce);
}
// add time2live if defined
if (DEFAULT_TIME2LIVE != config.time2live) {
builder.withTime2live(config.time2live);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<type>binding</type>
<name>Pushsafer Binding</name>
<description>With Pushsafer you can send &amp; receive push notifications in real time, easily and securely on your
iPhone, iPad, Android, Windows mobile or Windows desktop device as well as on your browser (Chrome, Firefox, Opera
iPhone, iPad, Android, Windows mobile or Windows desktop device, Telegram as well as on your browser (Chrome, Firefox, Opera
&amp; Yandex)!</description>

</addon:addon>
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@
<description>true = Enable reply to push notifications, false otherwise.</description>
<default>false</default>
</parameter>
<parameter name="answeroptions" type="text">
<advanced>true</advanced>
<label>Answer Options</label>
<description>specify predefined answer options divided by a pipe character, e.g. Yes|No|Maybe</description>
</parameter>
<parameter name="answerforce" type="boolean">
<advanced>true</advanced>
<label>Answer Force</label>
<description>true = force an answer. The user will be prompted to answer, the message will be open directly.</description>
<default>false</default>
</parameter>
</config-description>

</config-description:config-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ thing-type.pushsafer.pushsafer-account.description = Provides access to the Push

thing-type.config.pushsafer.pushsafer-account.answer.label = Answer
thing-type.config.pushsafer.pushsafer-account.answer.description = true = Enable reply to push notifications, false otherwise.
thing-type.config.pushsafer.pushsafer-account.answeroptions.label = Answer Options
thing-type.config.pushsafer.pushsafer-account.answeroptions.description = specify predefined answer options divided by a pipe character, e.g. Yes|No|Maybe.
thing-type.config.pushsafer.pushsafer-account.answerforce.label = Answer Force
thing-type.config.pushsafer.pushsafer-account.answerforce.description = true = force an answer. The user will be prompted to answer, the message will be open directly.
thing-type.config.pushsafer.pushsafer-account.apikey.label = Private or Alias Key
thing-type.config.pushsafer.pushsafer-account.apikey.description = Your Private or Alias to access the Pushsafer Message API.
thing-type.config.pushsafer.pushsafer-account.color.label = Icon Color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ thing-type.pushsafer.pushsafer-account.description = Ermöglicht den Zugriff auf

thing-type.config.pushsafer.pushsafer-account.answer.label = Antwort
thing-type.config.pushsafer.pushsafer-account.answer.description = true \= Aktiviere Antworten auf Push-Benachrichtigungen, sonst false.
thing-type.config.pushsafer.pushsafer-account.answeroptions.label = Antwort Optionen
thing-type.config.pushsafer.pushsafer-account.answeroptions.description = vordefinierte Antwortmöglichkeiten getrennt mit einem Pipe-Zeichen z.B. Ja|Nein|Vielleicht.
thing-type.config.pushsafer.pushsafer-account.answerforce.label = Antwort erzwingen
thing-type.config.pushsafer.pushsafer-account.answerforce.description = true \= erzwingt eine Antwort, der Nutzer wird aufgefordert zu antworten, die Nachricht wird direkt geöffnet, sonst false.
thing-type.config.pushsafer.pushsafer-account.apikey.label = Privater Schlüssel
thing-type.config.pushsafer.pushsafer-account.apikey.description = Ihr privater Schlüssel für den Zugriff auf die Pushsafer Nachrichten-API.
thing-type.config.pushsafer.pushsafer-account.color.label = Icon-Farbe
Expand Down