fablabbcn / smartcitizen-api

The Smart Citizen Engine
https://developer.smartcitizen.me
GNU Affero General Public License v3.0
10 stars 4 forks source link

Add possibility to connect via ssl to broker #245

Closed oscgonfer closed 1 year ago

oscgonfer commented 1 year ago

This PR adds the possibility to connect via 1883 default port to mqtt broker in lib/task/mqtt-subscriber.rake, or to add an extra env variable in .env that would allow for a ssl connection through another port.

oscgonfer commented 1 year ago

tested with staging api and working OK!

I, [2023-07-06T13:40:22.641275 #1] INFO -- : MQTT TASK STARTING I, [2023-07-06T13:40:22.641657 #1] INFO -- : clean_session: false I, [2023-07-06T13:40:22.641688 #1] INFO -- : client_id: ** I, [2023-07-06T13:40:22.641704 #1] INFO -- : host: .smartcitizen.me I, [2023-07-06T13:40:22.641718 #1] INFO -- : port: I, [2023-07-06T13:40:22.641732 #1] INFO -- : ssl: true I, [2023-07-06T13:40:22.848133 #1] INFO -- : Connected to ****.smartcitizen.me I, [2023-07-06T13:40:22.848725 #1] INFO -- : Using clean_session setting: false