Dennis de Greef
1b23b32817
Use bundled certificates if port matches mqtts ( #6429 )
...
* Use bundled certificates if port matches mqtts
* Move import requests.certs to top, since it's used in more places
* Add happy and non-happy path tests for default certificate bundle on mqtts port
2017-03-05 14:08:29 -08:00
Paulus Schoutsen
2650c73a89
Split bootstrap into bs + setup ( #6416 )
...
* Split bootstrap into bs + setup
* Lint
2017-03-05 10:41:54 +01:00
Pascal Vizeli
55f8ec8866
Fix possibility that have multible topic subscribe mqtt ( #6372 )
2017-03-03 10:05:52 +01:00
Pascal Vizeli
31ddcc6278
Bugfix mqtt paho client to speend time ( #6266 )
2017-02-26 15:28:54 -08:00
Pascal Vizeli
5932446508
Bugfix mqtt socket error ( #6256 )
2017-02-26 14:43:02 -08:00
Fabian Affolter
9f2719bb1f
Update regex ( #6216 )
2017-02-25 12:55:01 -08:00
Pascal Vizeli
81ca978413
Move mqtt from eventbus to dispatcher / add unsub for dispatcher ( #6206 )
...
* Move mqtt from eventbus to dispatcher / add unsub for dispatcher
* Fix lint
* Fix test
* Fix lint v2
* fix dispatcher_send
2017-02-24 17:11:50 -08:00
Pascal Vizeli
b0d3bbed79
Convert mqtt platforms to async ( #6145 )
...
* Convert mqtt platforms to async
* fix lint
* add more platforms
* convert mqtt_eventstream
* fix lint / add mqtt_room
* fix lint
* fix test part 1
* fix test part 2
* fix out of memory bug
* address comments
2017-02-22 09:43:22 +01:00
Pascal Vizeli
1d7ab0fa95
Cleanup some async stuff ( #6127 )
...
* Cleanup some async stuff
* change to schedule_update_ha_state()
* fix media player
* fix zigbee
2017-02-20 13:24:03 -08:00
Paulus Schoutsen
25408941de
Mqtt fixes ( #6116 )
...
* Fix MQTT stop
* MQTT: Make sure to have connection setup at end of MQTT setup.
* Fix MQTT connect
2017-02-19 22:43:10 -08:00
Pascal Vizeli
e1cbd6b4c0
MQTT convert to async ( #6064 )
...
* Migrate mqtt to async
* address paulus comment / convert it complet async
* adress paulus comment / remove future
* Automation triggers should be async
* Fix MQTT async calls
* Show that event helpers are callbacks
* Fix tests
* Lint
2017-02-18 14:17:18 -08:00
Fabian Affolter
f82ac0af60
Enable sensor for discovery ( #5974 )
...
* Enable sensor for discovery
* Remove blank line
2017-02-13 23:54:13 -08:00
Fabian Affolter
b2fae212cb
Fix name ( #5912 )
2017-02-12 11:16:06 -08:00
Fabian Affolter
c7fd28c10f
MQTT discovery ( #5724 )
...
* Change implementation
* Re-write
* Remove unused consts
* Update discovery.py
* Add tests
* fix other tests
* Fix check_config script test
* Lint
* Lint
2017-02-07 09:13:24 -08:00
Johann Kellerman
4692ea85b7
[mqtt] Embedded MQTT server fix ( #5132 )
...
* Embedded MQTT server fix and schema
* feedback
2017-01-03 23:17:56 +01:00
Paulus Schoutsen
be91207830
Upgrade HBMQTT ( #4599 )
2016-11-27 12:21:20 -08:00
Paulus Schoutsen
d2bbc6ef70
Upgrade linter ( #4461 )
2016-11-18 21:47:59 -08:00
Fabian Affolter
944bb8474f
Change validation to optional ( #4400 )
2016-11-17 22:09:57 -08:00
bestlibre
1fff6ce438
Deduplicate MQTT_PUBLISH_SCHEMA definition ( #4411 )
2016-11-16 08:19:00 -08:00
Fabian Affolter
d5fff2f94a
Fix validation and use consts (mqtt)
2016-11-15 08:21:44 +01:00
bestlibre
0e0ba28249
support for last will and birth message for mqtt ( #4381 )
2016-11-14 22:18:33 -08:00
Paulus Schoutsen
2bfded7153
MQTT.Server will use HASS eventloop ( #3429 )
2016-11-10 22:45:38 -08:00
Michael
705814cb08
Catch all errors when doing mqtt message unicode-decode. ( #4143 )
...
* catch all errors when doing mqtt message unicode-decode.
* added AttributeError and UnicodeDecodeError to exception when decoding an mqtt message payload
2016-10-30 23:17:41 +01:00
Fabian Affolter
be272ac64a
Disable too-many-* ( #4107 )
...
* Disable too-many-* and too-few-public-methods
* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Johann Kellerman
57f32fa629
Fixup device_tracekt.mqtt voluptuous & unit tests ( #3904 )
2016-10-18 18:10:28 -07:00
Michael
ce19e6367f
Catch MQTT encoding errors ( #3749 )
...
* added error handling to mqtt message receive if payload is not utf-8 unicode
added mqtt test for above code as well
* change permission back to 644
* attempting to test new code
* changed exception to AttributeError
fixed test for above
* fixed lint errors I made in tests....mqtt/test_init.py
* more lint fixes for my added test
* remove dual decode of MQTT payload
* convert if to try, except, else statement for mqtt payload decode
* rework mqtt unicode testing code to properly check for log file entriy on unicode decode exception
* fixed lint error
* Update test_init.py
2016-10-14 21:08:44 -07:00
Paulus Schoutsen
5085cdb0f7
Add async_safe annotation ( #3688 )
...
* Add async_safe annotation
* More async_run_job
* coroutine -> async_save
* Lint
* Rename async_safe -> callback
* Add tests to core for different job types
* Add one more test with different type of callbacks
* Fix typing signature for callback methods
* Fix callback service executed method
* Fix method signatures for callback
2016-10-04 20:44:32 -07:00
Paulus Schoutsen
d58548dd1c
Address asyncio comments ( #3663 )
...
* Template platforms: create_task instead of yield from
* Automation: less yielding, more create_tasking
* Helpers.script: less yielding, more create_tasking
* Deflake logbook test
* Deflake automation reload config test
* MQTT: Use async_add_job and threaded_listener_factory
* Deflake other logbook test
* lint
* Add test for automation trigger service
* MQTT client can be called from within async
2016-10-03 22:39:27 -07:00
Paulus Schoutsen
16ff68ca84
Add mqtt.async_subscribe
2016-10-01 14:11:16 -07:00
Paulus Schoutsen
b650b2b0db
Spread async love ( #3575 )
...
* Convert Entity.update_ha_state to be async
* Make Service.call async
* Update entity.py
* Add Entity.async_update
* Make automation zone trigger async
* Fix linting
* Reduce flakiness in hass.block_till_done
* Make automation.numeric_state async
* Make mqtt.subscribe async
* Make automation.mqtt async
* Make automation.time async
* Make automation.sun async
* Add async_track_point_in_utc_time
* Make helpers.track_sunrise/set async
* Add async_track_state_change
* Make automation.state async
* Clean up helpers/entity.py tests
* Lint
* Lint
* Core.is_state and Core.is_state_attr are async friendly
* Lint
* Lint
2016-09-30 12:57:24 -07:00
Paulus Schoutsen
00e298206e
Optimize template 2 ( #3521 )
...
* Enforce compiling templates
* Refactor templates
* Add template validator to Logbook service
* Some more fixes
* Lint
* Allow easy skipping of rfxtrx tests
* Fix template bug in AND & OR conditions
* add entities extractor
Conflicts:
tests/helpers/test_template.py
* fix unittest
* Convert template to be async
* Fix Farcy
* Lint fix
* Limit template updates to related entities
* Make template automation async
2016-09-27 21:29:55 -07:00
Paulus Schoutsen
87e332c777
Merge pull request #2980 from home-assistant/automation-entities
...
Create entities for automation
2016-09-01 09:50:39 +01:00
Paulus Schoutsen
d9ecc4af64
EventBus: return function to unlisten
2016-08-25 23:25:35 -07:00
MartinHjelmare
e7b206da0c
Add MQTT gateway for MySensors
...
* Use mqtt component to enable a MySensors MQTT gateway.
* Setup the MQTT gateway if mysensors config has mqtt as a value for
the key device in the list of gateways.
* Simplify two lines in the mqtt component.
2016-08-24 10:48:55 +02:00
Fabian Affolter
38b0336694
Upgrade paho-mqtt to 1.2 ( #2339 )
2016-06-20 21:51:50 -07:00
Erik Eriksson
2f118c5327
log received mqtt messages ( #2031 )
2016-05-10 21:12:14 -07:00
Paulus Schoutsen
2a9c822454
Update HBMQTT ( #1998 )
2016-05-07 10:59:23 -07:00
Tim Harton
f6df5bc390
Mqtt client key auth ( #1935 )
...
* Made changes so that the mqtt configuration can accept client keys and certs for auth.
* Need to figure out how the broker_config works, it's failing tests
* Fixed it so all tests passed and ssl feature works for all brokers
which are't embedded
* Bring into line with pep8
* Added config validation which has allowed me to make the code simpler
2016-05-01 23:21:28 -07:00
gwendalg
2b7e1a2cc9
mqtt: Fix logic when embedded and broker configs are present. ( #1919 )
...
Fix test to prevent early exit of mqtt init handler when
both embedded and broker configs are present.
Signed-off-by: Gwendal Grignou <gwendal@gmail.com>
2016-04-26 12:17:56 +02:00
Fabian Affolter
85901d60c4
Update file header and fix typos
2016-04-13 13:50:28 +02:00
Jan Harkes
3aa4727b18
Fix for MQTT config validation on the protocol field. ( #1765 )
2016-04-09 09:03:41 -07:00
Jan Harkes
5b17f629ad
Test function for mqtt topic validators and IsFile() linting fix ( #1740 )
...
* Add test function for mqtt topic validators.
* Fix for linting error on vol.IsFile()
2016-04-07 13:52:25 -04:00
Josh Wright
3539193bae
vol.IsFile() needs to be called
...
vol.IsFile results in an instance of the IsFile method being returned by
the schema validation process. It needs to be called in order to do the
right thing.
2016-04-07 12:39:27 -04:00
Jan Harkes
3bc06ac79e
We need to allow extra keys on the top-level component config.
2016-04-07 00:42:56 -04:00
Jan Harkes
a7016e4b32
Move CONF_STATE_TOPIC, CONF_COMMAND_TOPIC and CONF_RETAIN to mqtt component.
2016-04-06 22:51:39 -04:00
Jan Harkes
4e864b5caa
Rename _mqtt_topic to valid_subscribe_topic.
2016-04-06 22:51:38 -04:00
Jan Harkes
2c119091dc
Add MQTT schema validation functions for platform schemas.
2016-04-06 22:51:38 -04:00
Jan Harkes
8cca2bb344
Config validation for MQTT
2016-04-06 22:51:38 -04:00
Paulus Schoutsen
e140e9b8ab
Add script + extra config validators
...
* Add config validation and extra validators
* Address PR comments
2016-04-03 10:19:09 -07:00
Paulus Schoutsen
7ed5055fa2
Fix MQTT linting
2016-04-03 02:25:02 -07:00
Jan Harkes
9ce2081110
Coerce ascii flags in MQTT publish service call.
...
Also fixes a bug where the test when no payload is given succeeds only
because we run the jinja templating out of memory. Sending an empty
payload instead of trying to fix it through validation for now.
2016-04-03 00:54:05 -07:00
Jan Harkes
5c753f8ffd
Service validation for MQTT component.
...
* Service validation for MQTT component.
* Fixes for failing mqtt tests.
- Changed behaviour when both 'payload' and 'payload_template' are provided
instead of silently ignoring the payload_template value.
- Have validation accept any type of payload and leave encoding to paho-mqtt.
2016-04-02 08:46:09 -07:00
Paulus Schoutsen
8386bda4e4
MQTT: Start embedded server if no config given
2016-03-12 21:42:47 -08:00
Fabian Affolter
582394bc3b
Modify import of template and PEP257
2016-02-23 21:19:22 +01:00
Paulus Schoutsen
b1f2c90bd0
Add MQTT service description
2016-02-10 21:23:27 -08:00
Flyte
4e0c7f8a3d
Create additional mqtt helper function for using template payload.
2016-02-10 22:38:33 +00:00
Flyte
d52e2019c0
Update mqtt.publish() function to use template_payload. Reorganise publish service. Use mqtt.publish() in tests.
2016-02-10 11:11:02 +00:00
Flyte
26fc637ab5
Add payload_template to mqtt 'publish' service call.
2016-02-09 15:41:31 +00:00
Flyte
4cf85294db
Add template support to mqtt.publish service payload.
2016-02-05 21:47:27 +00:00
Paulus Schoutsen
f97ba263c4
Allow forcing MQTT protocol v3.1
2016-01-19 09:00:40 -08:00
Paulus Schoutsen
8fbb585874
Fix MQTT reconnecting
2016-01-17 21:39:25 -08:00
Philip Lundrigan
9faedf0e67
Default to MQTT protocol v3.1.1 ( fix #854 )
2016-01-09 13:43:44 -07:00
Paulus Schoutsen
244fde880e
Convert MQTT event to lowercase
2015-12-27 16:31:52 -08:00
Paulus Schoutsen
9a9ecb5916
Migrate MQTT from jsonpath to templates
2015-12-10 21:39:01 -08:00
Fabian Affolter
7d503e3f8b
Update docstrings
2015-11-29 15:52:44 +01:00
Paulus Schoutsen
ad3f96fa25
Merge pull request #672 from balloob/some-cleanup
...
Make component dependencies optional
2015-11-27 15:08:22 -08:00
Paulus Schoutsen
fabd0ced3f
Make DEPENDENCIES optional for components
2015-11-26 13:11:59 -08:00
Pascal Bach
69e9d39690
Allow setting the retain flag for mqtt switch.
...
Some devices can read the initial value on startup.
If the retain flag is set they always receive the value as last set by
home assistant.
2015-11-26 21:03:21 +01:00
Fabian Affolter
3e60c4801c
Update docstrings
2015-11-25 08:56:50 +01:00
Paulus Schoutsen
1bda0bd73b
Add some MQTT tests
2015-11-22 16:04:16 -08:00
Paulus Schoutsen
f170799182
Reconnect when disconnected from MQTT
2015-11-22 15:19:51 -08:00
Oliver van Porten
100400f149
move requirements to single line to not to affect coverage
2015-11-22 16:28:21 +01:00
Oliver van Porten
90681c2dc9
fix incorrect requirements
2015-11-22 16:19:08 +01:00
Oliver van Porten
dbcd055cfe
move import of jsonpath-rw to c'tor of _JsonFmtParser
2015-11-22 16:18:05 +01:00
Oliver van Porten
715abf241e
Disable pylint warning for callable classes
2015-11-21 17:57:15 +01:00
Oliver van Porten
44714614ad
Fix unit tests for mqtt
2015-11-20 23:42:22 +01:00
Oliver van Porten
030686a978
fix flak8 warnings
2015-11-20 22:55:52 +01:00
Oliver van Porten
799043dc0a
refactor format mqtt format parser
2015-11-20 22:45:09 +01:00
Oliver van Porten
b4cf0e874a
Support parsing mqtt messages via jsonpath
2015-11-20 22:03:17 +01:00
Fabian Affolter
97f9f8aa49
Update link to docs (Jekyll 3 update)
2015-11-09 13:12:18 +01:00
Fabian Affolter
a8e2f9cbb7
Remove configuration details
2015-10-23 22:34:02 +02:00
Paulus Schoutsen
9292891836
Update documentation
2015-10-04 01:40:38 -07:00
Paulus Schoutsen
ad7f034805
MQTT: Auto provide cloudmqtt cert
2015-09-30 00:09:35 -07:00
Paulus Schoutsen
76674d4de9
MQTT: Allow certificates
2015-09-30 00:09:07 -07:00
Paulus Schoutsen
0dc9f2a9f8
Move MQTT to own folder
2015-09-29 23:55:16 -07:00