{"action":"opened","issue":{"url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/236","repository_url":"https://api.github.com/repos/marvinroger/homie-esp8266","labels_url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/236/comments","events_url":"https://api.github.com/repos/marvinroger/homie-esp8266/issues/236/events","html_url":"https://github.com/marvinroger/homie-esp8266/issues/236","id":191013253,"number":236,"title":"Does homie-esp8266 allow two devices to discuss directly?","user":{"login":"sheda","id":1361088,"avatar_url":"https://avatars.githubusercontent.com/u/1361088?v=3","gravatar_id":"","url":"https://api.github.com/users/sheda","html_url":"https://github.com/sheda","followers_url":"https://api.github.com/users/sheda/followers","following_url":"https://api.github.com/users/sheda/following{/other_user}","gists_url":"https://api.github.com/users/sheda/gists{/gist_id}","starred_url":"https://api.github.com/users/sheda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheda/subscriptions","organizations_url":"https://api.github.com/users/sheda/orgs","repos_url":"https://api.github.com/users/sheda/repos","events_url":"https://api.github.com/users/sheda/events{/privacy}","received_events_url":"https://api.github.com/users/sheda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-22T13:54:44Z","updated_at":"2016-11-22T13:54:44Z","closed_at":null,"body":"Hi there,\r\n\r\nFirst congrats for your impressive work!\r\n\r\nI would like to know if there is a way to make two devices to discuss directly with each other directly without any third party tool/software/whatever that would forward message published on one topic to another.\r\n\r\nAn example may be be more explicit:\r\nI would like a homie light-device to be switched on by a homie switch-device . \r\n\r\nRoot subscription/publication on those device would be:\r\n- On switch-device side:\r\n1 MQTT publication on /homie/switch-device/switch/state -> true (possible with homie-esp8266)\r\n\r\n- On light-device side:\r\n1 MQTT subscription on /homie/switch-device/switch/state (not possible with homie-esp8266, due to API adding brand/device-id/ automatically )\r\n1 MQTT subscription on /homie/light-device/light/on/set (possible with homie-esp8266)\r\n1 MQTT publication on /homie/light-device/light/on (possible with homie-esp8266)\r\n\r\nI am currently using the v1.5, but it seems that two workarounds are possible with the v2, so I'll move on it:\r\n1- on v2, I saw that you recently added the broadcast channel: But I don't think this feature is designed for this kind of precise and device-to-device communication. In addtion it would wake up every device sleeping while message is obviouly useless for them..\r\n\r\n2- on v2, I saw on issues tracking that you added recently access to MQTT clients directly (AsyncMqttClient& getMqttClient();) and also added several callback addition for OnMessage()/OnSuscribe() on AsyncMqttClient lib.\r\nSo it would be possible to add a callback \"onSwitchedSwitch\" called on topic  \"/homie/switch-device/switch/state\" change. (To Note that I think this doesn't really break the \"Homie Convention\")\r\n\r\nWhy does this device-to-device channel need to be a workaround instead of having an public method that would allow a device to subscribe to another device topic?\r\n\r\nIf you have question or if I was unclear please let me know...\r\n\r\nThanks a lot,\r\nSheda \r\n\r\nBefore submitting your issue, make sure:\r\n\r\n- [X] You're using a [stable release](https://github.com/marvinroger/homie-esp8266/releases), not the Git development version which is, by definition, unstable\r\n- [X] You've read the documentation for *your* release, which is in the `docs/` folder of the `.zip` of the release you're using, especially the **Getting started** and **Troubleshooting** pages, which contain respectively the minimum required version of the dependencies, and some answsers to the most common problems\r\n- [X] You're using the examples bundled in *your* release, which are in the `examples/` folder of the `.zip` of the release you're using. Examples in the latest git revision might not be backward-compatible with your release\r\n\r\nThanks!\r\n"}}
{"actor":{"display_login":"sheda"}}