From 77fd23149bb6e4cc24cfa71eebc7a3e1b8a90bc3 Mon Sep 17 00:00:00 2001 From: benkuly <12199167+benkuly@users.noreply.github.com> Date: Sat, 6 Jun 2020 08:28:08 +0200 Subject: [PATCH 1/5] added gammu hard reset for sms modem --- docs/configuring-playbook-matrix-bridge-sms.md | 3 ++- roles/matrix-bridge-sms/defaults/main.yml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/configuring-playbook-matrix-bridge-sms.md b/docs/configuring-playbook-matrix-bridge-sms.md index 2809fb038..8a91ab933 100644 --- a/docs/configuring-playbook-matrix-bridge-sms.md +++ b/docs/configuring-playbook-matrix-bridge-sms.md @@ -18,8 +18,9 @@ matrix_sms_bridge_gammu_modem: "/dev/serial/by-id/myDeviceId" matrix_sms_bridge_database_password: "" # (optional) a room id to a default room matrix_sms_bridge_default_room: "" -# (optional) gammu reset frequency (see https://wammu.eu/docs/manual/smsd/config.html#option-ResetFrequency) +# (optional) gammu reset frequencies (see https://wammu.eu/docs/manual/smsd/config.html#option-ResetFrequency) matrix_sms_bridge_gammu_reset_frequency: 3600 +matrix_sms_bridge_gammu_hard_reset_frequency: 0 # (optional) group with unix read and write rights to modem matrix_sms_bridge_modem_group: 'dialout' ``` diff --git a/roles/matrix-bridge-sms/defaults/main.yml b/roles/matrix-bridge-sms/defaults/main.yml index 4019f7be0..77435be84 100644 --- a/roles/matrix-bridge-sms/defaults/main.yml +++ b/roles/matrix-bridge-sms/defaults/main.yml @@ -50,6 +50,7 @@ matrix_sms_bridge_default_room: '' matrix_sms_bridge_gammu_modem: '' matrix_sms_bridge_modem_group: 'dialout' matrix_sms_bridge_gammu_reset_frequency: 0 +matrix_sms_bridge_gammu_hard_reset_frequency: 0 matrix_sms_bridge_configuration_yaml: | @@ -125,6 +126,7 @@ matrix_sms_bridge_gammu_configuration: | OutboxFormat = detail TransmitFormat = auto ResetFrequency = {{ matrix_sms_bridge_gammu_reset_frequency }} + HardResetFrequency = {{ matrix_sms_bridge_gammu_hard_reset_frequency }} debugLevel = 1 LogFile = /data/log/smsd.log DeliveryReport = no From 11e53c4fbc2d93d7b7d254b58bb0b56431201a67 Mon Sep 17 00:00:00 2001 From: benkuly <12199167+benkuly@users.noreply.github.com> Date: Thu, 11 Jun 2020 15:37:46 +0200 Subject: [PATCH 2/5] add default region --- roles/matrix-bridge-sms/defaults/main.yml | 6 ++++-- roles/matrix-bridge-sms/tasks/validate_config.yml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/matrix-bridge-sms/defaults/main.yml b/roles/matrix-bridge-sms/defaults/main.yml index 77435be84..d940a2f40 100644 --- a/roles/matrix-bridge-sms/defaults/main.yml +++ b/roles/matrix-bridge-sms/defaults/main.yml @@ -3,8 +3,8 @@ matrix_sms_bridge_enabled: true -matrix_sms_bridge_docker_image: "folivonet/matrix-sms-bridge:latest" -matrix_sms_bridge_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':latest') }}" +matrix_sms_bridge_docker_image: "folivonet/matrix-sms-bridge:0.2.0.RELEASE" +matrix_sms_bridge_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':0.2.0.RELEASE') }}" matrix_sms_bridge_database_docker_image: "neo4j:latest" matrix_sms_bridge_database_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':latest') }}" @@ -46,6 +46,7 @@ matrix_sms_bridge_homeserver_port: '8008' matrix_sms_bridge_homserver_domain: "{{ matrix_domain }}" matrix_sms_bridge_default_room: '' +matrix_sms_bridge_default_region: '' matrix_sms_bridge_gammu_modem: '' matrix_sms_bridge_modem_group: 'dialout' @@ -71,6 +72,7 @@ matrix_sms_bridge_configuration_yaml: | # (optional) SMS messages without a valid token a routed to this room. # Note that you must invite @smsbot:yourHomeServer to this room. defaultRoomId: "{{ matrix_sms_bridge_default_room }}" + defaultRegion: "{{ matrix_sms_bridge_default_region }}" provider: gammu: # (optional) default is disabled diff --git a/roles/matrix-bridge-sms/tasks/validate_config.yml b/roles/matrix-bridge-sms/tasks/validate_config.yml index 8eb7b63c5..23fc8a23f 100644 --- a/roles/matrix-bridge-sms/tasks/validate_config.yml +++ b/roles/matrix-bridge-sms/tasks/validate_config.yml @@ -10,3 +10,4 @@ - "matrix_sms_bridge_homeserver_token" - "matrix_sms_bridge_database_password" - "matrix_sms_bridge_gammu_modem" + - "matrix_sms_bridge_default_region" From e44cc9e2a17f8767028f0f379174577468433753 Mon Sep 17 00:00:00 2001 From: benkuly <12199167+benkuly@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:11:24 +0200 Subject: [PATCH 3/5] added changelog of sms bridge --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3899f351..799ac45e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 2020-06-11 + +## SMS bridging requires db reset + +The current version of [matrix-sms-bridge](https://github.com/benkuly/matrix-sms-bridge) needs you to delete the database to work as expected. Just remove `/matrix/matrix-sms-bridge/database/*`. It also adds a new requried var `matrix_sms_bridge_default_region`. + +To reuse your existing rooms, invite `@smsbot:yourServer` to the room or write a message. You are also able to use automated room creation with telephonenumers by writing `sms send -t 01749292923 "Hello World"` in a room with `@smsbot:yourServer`. See [the docs](https://github.com/benkuly/matrix-sms-bridge) for more information. + # 2020-06-05 ## SMS bridging support From a0661a60120538ba124b75742100f2e8551ec9ba Mon Sep 17 00:00:00 2001 From: benkuly <12199167+benkuly@users.noreply.github.com> Date: Fri, 12 Jun 2020 08:37:08 +0200 Subject: [PATCH 4/5] updated sms bridge docker image --- roles/matrix-bridge-sms/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/matrix-bridge-sms/defaults/main.yml b/roles/matrix-bridge-sms/defaults/main.yml index d940a2f40..00f3255bd 100644 --- a/roles/matrix-bridge-sms/defaults/main.yml +++ b/roles/matrix-bridge-sms/defaults/main.yml @@ -3,8 +3,8 @@ matrix_sms_bridge_enabled: true -matrix_sms_bridge_docker_image: "folivonet/matrix-sms-bridge:0.2.0.RELEASE" -matrix_sms_bridge_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':0.2.0.RELEASE') }}" +matrix_sms_bridge_docker_image: "folivonet/matrix-sms-bridge:0.2.1.RELEASE" +matrix_sms_bridge_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':0.2.1.RELEASE') }}" matrix_sms_bridge_database_docker_image: "neo4j:latest" matrix_sms_bridge_database_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':latest') }}" From d49ee510350834f5f4da32234b28432b3f0194c1 Mon Sep 17 00:00:00 2001 From: benkuly <12199167+benkuly@users.noreply.github.com> Date: Fri, 12 Jun 2020 10:23:51 +0200 Subject: [PATCH 5/5] remove force pull matrix-sms-bridge docker image --- roles/matrix-bridge-sms/defaults/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/matrix-bridge-sms/defaults/main.yml b/roles/matrix-bridge-sms/defaults/main.yml index 00f3255bd..a53056b7e 100644 --- a/roles/matrix-bridge-sms/defaults/main.yml +++ b/roles/matrix-bridge-sms/defaults/main.yml @@ -4,7 +4,6 @@ matrix_sms_bridge_enabled: true matrix_sms_bridge_docker_image: "folivonet/matrix-sms-bridge:0.2.1.RELEASE" -matrix_sms_bridge_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':0.2.1.RELEASE') }}" matrix_sms_bridge_database_docker_image: "neo4j:latest" matrix_sms_bridge_database_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':latest') }}"