Skip to content

Conversation

@LePailleurThibault
Copy link
Contributor

…cs in mqtt.

Some brokers (like AWS iot core) do not support retain messages. Add option to transport to specify if the retain is supported by broker.

New MQTT topics can be used in the case where the mqtt broker does not support retained message and we would like to know the status of the gateways as soon as possible.

The concerned topics in the mqtt broker are :
gw-request/get_gw_status
gw-response/get_gw_status//

Closes # .

Brief pull request description

file_vars["gateway_version"] = env_vars["WM_GW_VERSION"]
file_vars["ignored_endpoints_filter"] = env_vars["WM_GW_IGNORED_ENDPOINTS_FILTER"]
file_vars["whitened_endpoints_filter"] = env_vars["WM_GW_WHITENED_ENDPOINTS_FILTER"]
file_vars["mqtt_retain_flag_supported"] = env_vars["WM_SERVICES_MQTT_RETAIN_FLAG_SUPPORTED"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black would make changes.
line too long (92 > 79 characters)

Copy link
Contributor

@pgaucherand pgaucherand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment from, otherwise looks good.

…cs in mqtt.

Some brokers (like AWS iot core) do not support retain messages.
Add option to transport to specify if the retain is supported by broker.

New MQTT topics can be used in the case where the mqtt broker does not support retained message
and we would like to know the status of the gateways as soon as possible.

The concerned topics in the mqtt broker are :
gw-request/get_gw_status
gw-response/get_gw_status/<gw-id>/<sink-id>
…tus branch to suppress it and simplify branches) + PR#236
file_vars["gateway_version"] = env_vars["WM_GW_VERSION"]
file_vars["ignored_endpoints_filter"] = env_vars["WM_GW_IGNORED_ENDPOINTS_FILTER"]
file_vars["whitened_endpoints_filter"] = env_vars["WM_GW_WHITENED_ENDPOINTS_FILTER"]
file_vars["mqtt_retain_flag_not_supported"] = env_vars["WM_SERVICES_MQTT_RETAIN_FLAG_NOT_SUPPORTED"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black would make changes.
line too long (100 > 79 characters)

self.data_event_id = None

if not self.retain_supported:
logging.info("Gateway status is sent every %d seconds", settings.mqtt_send_gateway_status_period_s)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (111 > 79 characters)


self.mqtt.add_argument(
"--mqtt_send_gateway_status_period_s",
default=os.environ.get("WM_SERVICES_MQTT_SEND_GATEWAY_STATUS_PERIOD_S", 20),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)


self.mqtt.add_argument(
"--mqtt_retain_flag_not_supported",
default=os.environ.get("WM_SERVICES_MQTT_RETAIN_FLAG_NOT_SUPPORTED", False),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants