+17
Voting

OpenHAB binding and iRidium

Artyom Syomushkin 9 years ago in Products / Other drivers updated by zaifulbahri kasim 6 years ago 14
Hi there,
There is a great opensource Home Automation System, called openHAB available. The problem of those systems is actually lack of nice looking GUIs for users.
iRidium could solve that problem if there would be a feature available, which could connect to OpenHAB server over ethernet.
Did anyone try this? What options are available?
Waiting for user's reply
We've tried it with help of OpenHAB REST API: https://github.com/openhab/openhab/wiki/REST-API


It work's nice!
Can you provide some examples, of how you did it?
I could send commands using GET request, but POST or PUT do not work.
Also interesting how you to get updates of item statuses.
Thanks
Does iRidium support REST-API?I found also TCP/IP or UDP binding should also work.
You can use REST API in iRidium via AV & Custom Systems driver, but we don't have a ready solution yet. Please see the instructions on our wiki to know how to send commands to the side equipment:
http://wiki2.iridiummobile.net/AV_%26_Custom_Systems
http://wiki2.iridiummobile.net/IRidium_DDK
http://wiki2.iridiummobile.net/IRidium_Script_API


It would be very cool to have this solution as example JS module
Please vote this topic, and it will be closer to realisation
Artyom, do you have any kind of working OpenHAB installation, so we can test?
You can download OpenHAB installation from http://www.openhab.org/getting-started/downloads.html and install it on any Windows-based PC. Then download Demo Setup from the same page - it will create demo Smart Home Items, which you can play with. REST API should be working in this configuration by default.

Has anyone already made a driver with Openhab and wants to share it? You would help me a lot. Thanks in advance.

I have used openHAB recently. Due to not able to control i3 pro with Alexa, i have made virtual tcp server running in i3 server and received command from OH. Quite simple but you need 2 server that talk together.


Hi Zaifulbahri,

Would you like to share the example of your driver?

Hai Ferry,

For i3 pro you need a virtual server,

// TCP server on port 5678
function start_tcp_server(server_name)
{
// name, port, max connections
var name = server_name;
var port = 5678; // any number will do
var max_clients = 10;
var tcp_device = IR.CreateDevice(IR.DEVICE_CUSTOM_SERVER_TCP, name, "", port, max_clients);

// start server
tcp_device.Connect();

// inform when the server online
IR.AddListener(IR.EVENT_ONLINE, tcp_device, function(text)
{
IR.Log("Server is ONLINE");
});

// register connected client
IR.AddListener(IR.EVENT_ACCEPT, tcp_device, function(id)
{
IR.Log(tcp_device + " ACCEPT CLIENT "+id);
});

// process received data
IR.AddListener(IR.EVENT_RECEIVE_TEXT, tcp_device, function(text)
{
IR.Log("INPUT DATA: "+text);
var strings = text
switch(strings)
{
  case "All Living On" ://string from OH
  IR.SetVariable("Server.Channels.DSServer_Ipad.AllLiving_Preset", 255); //command in your Iridium Server
  IR.Log("Testing Command ON");
 break;

}

at your OH :

//Send TCP command

Switch Living_Control "Living Room" { tcp=">[ON:192.168.1.121:5678:'All Living On'], >[OFF:192.168.1.121:5678:'All Living Off']" }

you need to create an item that send out string.

if you want i3 pro to control OH items then you need to install classic UI then you can send this command :

http://openHAB_ip/classiciui/CMD?item_name

Hope it will benefit you.

Let me know if you need any clarification.