My devices are quite new, 2 weeks? My home automation is pretty basic. So basically my system is a nightlight, door bell, tried the alarm arm once. I have other xiaomi product like the ant camera, air purifier, router etc.
I am trying to get Amazon Echo and OH to link to everything too.
Sorry for my lack in reply.
I have moved away from OH for the moment.
Anyhow, I did some research earlier and concluded that I knew too little to find some good information by myself.
I used wireshark to find some package information but wireshark did not give much information, the gateway is talking to a cloud(outside IP) with mDNS, wireshark could not understand the package.
I purchased a CC2531 zigbee sniffer using with a TI sniffer SW I got the whole package from the zigbee sensor. I think the information might be used for something, but not quite sure.
Waiting for a program card for my CC2531 so I can install Contiki OS on it so my RPI can receive the packages.
If you guys want to have this working, please spend some time in looking into it. You might have some knowledge that I don’t.
Hi everyone, I recently purchased some yeelights (9W, rgbw, they communicate directly via Wi-Fi). My plan is to somehow connect those to my alarm set on my phone. I want them to gradually turn on (simulating sunrise) say half an hour before the alarm goes off. Is there an api already available or is there a way to achieve this using wireshark?
Thank y’all for your help.
Did someone managed to do this? Actually the prices of the sensors are quite affordable if you look here:
I am thinking of starting a new project and actually this is the most cheap environment i could cross with, so having the binding with openhab would be a +.
The following code reads values from the xiaomi gateway in a very simple way, the returned String is a JSON String.
Probably that helps to create a openhab binding
import java.io.ByteArrayInputStream;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.nio.charset.StandardCharsets;
public class XiaomiTest {
public static void main(String[] args) {
XiaomiTest test = new XiaomiTest();
test.testConnection();
}
public void testConnection(){
try (MulticastSocket socket = new MulticastSocket(9898); ){
byte[] b = new byte[1024];
DatagramPacket dgram = new DatagramPacket(b, b.length);
socket.joinGroup(InetAddress.getByName("224.0.0.50"));
while(true) {
socket.receive(dgram);
ByteArrayInputStream in = new ByteArrayInputStream(dgram.getData(), 0, dgram.getLength());
int n = in.available();
byte[] bytes = new byte[n];
in.read(bytes, 0, n);
String s = new String(bytes, StandardCharsets.UTF_8);
System.out.println(s);
dgram.setLength(b.length);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}