dib0 / elro_connects

The ELRO Connects uses a propriety protocol on the local network over UDP. This is the reversed engineered python implementation of the protocol.
MIT License
16 stars 7 forks source link

Collection of other sources that might help in controlling smoke detectors, App Sourcecode found #12

Open JsBergbau opened 3 years ago

JsBergbau commented 3 years ago

I've opened a smoke detector to get more information about the used RF protocol. According to this Website https://www.elro.eu/de/faq/article/funktionieren-die-rauchmelder-noch-wenn-der-k1-nicht-mehr-funktioniert-sf40ga-fz5002r each smoke detector has it's own reporting group. So these smoke detectors are interconnected even when Gateway is not available. All smoke detectors in the same reporting group hit alarm simultaneously. Even when you press Test button on one smoke detector all others sound as well. So it is very important that you have different groups. Otherwise if your neighbour had the same device he could make yours alarming. If it would be possible to change alarm group for each smoke detector we could get informed about a fire at the specific room without making all the other detectors making noise. This helps a lot to find the room where the fire is very quickly.

grafik

So these devices are produced by Siterwell. Elro FT5002R are in fact Siterwell ST559A/C. There are similar smoke detectors with a different look and shape, see here https://www.china-siter.com/product/GS559A-C-130.html

Here https://docplayer.org/183402592-Gebrauchsanleitung-rauchwarnmelder-autonome-de-fum-ee-type-gs559a-ref-st559a-bild-1.html is a manual in German and French for this Smoke detector.

The official app which looks very similar to the Elro App is called FamilyWell and can be found here https://play.google.com/store/apps/details?id=com.siterwell.familywell&hl=de&gl=US

Siterwell has its own Github Repository https://github.com/Siterwell Perhaps this code can be useful. As far as I see there is the full source code for the Elro Connects App https://github.com/Siterwell/familywell-lidl-android/branches So no need to use a decompiler.

I'm also interested in the RF protocol. Perhaps we can build our own Gateway which allows multiple "reporting groups", so we can track via MQTT which smoke detector has an alarm, but only this detector is alarming.

If you find out anything about the RF protocol, please post here. I'll also contact the company and post results here.

I'll update this post in the next minutes if a find out more useful things.

depuits commented 3 years ago

The code seems quite the mess to me, maybe its just the java and android. I did find some interesting parts though.

A list of all the supported device ids.

I've also found some code which checks the device status

if("55".equals(status.substring(4,6))){
    ds = getString(R.string.alarm);
}else if("BB".equals(status.substring(4,6))){
    ds = getString(R.string.test);
}else {
    int volt = Integer.parseInt( status.substring(2,4),16);
    if(volt < 15){
        ds = getString(R.string.lowvolt_alarm);
    }
}

This code actually suggests a bug in the current program which say that status 'BB' is the alarm while this would just be the test alarm.

if data["data"]["device_status"][4:-2] == "BB":
    self.device_state = "Alarm"
elif data["data"]["device_status"][4:-2] == "AA":
    self.device_state = "Normal"

According to the Siterwell code this should be following state for alarms:

id state
AA Normal
BB Test
55 Alarm

I've also been looking for how the app connects to the connector but except for the part that is already implemented here I couldn't quite figure that out yet.