Skip to content

Upgrade paho-mqtt to 1.2.1#6928

Merged
pvizeli merged 1 commit into
home-assistant:devfrom
fabaff:upgrade-paho-mqtt
Apr 4, 2017
Merged

Upgrade paho-mqtt to 1.2.1#6928
pvizeli merged 1 commit into
home-assistant:devfrom
fabaff:upgrade-paho-mqtt

Conversation

@fabaff
Copy link
Copy Markdown
Member

@fabaff fabaff commented Apr 4, 2017

1.2.1

  • Handle unicode username and passwords correctly.
  • Fix handling of invalid UTF-8 topics on incoming messages - the library now does not attempt to decode the topic - this will happen when the user accesses msg.topic in the on_message callback. If the topic is not valid UTF-8, an exception will be raised.
  • Fix issue with WebSocket connection in case of network issue (timeout or connection broken).
  • Fix issue with SSL connection, where latest incoming message may be delayed or never processed.
  • Fix possible message lost with publish.single and publish.multiple.

Tested with the following configuration:

mqtt:
  broker: localhost

binary_sensor:
  - platform: mqtt
    name: Bathroom door
    state_topic: "home/bathroom/door"
    payload_on: "1"
    payload_off: "0"
    device_class: opening
$ mosquitto_pub -h localhost -t "home/bathroom/door" -m 1
$ mosquitto_pub -h localhost -t "home/bathroom/door" -m 0

17-04-04 10:05:52 INFO (Thread-9) [homeassistant.components.mqtt] Received message on home/bathroom/door: 1
17-04-04 10:05:52 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.bathroom_door, new_state=<state binary_sensor.bathroom_door=on; friendly_name=ABCDE, device_class=opening @ 2017-04-04T10:05:52.465251+02:00>, old_state=<state binary_sensor.bathroom_door=off; friendly_name=ABCDE, device_class=opening @ 2017-04-04T10:05:19.030989+02:00>>
17-04-04 10:05:55 INFO (Thread-9) [homeassistant.components.mqtt] Received message on home/bathroom/door: 0
17-04-04 10:05:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.bathroom_door, new_state=<state binary_sensor.bathroom_door=off; friendly_name=ABCDE, device_class=opening @ 2017-04-04T10:05:55.450299+02:00>, old_state=<state binary_sensor.bathroom_door=on; friendly_name=ABCDE, device_class=opening @ 2017-04-04T10:05:52.465251+02:00>>

@mention-bot
Copy link
Copy Markdown

@fabaff, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @joncar and @pvizeli to be potential reviewers.

@pvizeli pvizeli merged commit 26e9e59 into home-assistant:dev Apr 4, 2017
@fabaff fabaff deleted the upgrade-paho-mqtt branch April 4, 2017 08:49
@fabaff fabaff mentioned this pull request Apr 6, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants