Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental: homie extension #855

Closed
wants to merge 1 commit into from

Conversation

rtreffer
Copy link

This is a highly experimental initial homie extension. Status is best summarized as "it does something since today".

Status in conjunction with the new OpenHab 2.4 MQTT binding

  • Adding/discovering devices
  • Controlling an RGB IKEA lamp
  • Deregister devices when zigbee2mqtt goes offline
  • Endpoints
  • Testing (automatic and other controllers than OpenHab)
  • Bridge Config (e.g. permit_join....)
    and probably a lot more.... My JavaScript knowledge is pretty outdated I guess.

There are also a few places where a lot of code was duplicated...

  • Finds/calls fromZigbee to generate the payload, duplicating the normal publishing logic.... It would be great if it would be possible to write extensions that interact with the fully fledged messages.
  • RGB / XYZ conversions.... The current methods don't seem to do full brightness computation. But as homie only allows RGB/HSV there needed to be a brightness-adjusting version. This should probably go into utils
  • Full round-trip of OpenHab -> MQTT -> Zigbee2Mqtt -> Zigbee device -> Zigbee2Mqtt -> MQTT -> OpenHab is slow, causing some lag and jumping
  • My OpenHab MQTT binding was old, so I had to publish everything in $stats every interval seconds. This is a OpenHab thing that's fixed upstream

I'll probably converge to this at home and would try to get it into a usable state because the new OpenHab MQTT binding is great and the whole structure seems so much easier than HomeAssistant (and the OpenHab HomeAssistant discovery failed for me....)

@niecore
Copy link

niecore commented Jan 21, 2019

Great Idea to integrate with Homie.

Just asking why to not use existing libraries to implement the convention?

For instance.:
https://github.com/microclimates/homie-device

@rtreffer
Copy link
Author

rtreffer commented Jan 21, 2019 via email

@Rexz34
Copy link

Rexz34 commented Mar 11, 2019

Does anyone know the current implementation of the homie extension? Is it in the latest build?

@tavalin
Copy link

tavalin commented Mar 21, 2019

@rtreffer I just tried this out with openHAB and would like to say keep up the effort! I haven't had a chance to do any extensive testing but it was certainly refreshing to see my Xiaomi sensors be automatically discovered and added to the inbox with it automatically knowing what channels/features are present on the sensors 👍

@tavalin
Copy link

tavalin commented Apr 8, 2019

@rtreffer can we progress this? I think this will be a useful feature so I'm keen to help where I can.

@tavalin
Copy link

tavalin commented Apr 12, 2019

Or @Koenkk...any ideas how we can progress this?

@Koenkk
Copy link
Owner

Koenkk commented Apr 12, 2019

Before I can merge such code:

  • It needs to be clean and maintainable
  • Tests should be written
  • Documentation should be written

@rtreffer
Copy link
Author

@Koenkk what would you think about extracting the metadata from lib/extension/homeassistant.js? There is a 80-90% overlap of what this extension and homeassistant need to operate.

Everything else is very clean, this was an early shot at "can this be done at all"

@Koenkk
Copy link
Owner

Koenkk commented Apr 13, 2019

@rtreffer yes, feel free to move that to a different file, so both can use it.

@tavalin
Copy link

tavalin commented Jun 19, 2019

Has there been any progress on this? What is outstanding before this can be merged?

@tavalin
Copy link

tavalin commented Jul 31, 2019

Ping @rtreffer @Koenkk

@Koenkk
Copy link
Owner

Koenkk commented Aug 1, 2019

@tavalin there is still a todo list in the OP, also, tests need to be added before I can merge this.

@Koenkk
Copy link
Owner

Koenkk commented Sep 25, 2019

I will close this PR for now, the current codebase drifted too much away from this PR.

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.

5 participants