-
Posts
2061 -
Joined
-
Last visited
Everything posted by Javi
-
Portal>Select Tool>Connectivity> Amazon Echo>Add>A/V (in the list next to "Add") I am assuming the Alexa app lets you group similar types and assume Harmony is also of type A/V. Although it looks like "watch" is not a supported action, so "turn on" would have to be used. If my assumptions about Alexa groups are not correct IFTTT or Stringify would be the an option which will not require additional hardware or software upgrades. Although your phrase may have to change to "Alexa trigger"... "movie time".
-
There are currently many limitations with regards to trigger words, device names, action words and chaining for both the Echo and Google Home. I developed and use an Android app which intercepts voice commands to correct some of these limitations. So I have very little recent experience with the Echo. Also the Harmony has limitations for direct ISY integration. Anyway, Have you tried making a program in the ISY which triggers the desired Scene then assigning the program in the portal as A/V and grouping them with the Harmony Actions (or whatever they call them) in the Alexa App? Although this may not support your action word "watch". Look back to paulbates comment for direct Harmony ISY integration. If direct a node server is not for you try IFTTT. IFTTT has Harmony integration and can trigger your ISY via the Portal from Web Hooks. Also I think an ISY network resource may be able to trigger and IFTTT recipe. This may preserve your desired phrase with the action word "watch". There are many other options....which most likely outnumber minutes in a day ?
-
I don't use an Echo anymore and rolled my own voice commands for the Google Home so the following is just from memories a few years old. I think you need Groups and not Scenes. If I remember correctly you can set up groups of devices in the Alexa app.
-
Note that this is not always standard so if it doesn't work reverse ground and ir
-
I have sent IR signals to a xantech connecting block (12v) with an iTach (9v) and USB UIRT (5v) the wiring will be the same. As long as the cable run from the source to the connecting block is not too far (depends on souce, but usually no greater than 50 feet) then only connect IR IN and GND. If the source is too far or lacks sufficient power for the cable run add a powered xantech CB12 (or other powered connecting block) close to the source, the CB12 can be powered from the cable run between it and a powered connecting block.
-
Thanks Michel! I spent 3 hours trying to get a connection which turned out to be on one line of code that was adding a new line char to the encoded username and password that the ISY accepted but the Portal did not. There are not many great examples for Java connections to the portal. So hopefully the code below will save the next person a few hours. package com.voiceforiot.iotsecuritypanel.Services; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.support.annotation.Nullable; import android.util.Base64; import android.util.Log; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.net.UnknownHostException; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; public class SSLSoapSocketService extends Service { private String LOG_TAG = SSLSoapSocketService.class.getSimpleName(); private Thread backgroundThread; private Runnable attemptSocketConnection = new Runnable() { @Override public void run() { String usernamePassword = "myEmalAddressUsedForPortal@gmail.com" + ":" + "myPortalPassword"; String base64UsernamePassword; try { byte[] usernamePasswordByte = usernamePassword.getBytes("UTF-8"); //NO_WRAP NEEDED AS DEFAULT APPENDS NEW LINE CHAR base64UsernamePassword = Base64.encodeToString(usernamePasswordByte, Base64.NO_WRAP); Log.v(LOG_TAG, "base64 username is: " + base64UsernamePassword); } catch (UnsupportedEncodingException e) { Log.v(LOG_TAG, "Error: " + e); return; } URL url = null; try { //get this from my.isy.io, click on Select Tools | ISY Information and then copy/paste the URL for your ISY (not the Admin Console). url = new URL("https://my.isy.io/isy/someVeryLongStringHere"); } catch (MalformedURLException e) { Log.v(LOG_TAG, "MalformedURLException: " + e); } String urlString = url.toString(); String host = url.getHost(); String body = "<s:Envelope><s:Body>" + "<u:Subscribe xmlns:u='urn:udi-com:service:X_Insteon_Lighting_Service:1'>" + "<reportURL>REUSE_SOCKET</reportURL><duration>infinite</duration>" + "</u:Subscribe></s:Body></s:Envelope>"; String writeString = "POST /services HTTP/1.1\n" + "Host: " + urlString +"\n" + "Content-Type: text/xml; charset=utf-8\n" + "Authorization: " + "Basic " + base64UsernamePassword + "\n" + "Content-Length: " + (body.length()) + "\n" + "SOAPAction: urn:udi-com:device:X_Insteon_Lighting_Service:1#Subscribe" + "\r\n" + "\r\n" + body + "\r\n"; Log.v(LOG_TAG,"writeString\n" + writeString); try{ SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); SSLSocket socket = (SSLSocket)factory.createSocket(host, 443); socket.startHandshake(); PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter( socket.getOutputStream()))); out.print(writeString); out.print(""); out.flush(); //check if any errors exist if (out.checkError()){ Log.v(LOG_TAG, "SSLSocketClient: java.io.PrintWriter error"); } //Read BufferedReader in = new BufferedReader( new InputStreamReader( socket.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null){ Log.v(LOG_TAG, inputLine); } Log.v(LOG_TAG, "Closing Socket"); in.close(); out.close(); socket.close(); }catch (UnknownHostException e){ Log.v(LOG_TAG, "UnknownHostException: " + e); }catch (IOException e){ Log.v(LOG_TAG, "IOException: " + e); } } }; @Nullable @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { if (intent != null) { //TODO: need to check if service is already started before re-attemptSocketConnection Log.v(LOG_TAG, "onStartCommandStarted"); this.backgroundThread = new Thread(attemptSocketConnection); this.backgroundThread.start(); return super.onStartCommand(intent, flags, startId); } return super.onStartCommand(intent, flags, startId); } }
-
Url URL("https://my.isy.io"); Port 443
-
Does the ISY Portal require headers different from the ISY for event subscription? Is there Portal subscription documentation which may assist me? I can get SOAP subscription to work on local network but I am having problems connecting to the Portal. The Java Thread below woks with my local network. I have commented out ("//" for java) the lines changed for connection to the Portal. IF (username:password && URL && Port) are changed I get no response from the Portal. IF (username:password && URL) are changed and port left at 80 than I get the following Lines: LineBuffer: HTTP/1.1 400 BAD_REQUEST LineBuffer: Content-Length: 0 LineBuffer: Connection: Close Java Thread: @Override public void run() { Log.v(LOG_TAG, "Runnable Started"); String usernamePassword = "localUserName" + ":" + "localPassword"; //String usernamePassword = "myEmailAddress@gmail.com" + ":" + "myPortalPassword"; String base64UsernamePassword; try { byte[] usernamePasswordByte = usernamePassword.getBytes("UTF-8"); base64UsernamePassword = Base64.encodeToString(usernamePasswordByte, Base64.DEFAULT); Log.v(LOG_TAG, "base64 username is: " + base64UsernamePassword); } catch (UnsupportedEncodingException e) { Log.v(LOG_TAG, "Error: " + e); return; } try { URL url = new URL("http://192.168.5.2"); //URL url = new URL("https://my.isy.io"); String host = url.getHost(); int port = 80; //int port = 443; Socket socket = new Socket(); socket.connect(new InetSocketAddress(host, port)); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); InputStream inputStream = socket.getInputStream(); InputStreamReader inputStreamReader = new InputStreamReader(inputStream); BufferedReader bufferedReader = new BufferedReader(inputStreamReader); String body = "<s:Envelope><s:Body>" + "<u:Subscribe xmlns:u='urn:udi-com:service:X_Insteon_Lighting_Service:1'>" + "<reportURL>REUSE_SOCKET</reportURL><duration>infinite</duration>" + "</u:Subscribe></s:Body></s:Envelope>"; outputStreamWriter.write("POST /services HTTP/1.1\n" + "Content-Type: text/xml; charset=utf-8\n" + "Authorization: " + "Basic " + base64UsernamePassword + "\n" + "Content-Length: " + (body.length()) + "\n" + "SOAPAction: urn:udi-com:device:X_Insteon_Lighting_Service:1#Subscribe" + "\r\n" + "\r\n" + body); outputStreamWriter.flush(); StringBuffer headerBuffer = new StringBuffer(); StringBuilder stringBuilder = new StringBuilder(); String messageFromServer; while ((messageFromServer = bufferedReader.readLine()) != null) { //Log each line Log.v(LOG_TAG, "LineBuffer: " + messageFromServer); } headerBuffer.setLength(0); } catch (IOException e) { Log.v(LOG_TAG, "IOException is: " + e); } //TODO: Stop Android Service. This is only a test. Service stopSelf() may not be called stopSelf(); } <Edit> I just noticed I was looking at 2 versions of documentation will try again tomorrow ISY-WS-SDK SUBSCRIBE /eventing HTTP/1.1 Host: 192.168.0.208:80 Content-Length: 129 Content-Type: text/xml; charset="utf-8" Authorization: Basic YWRtaW46YWRtaW4= CALLBACK:<REUSE_SOCKET> NT:upnp:event TIMEOUT:Second-infinite SOAPACTION:"urn:udi-com:service:X_Insteon_Lighting_Service:1#Subscribe" <s:Envelope><s:Body><u:Subscribe xmlns:u="urn:udicom: service:X_Insteon_Lighting_Service:1"></u:Subscribe></s:Body></s:Envel ope> ISY Developer's Cookbook (Text not enabled to copy) Search for "3. Subscribe" </Edit>
-
Thanks Michel, I will look into soap for portal integration
-
Is it possible to subscribe to the Portal using REST? I can send REST commands to ISY from portal with the same Credentials String credential = Credentials.basic(mUserName, mPassword); mRequest = new Request.Builder() .url(baseUrl) .header("Authorization", credential) .addHeader("Sec-WebSocket-Protocol", "ISYSUB") .addHeader("Sec-WebSocket-Version", "13") .addHeader("Origin", "com.universal-devices.websockets.isy") .build(); mListener = new IsyWebSocketListener(); I get the following Error: unexpected end of stream on Connection{my.isy.io:443, proxy=DIRECT hostAddress=my.isy.io/34.237.193.77:443 cipherSuite=TLS_RSA_WITH_AES_128_GCM_SHA256 protocol=http/1.1}
-
Question about usage and ISY compared to smartthings etc..
Javi replied to James Peterson's topic in Amazon Echo
Hi James, Although I do not own either of these devices and it is my personal preference to not automate door locks or security devices with voice, it appears you can "Query connected devices for their current state" the GetLockStateRequest and GetTemperatureReadingRequest are (now) in the Alexa API. https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/smart-home-skill-api-reference (bottom of document) -
Thanks for the information Benoit, The following statements are my thoughts and opinions on this topic and is not based on facts. I am sure most of the conversational actions are using API.AI. We will just have to wait until you are given access to direct actions. I will keep this work around in mind in the case G decides everyone whom wants direct actions needs to pay a fee (such as the IFTTT fee), in addition IFTTT assistant actions (this) appear to have too much control over the google home, with the ability to override some of the built in google actions. I have a gut feeling they are going to ask all third parties to use IFTTT or a service with a similar fee as G's current monetization strategies (serving ads) does not appear to be compatible with the google home.
-
It appears in my Console with Firmware v.4.5.4 on UI v4.5.1 and UI 4.5.4. Which Firmware are you running?
-
Here is a Video example of the simulated actions, I added the recipes in the Voice for IoT forum.
-
Michel, will UD will be doing the parsing of the conversational action? if you are, would it be possible to have a way of sending a string to the portal which can be parsed as a voice command? This would allow us to simulate Direct actions with only a few IFTTT recipes. We could use the IFTTT "make web request" with the following to have almost all home automation commands sent. Specifically would could create the following recipes for the assistant: Turn $ - which will appear to be direct actions for phrases such as "Hey Google" + "Turn on the lights", "Turn off the lights", "Turn up the volume".... Close $ - "Hey Google" + "close the blinds" Open $ - "Hey Google" + "open the blinds" Start $ - "Hey Google" + "start the <insert program here>" Stop $ - "Hey Google" + "stop the <insert program here>" Lock $ - "Hey Google" + "lock the <item to lock>" Unlock $ - "Hey Google" + "item the <item to unlock>" also a few ways to start a command Can you $ - "Hey Google" + "can you turn off the bedroom fan"... Please $ - "Hey Google" + "please turn off the bedroom fan".... I think these 8 recipes could cover almost all voice commands needed for home automation. I have added this to my app via AutoRemote and it works just like a direct action, but I think it would be better for all users if you could add a way for us to send a string to the portal for UD to parse.
-
Not sure I would do it but here you go: http://www.irrational.net/2014/03/22/reverse-engineering-a-ceiling-fan/
-
That was the reason I used it a few years back, before I went all in on voice...got tired of changing UIs for websites/apps every time I added/updated/removed/changed my devices. I did remember you could send a direct command which is why I suggested the plugin. In my opinion you should do everything possible to avoid being compromised, there are tutorials on this forum on how to get a cert. You may also want to look into vpn. Those are just my opinions, I am not a network security expert.
-
I recommend using the webserver eventghost plugin if you are trying to do something outside of the local network. Even if you get UDP to work, which may in itself be an uphill battle, it does not provide feedback so your commands may not reach the destination all of the time.
-
Can't say no to looking at strange....code. Thanks!
-
I have noticed that my receivers do this if the front aux input is connected, then return to the previous source when disconnected, but I'm not sure how we would do this automatically.
-
While I had some free time the other day I visited the EventGhost forum and found this topic which may be relevant to helping us with indoor location: http://www.eventghost.net/forum/viewtopic.php?uid=20034&f=2&t=9139&start=0 The github project: https://github.com/schollz/find I have not had much free time lately to test, but it appears a new android app will be released soon: https://github.com/uncleashi/find-client-android Unfortunately apple users may not be able to use this for indoor location: https://www.internalpositioning.com/faq/#can-i-use-an-iphone
-
I tried many times but ultimately gave up as the signals where too erratic. I think BLE indoor location may work in a store or conference hall but I do not think it will work in a small home (or any home with walls, furniture, multiple levels.). I have had much better success reading wifi levels from 2 wifi range extenders ( http://www.amazon.com/NETGEAR-Extender-Gigabit-Ethernet-EX6100/dp/B00HHRP11C/ref=sr_1_6?s=pc&ie=UTF8&qid=1464407440&sr=1-6&keywords=netgear+wifi+extender ) placed on opposite sides of my home,especially 5 GHz band, but ultimately not reliable all of the time. Can you explain your setup a little more? Maybe I will try this out again...
-
Thought I would chime in with a similar experience. If I sent a scene "on" command and a few of the lights in the scene did not turn on, it did not matter how many additional times I sent the scene "on" command it would not turn on the lights which where off. It would work if I sent the scene off command then the scene on command again, sometimes. I ended up just having the program turn on each device after the scene on command which would work. I found I had a malfunctioning device which was causing most of the errors, but the scene problems still happen from time to time so I have these programs also trigger the device along with the scene.
-
Francois, My brother has a PC running 24/7 at his home with chrome open and the chrome remote desktop extension. This way he can view his cameras without a static IP (or dyndns), by doing a remote desktop connection. The extension does not require port forwarding or a static IP. May be worth a try to if you can leave a PC (or windows tablet) running. There are chrome remote desktop apps for phones also. I believe Paul is correct as far as the portal goes.