Skip to content

Add initial support for Shiftr.io#7974

Merged
fabaff merged 4 commits into
home-assistant:devfrom
fabaff:shiftr
Jun 17, 2017
Merged

Add initial support for Shiftr.io#7974
fabaff merged 4 commits into
home-assistant:devfrom
fabaff:shiftr

Conversation

@fabaff
Copy link
Copy Markdown
Member

@fabaff fabaff commented Jun 9, 2017

Description:

This component simply make the events from Home Assistant available in the communication infrastructure on shiftr.io. This allows one to share data and see the flows in a realtime graph that visualizes all events happening in a namespace.

shiftr-io

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2827

Example entry for configuration.yaml (if applicable):

shiftr:
  username: 7879cb40
  password: 5e8bh7bebe4c0cc0

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
  • New dependencies are only imported inside functions that use them ([example][ex-import]).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@robmarkcole
Copy link
Copy Markdown
Contributor

Only small mods required for posting to Initial State
http://support.initialstate.com/knowledgebase/articles/590091-how-to-stream-events-via-restful-api

@fabaff fabaff changed the title [WIP] Add initial support for Shiftr.io Add initial support for Shiftr.io Jun 12, 2017
Copy link
Copy Markdown
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

I don't sure if we should use our internal mqtt server object. They is also connect to dispatcher and that do not check from where the data a are comming. I think that is a bit a security hole.

Maby with a own paho client or hbmqtt we are better and any future change on our internal mqtt server object will not affect shiftr negative?


mqttc = mqtt.Client(client_id, protocol=mqtt.MQTTv311)
mqttc.username_pw_set(username, password=password)
mqttc.connect(SHIFTR_BROKER, port=port, keepalive=keepalive)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that need inside a yield from hass.async_add_job() to not block the loop.

@fabaff
Copy link
Copy Markdown
Member Author

fabaff commented Jun 17, 2017

Thanks for the update. The idea was to use the internal MQTT object to be async but I will work that way too.

@fabaff fabaff merged commit 844c814 into home-assistant:dev Jun 17, 2017
@fabaff fabaff deleted the shiftr branch June 17, 2017 10:34
@balloob balloob mentioned this pull request Jul 1, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 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.

5 participants