Comments (8)
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.
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.
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.
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.
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.
@ifflanb was my answer helpful, do you need other help ?
from mi-home.
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.
Cool :)
from mi-home.
Related Issues (14)
- Get Error at first time initial HOT 2
- Unable to Connect to Mi gateway HOT 40
- Method Named HOT 2
- Any plan to integrate 360 mi camera as a device ? HOT 4
- Wireless Switch HOT 3
- Door/Window sensor or Aqara open/close sensor HOT 2
- Can't reach any device HOT 14
- MiHome._devicesList is not thread-safe HOT 4
- Will this work with Xiaomi Mi Smart Plug Wi-Fi (GMR4015GL) without a gateway? HOT 2
- Gateway version 2.61.3 HOT 3
- Gateway and Temperature and humidity sensor HOT 4
- Unable to Connect to Mi gateway HOT 4
- Не отрабатывают EventHandler'ы HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mi-home.