Orvibo B25

From banggood:

you you connect the app more faster and easyer,UI Interface got more flexible,it can be connect Countless products not only you can connect the ORVIBO product,you also can connect ORVIBO ZigBee Product,B25 has more Powerful Compatibility that it give the Customer’s Second Choice

So, better English is not one of the new features, but something about connecting Zigbee products is. I don’t know how that would work though…

I think the banggood person is talking about the new orvibo app that the B25 works with.

HomeMate by Shenzhen HomeMate 365 Co., Ltd.

My guess is that the home mate app controls the b25 but additionally also controls other devices including the newish orvibo zigbee hub, which btw I think looks pretty nice.

http://m.banggood.com/ORVIBO-Alarm-Mini-WiFi-Smart-Kit-ZigBee-Hub-Home-System-Remote-Control-p-1027136.html

1 Like

would be great to get the B25 integrated…

I have an interesting insight into the current state of Orvibo switches. I own an original S20 that works fine with Home Assitant. It is set up using the WiWo app on iOS, and communicates via UDP.

I recently ordered the new (and much small and better looking) Orvibo S30 switch (S30M is the specific model that arrived), and found that this model now connects with the HomeMate app rather than the WiWo app, and all traffic is routed via Orvibo’s servers after the initial setup. I had a quick look at some wireshark traffic dumps and couldn’t see any udp traffic at all. I didn’t really dive too far into it due to time pressures.

http://www.orvibo.com/cn/product/99.html

Because this wouldn’t immediately do what I wanted, I ordered another Orvibo S20, which arrived today. Unfortunately this is a new model S20, an S20c (although still branded S20, the specific model number on it has the ‘c’ suffix).

This new S20 also connects with the Homemate app, rather than the WiWo app, and doesn’t show up in Home Assistant either, so I’m making an educated guess that the new S20 now runs firmware that acts like the S30, and communicates directly via the Orvibo website.

When I get a chance I plan on looking into how the S20c and S30 communicate with the Orvibo site and whether we can emulate that communication. If the devices aren’t hardcoded to only accept communication from certain servers / addresses, then it’s possible that all the new devices communicate in a similar way and a library for communicating with them can be written. The S30 devices are beautiful devices, and much smaller too, I really like it. Also, the HomeMate app itself is actually a really good app!

2 Likes

Hi,

Has anyone got a working version of this yet?

Thanks,

J

There is another thread on this topic here:

They link to a feature request for this:

And 21 days ago someone said they were going to start working on it, but they were asking if anyone could provide them with information that’d allow to get a quick start on the project. I don’t know enough to help (although I am good at following instructions) but I suspect there are enough knowledgeable people on here who can and, as it looks like the original S20s might be becoming rarer, it sounds like it is worth doing. Obviously, I’m biased as I have a couple of B25s (UK) and was looking into getting two more but still…

I got shipped a couple of “S20c” Homemate enabled units instead of the “S20” ones I ordered. I cracked one open, they seem to have an ESP-8266 variant as the SoC (no big surprises there), but no easy way I could see to hook up an FTDI to try and reflash them. Will try and get Wireshark in the middle of my phone and the switch, see if I can work out what protocol they speak

Will report back if I find anything

1 Like

I’ve been documenting my findings here.

Its a good news/bad news kinda thing. Good news is that Orvibo don’t seem to have done any kind of crypto/TLS on the connection, which makes things a bit easier

Bad news: on the face of it I can’t see any way where you can send command directly to the switch to turn it on and off - all the commands go via an Orvibo cloud server. This means that a solution to this is probably going to involve something that pretends to be the cloud server, and interfaces with MQTT or something, and doing something to redirect traffic (DNS override would be easiest)

2 Likes

Thanks for doing that digging around, sounds like they’ve made life trickier. Unfortunately, I don’t know enough to be able to judge how tricky. Do other devices do this? If so, and they integrate with HA, then there is hope this can be fixed.

I am currently within my returnable window and could swap these for something else, like the TP LInk plugs, but I’d rather keep these if HA integration is possible at some point in the future.

No promises as to if I will figure it out, or how long it will take, but it is possible to get these working (at least in principle, given the small amount of understanding I have of how they work)

1 Like

That’s good enough for me, I just wasn’t sure if it was doable. As it seems like it might be I’m happy to wait and see what happens. I have plenty of other HA-related things to be getting on with in the meantime, but will be available to test things if required.

Thanks again for all your efforts.

Don’t know if this helps, but I had a look over the Amazon.co.uk’s reviews for the B25 and one (for the marsboy updated version - I don’t know what the updating involves) says they got it working on OpenHab as it appears as a Hue controllable device:

https://www.amazon.co.uk/review/RRUO0GNDXQA8J/

Might offer a different angle of attack or not.

(small amounts of) SUCCESS! I’ve got a script working that can intercept commands from the switch, read the state from them, and send its own commands to change the state.

Its very rough at the moment, and I’ve only tested it with one S20c (could be differences between the S20c and the B25, and differences between devices). Its going to take a bit of work to package it up into something usable, but I’ll probably be looking for people to help test it in the next few weeks

3 Likes

Happy to help test. I have 2x B25 (UK) units… Awesome work!

Thanks for your great work. I tried it today with a B25 EU, but I couldn’t get it working. It seems like the encryption method could not decode the messages. Here is the log.

@Philipp1001 thanks for trying! I’ve been meaning to put out a proper call for testers for the last few weeks, but life has gotten away from me.

Can you try installing the master version from the github repo (pip install git+https://github.com/insertjokehere/homemate-bridge) then run the bridge with an extra --packet-log-file /tmp/logfile.json. This will log all packets in and out to /tmp/logfile.json, I would appreciate it if you can send it to me

Okay, I runned it with the master version from github repository. Now there is a different message. Here is the content from the logfile.json. When I run it multiple times, sometimes the output in logfile.json just contains (with whitespace as last char) [{“keys”: {“112”:

@Philipp1001 can you try again with latest master? I forgot that the keys dict was bytestrings and needed to be base64’d as well.

The packet in the log decrypts OK as well now so it might get you a little further. When you were first trying were you using the version on PyPI?

logfile.json (about a minute running) and the command line output.
Yes I think I was trying the PyPI Versions. Also I installed sometimes with pip3 instead of pip, but in this master pip3 didn’t create a file in /usr/local/bin, so I installed with pip and corrected the shebang to python3. Hopefully there are no side effects.

I’ve pushed a new commit to master that should fix the ‘KeyError’ thing (dumb bug, really should write some tests for this thing), might get you a little further. I’ll cut a new PyPI version once I’ve got things working for you