Giter VIP home page Giter VIP logo

Comments (8)

sergey-brutsky avatar sergey-brutsky commented on May 30, 2024

hi @beniffland,

This library is helpful if you want to do custom actions triggered by xiaomi devices.
It has not been designed as a relay for events.
Theoretically it is possible to do it, but there is no such code yet.

If you want to relay events from your devices, in my point of view the easiest way would be to use xiaomi gateway that emits stream of events that you can listen from your code and forward to wherever you want.

Thanks,
Sergey

from mi-home.

ifflanb avatar ifflanb commented on May 30, 2024

Thanks Sergey. When you say "use xiaomi gateway that emits stream of events that you can listen from your code", how would you listen for the events? Is that something that you can do in c#?

from mi-home.

sergey-brutsky avatar sergey-brutsky commented on May 30, 2024

Yes, it is possible to do form the c# code, take a look at https://github.com/sergey-brutsky/mi-home/blob/master/MiHomeLib/MiHome.cs#L121
Here we are listening for "raw" events, parse them to objects and do useful things.
You can use this technique in your own code by forking the library and writing missing functionality

from mi-home.

ifflanb avatar ifflanb commented on May 30, 2024

Thanks Sergey. I'll take a look. I think I noticed a comment to say that your code didn't work on the latest xiaomi gateway. Is that correct?

from mi-home.

sergey-brutsky avatar sergey-brutsky commented on May 30, 2024

Nope, manufacturer blocked ability to work with gateway programmatically in latest device versions (it doesn't emit any events to LAN). In order to unblock this ability an extra efforts needed, see README. It has no any relation to this library.

from mi-home.

sergey-brutsky avatar sergey-brutsky commented on May 30, 2024

@ifflanb was my answer helpful, do you need other help ?

from mi-home.

ifflanb avatar ifflanb commented on May 30, 2024

HI yes very helpful thanks. I have ordered a version 2 gateway and will try to get it working when that arrives. Might be a while as I ordered from Ali Express :)

from mi-home.

sergey-brutsky avatar sergey-brutsky commented on May 30, 2024

Cool :)

from mi-home.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.