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 diff --git a/docs/configuring-playbook-matrix-bridge-sms.md b/docs/configuring-playbook-matrix-bridge-sms.md index c208bb816..99b4f6f05 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..a53056b7e 100644 --- a/roles/matrix-bridge-sms/defaults/main.yml +++ b/roles/matrix-bridge-sms/defaults/main.yml @@ -3,8 +3,7 @@ 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.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') }}" @@ -46,10 +45,12 @@ 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' matrix_sms_bridge_gammu_reset_frequency: 0 +matrix_sms_bridge_gammu_hard_reset_frequency: 0 matrix_sms_bridge_configuration_yaml: | @@ -70,6 +71,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 @@ -125,6 +127,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 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"