Ir blaster HOME AUTOMATION wiwo orvibo & S20

It can be found as a pull request on one of the branches (if that’s how one does these things).

DomQuixote/python-orvibo

And then pull request patch-1.

I might create a new repository and link to the original one if that’s more convenient, don’t know what is best practice.

Let me know what you think.

Hi,

I used Pavel_Cherezov’s python implementation to control my Orvio AllOne but I didn’t like the delays, so I started developing an binding for Openhab2 (IR-Blaster only for now, since I don’t have any S20) and I have a few questions regarding the communication with the device:

  • AFAIK the communication is based on UDP and there seems to be no command to unsubscribe from a device, so what is meant by “keeping connection” to the device?
  • Does anyone know how the subscription is handled by the Allone device? Is there a timeout or does a current subscription expire as soon as new one is received?

If anyone is interested, I think I can provide a prototype soon.

Are the AllOne UDP packets the same structure as the S20 ones? I’ve already created a PR for OH2 for an Orvibo S20 binding, it would make sense to incorporate the AllOne into the same binding if so.

I’d be happy to help you with openhab binding, but unfortunately I have no any expertise here.
Actually there are two way to send request to device(s): broadcast to udp port 10000 (can be used to discover devices in the network) and sending it to exact device ip:10000. Once connected and subscribed you can send requests to device until disconnect. But you can use subscribe to get device status (e.g subscription response last bit says if S20 switched on or off)

My cmd line app does the following:

  1. Discover device
  2. Sends subscription request
  3. Sends request
  4. Receives response
  5. Disconnects

As you can see it has quite a big delay between app execution and something is happened with a device.
Keeping connection allows to avoid disconnection after receiving response, but this can be used only inside other app, which will hold Orvibo instance.

Hope this help

General idea and header are the same :slight_smile:
You may compare python code (by searching “packet.compile”) in my module.

Yes that would make sense :).

Thanks, yes this helps. If I’m not mistaken, you could skip the first step to make it faster. But the user has to provide the mac address in this case.

I looked at your code and the one from here and put together prototype to emit ir signals. Feel free to test it Prototype download.

It’s very limited for now, but works stable in my environment so far. Regarding the subscription, it only subscribes again, if you emit a signal and the last subscription was longer than 5 minutes ago. It also does not receive anything from the allone device yet.

Thing
You need to add a thing manually and provide IP and MAC-Address of the Orvibo AllOne and a folder, where the IR-Signals are saved. For example:
IP: 192.168.1.123 MAC: AB:AB:AB:12:12:12 Folder: /usr/share/signals/etc

Channels
Only the “emit” channel is working. Provide the path to the IR-Signal relative to the folder specified above.

Example to hook it to the TV Power switch
sitemap:
Switch item=TV_Power label="Power"

item:
Switch TV_Power {channel="samsungtv:tv:0f7f490:power"} String EmitIR {channel="orvibo:orviboallone:5beb:emit"}

rule:
rule "TV_Power_ON" when Item Power received command ON then sendCommand(EmitIR,"samsung_tv/power.ir") end

You’re right, first step could be skipped.
It is a great idea, and I’ll add new parameter for mac address to my python module to skip discovering in case of known MAC.

@janis have you got the link to your src code? If so, and I have time, I will start to look at incorporating some of it into the existing PR.

I can send it to you if you want, but it really is a prototype, far from production quality code ;).

If you’ve already written code to handle the AllOne then either send me a PR to my repo or upload your code somewhere and we’ll try and get them merged together. My S20 stuff works but there’s also improvements I’m looking to make so a working prototype is good enough for now :slight_smile:

Hi
@Pavel_Cherezov, thank you for your hard work!
Have you tested the AllOne with RF devices? I can’t get it to work with some cheap RF sockets. Do I have to do anything special?
And please, yes, add the MAC option.
Thanks.

@jjmeseguer thanks for your feedback! :slight_smile:
Yes I’ve tested AllOne with cheap RF helicopter toy. Are you sure your socket is working on 433 MHz RF? Nothing special is required, just the same as for IR:

  1. Save the signal(s) to file
  2. Emit signal(s)

MAC is on the way. I’m going to push it to my repo by the end of this week.

1 Like

I want a fleet of toy helicopters that rise in flight when the alarm get tripped! :joy:

@Pavel_Cherezov Yes, I’m sure, I’ve been able to control it with an Arduino and one of these modules:
http://www.aliexpress.com/item/RF-wireless-receiver-module-transmitter-module-board-Ordinary-super-regeneration-315MHZ-433MHZ-DC5V-ASK-OOK-for/32322542931.html
I’ll try to get hold of of another socket to try.
Thanks for your effort!

The S20 binding for OH2 has been merged.

You can find details here

Although I don’t have an AllOne I’m hoping to implement it in the same binding as a different type of Thing so that it can become a general Orvibo binding.

As I don’t own/have access to an AllOne, is anyone able to capture examples of the various packets received for me? With those I can start work to incorporate the AllOne into the Orvibo library.

I have an AllOne. What do you specifically need?

I was after some information like this http://pastebin.com/TSK4Lu4Q. Hopefully this will be enough.

did you look at the code I sent you? entering learing mode, emitting IR/RF and device subscription is implemented. Device discovery should be identical to S20. So you just have to read the responses.