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:
Discover device
Sends subscription request
Sends request
Receives response
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.
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"
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.
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
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!
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:
Save the signal(s) to file
Emit signal(s)
MAC is on the way. I’m going to push it to my repo by the end of this week.
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.
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.