Jump to content

barrygordon

Members
  • Posts

    692
  • Joined

  • Last visited

Everything posted by barrygordon

  1. The HA Bridge basically uses the REST interface on the ISY994. If that interface/protocol is the same on the ISY99i then there should be no problem. No additional modules are needed for the HA Bridge. Additional modules would be needed as per your interface requirements from/to the ISY in your application. The HA Bridge, what you refer to as the server for the Alexa commands, is a Java application. Most people are running it on a Raspberry Pi which is a Linux box supporting Java 8. If your microcomputer runs Java 8 there should be no problem running the HA Bridge, but how much help you can get here for your particular configuration is unknown. The HA Bridge software is developed and supported by BWS Ssytems (www.bwssystems.com). Hope that helps.
  2. Jimbo, Unfortunately in this case what you suggest will not help. The ISY if sent the proper command will do the correct thing. In this situation there are two intermediaries in the loop/process. First we have the Amazon cloud which handles the speech processing and yields a textual representation of what was said. The textual representation is sent to the HA Bridge and will have several parts. First the ID number of the entry as developed when the device was discovered, second the primary command, on or off, and lastly any auxiliary data such as an intensity value. The HA Bridge debugging capability will show what the Amazon cloud sent which is key to understanding what the Amazon cloud thought was said. It will then show the command that was formulated to send to the end device, in our case the ISY. It will also show the computation, if any that produced an intensity/value. All of that is required to understand where the failure is taking place in the overall process. Barry
  3. David, To get more insight turn on debugging in the HA Bridge. This will send a lot of data to whatever you have defined as your log file. Just add the following parameter to the startup line in rc.local. Remember parameters appear before the call to the bridge, and must be preceded and followed by a space. -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG I generally reboot the RPi to clear the log file, but anyway that you can clear the log file will make it easier. The log file is chronological. Just say the phrase and you will see how the HA Bridge process the spoken words as interpreted by the Amazon cloud speech processor. The processing will be at the end of the log file and should be able to be spotted. (the log file is pure text. I look at it with textpad which understands unix and PC line endings which are different. Notepad doesn't
  4. There seems to be a bit of confusion regarding the control of thermostats. I will try and clarify things although I do not use the Echo to control my thermostats. Basic Concept: The Echo thinks it is talking to lights when it communicates with the HA Bridge (emulation of a Philips HUE Bridge) Therefor the basic commands must be those for lights. Basic lighting commands are 'Turn On', 'Turn Off, and 'Dim', Additional commands which seem to work are 'Shut Off' (same as Turn Off), 'Set' (same as Dim). Commands to tun on or off a Light, a Scene, or to run a program, take no other arguments. The configuration program is knowledgeable regarding Devices (Lights) Scenes, and Programs and will properly set the on and off URL's that the HA Bridge requires. When setting up for the dimming of a light, or other dim-able device (Scenes may not be dynamically dimmed) the configuration system adds a suffix to the command (DON) which is sent as the REST command. This command is the value to be used to set the brightness level of an Insteon light or device and must be an integer in the range of 0-255. The spoken value must be in the range of 0-100. The suffix that is appended to the DON by the configuration system will be ${intensity.byte} . There are other suffix's that may be used (${intensity.percent}, ${intensity.math}). The documentation on the configuration system discusses these alternate forms. Thermostats: Thermostats are not lights. The thermostats I own are Z-Wave devices which came with my Trane systems. I do not use the Echo to control my thermostats in any way. I very rarely change the settings on my thermostats. The ISY does report the state of my thermostats to my iPad controllers and my iPhone, and I can alter any of the thermostat settings from these devices. I also have one-wire sensors in every room that give me the exact temperature of that room when requested by the iPads/iPhone. If you want to control your thermostats using echo, then there are several approaches. 1) Blueman's approach using variables and programs when a variable value changes. He has discussed this in several posts to this thread. 2) A direct control approach using the ISY Climate commands (CLIMD, CLISPH, CLISPC, CLIFS). In a direct control approach you will need to modify the On and Off URL's set up by the Configuration system. For example, a command to set the system mode to Heat or Off would have as its on URL rest/nodes/<address>/cmd/CLIMOD/1, and its off URL rest/nodes/<address>/cmd/CLIMD/0 and for cooling the commands would have as its on URL 'rest/nodes/<address>/cmd/CLIMOD/2', and its off URL 'rest/nodes/<address>/cmd/CLIMD/0' To set the thermostats temperature set-point the ISY wants a rest command of the form 'rest/nodes/<address>/CLISPC/value' or 'rest/nodes/<address>/CLISPH/value' The phrase spoken to the Echo would be of the form: 'Alexa, Set the Bedroom thermostat to 75' where 'Bedroom thermostat' is the friendly name of the HVAC system Assuming we are dealing with Cooling the On URL would look like 'rest/nodes/<address>/CLISPC/${intensity.percent}'; however there is a glitch. Insteon thermostats operate in 1/2 degree increments so to set the set-point to 75 degrees one needs a value of 150. Z-Wave thermostats, at least the ones I have, operate in whole degree values so to set the set-point to 75 degrees one needs a value of 75. To gain this flexibility and still be able to say 'Set the thermostat to 75' we need to use a different suffix. The On URL would be of the form: 'rest/nodes/<address>/CLISPC/${intensity.math(f(x)}' where f(x) is a math expression to compute the ISY desired value from the spoken value. The spoken value will be between will be in the range 0-100; but IIRC, The Amazon Echo cloud will send that value as a number between 0 and 255 to the HA Bridge emulator. Seventy Five (75) will be sent as 192 (0.75*256). A math expression of the form X/255*100, where X represents the value received from the Amazon Cloud, will put the value from the Echo back to a number between 0 and 100. If it is an Insteon thermostat you will need an expression of the form X/255*200 will put the value in the range of 0-300, (75 spoken will be 150 for the ISY) When the expression is computed the value is rounded to the nearest integer. In summary the onURL for an Insteon thermostat cooling set-point would be, I think, the following: 'rest/nodes/<address>/CLISPC/${intensity.math(X/255*200}' I say 'I Think' as I have never tried it. Part of the fun of DIY Home Automation is working out the bugs by playing with the system.
  5. themlruts, I do not understand "...my rc.local file not working.... If the rc.local file is not working how are you starting the HA Bridge emulator? How do you know the rc.local file is not working? Normally when the RPi is set up the rc.local file is set as executable so there should be no issue un less there is something causing the file to abort its execution.
  6. I created programs for the fans for high medium, low and off. The Hue bridge does not handle things like High Medium Low. I assume Izzy will. What is wrong with your rc.local file other than the error I found in the -Dvera parameter?
  7. LeeG, Xanthos, Thanks for the clarification. I now understand what you are saying. I agree it is an Insteon limitation in the way they implemented the scene logic in their devices. I was confused in that I thought that ISY scenes were handled more like ISY programs with all of the logic and information in the ISY. I am happy the way it is.
  8. LeeG, A Scene supports all Insteon devices at all levels. What, AFAIK, you cannot do is command a defined scene to work at a specific brightness dynamically. I think it was you who told me this. You can use the REST interface to do DON, DOF, DFON, and DFOF, but I do not believe DON/50 will work to set the scene members to 50% dynamically. I have some scenes that are not controlled by devices but rather by REST commands directly or by REST commands to programs running either Then or Else branches. There is no way I know of to change the brightness of the members of those scenes as a group, i.e. all the members of the scene.
  9. The fact that scenes cannot be dimmed is an ISY design issue. A scene can set its members to specific dim levels, but a Scene will not accept a command to dim/brighten. You can have different scenes with the same members to set various moods and you could choose between them based on a variable using an ISY program
  10. I have been in contact with Amazon and BWS Systems regarding the discovery issue between the Echo and the HA Bridge. I actually tried putting all 93 of my devices onto a single bridge and echo would not discover any of them. BWS Systems states there is no forced limit in the HA Bridge. A bridge should be able to handle as many devices as desired. Amazon has stated and implied in their discovery process that the Echo may not discover all of the devices in a single pass (one request to do a device discovery). I now use the following process when changing the devices on my HA Bridge's. First I forget all devices. I then do repeated discovery requests until the Alexa app states that the number of devices discovered matches what is on my HA Bridges. I have had to repeat the discovery process up to 4 times. Based on the counts from the Echo, it appears to be discovering a subset of the total number of bridges, and which subset appears to be random based on the uPnP responses the Echo gets to its M-SEARCH requests. Personally I don't think Amazon will be changing anything in the near term, and I can live with the necessity for multiple discovery passes as it is an annoyance, not a failure. As an aside I am working on ceiling mounting the Echo (Architectural rule: No one looks up). Not a priority with me, but am interested in how many others would like such an approach. It would be upside down in a circular wooden holder, the holder mounting on the ceiling and requiring an outlet available to plug in the Echo (I live in a one story home with a full attic).
  11. I am in contact with both bws systems and Amazon on this issue. According to BWS the discovery is strictly local to LAN, but sooner or later something goes to Amazon as it has to populate the Echo Apps on mobile devices. It is not a router issue as far as I can determine. My personal opinion is that it is an Echo search timing issue. Amazon must know about it since they even tell you via the echo after a device discovery that "... if not all devices are discovered press the button on the HUE and do discovery again. BWS asked me to try something and I will do that and see what turns up.
  12. I just ran into the Echo/Bridge communications issue. As of today the echo seems to only find one of my bridges (1 of 4). Is everyone using 1.0.7 bridge having this problem?? I am going to try HA Bridge 1.0.8 Same thing on Bridge 1.0.8. I normally forget all devices then do a discovery. It used to find all the devices at once. Now it finds some of the devices. I then do a discovery without a forget all devices and it either finds some more or finds the rest. Subsequent discoveries will eventually bring the device total to the correct count. Is anyone else seeing this?
  13. Gi517, That kit will work fine. I Generally just buy a starter kit from Amazon ($49.99) Plus an 8G MicroSD for ($3.96). I have bought several of these from Prestige Milano via Amazon What you need for the end game is a RPi 2 model B, a plastic case (I get clear ones), A power supply ( prefer 2 Amp), and an 8G MicroSD card. This is normally sold as a "Basic Starter Kit". If you want to go wireless then you also need a WI-Fi Dongle/Adapter. If Possible I recommend Wired. All my RPi's run wired. To get started you need a monitor and a keyboard/mouse, an HDMI cable and an Ethernet cable. But I run all my RPi's wireless using tightVNC. It is easier to get started with a monitor/keyboard/mouse, keyboard/mouse on USB. But once started with tightVNC installed on RPi and a windows machine, RPi is very happy headless. The NOOBS Software is free (download from IIRC, RaspberryPi.org) and the tools to put the image onto the MicroSD are also free (SD Formatter and Win32DiskImager). All the application software is also free (HA Bridge, and Configuration program). All of the work to get started is quite easy and fairly well documented/discussed in this thread. It seems daunting if you have no Linux/Unix experience but it really is not. Plenty of info on the web to get started. Once you have the MicroSD setup and have selected Raspbian as the OS You will need to do an update and an upgrade to get all of the latest changes to the OS. The web has plenty of info on the process (IIRC 'sudo apt-get update' and 'sudo apt-get upgrade', but not sure of the order. As I said the web (yahoo or google search) is your best friend.
  14. Tungsten's comment is interesting. I do not run a windows firewall. I prefer to keep my LAN open to all interior (non WWW) traffic. I safeguard the LAN through my router which a Mikrotik unit which I can not say enough about. The following is a bit off-topic: Since I already had WAP's installed I purchased the Mikrotik router without the built in WAP, But I just did my grandsons new house and there I installed a Mikrotik router with a 1000 mw radio and no external antennas. It covers his whole house, a small house, from the basement. The mikrotik routers are very small (5"x5"x1") and very programmable through a windows app Mikrotik supplies called Winbox. IIRC the basic router is $59.95 and the router with the radio is $69.95. tehir support is almost as good as that of UDI. It is not a device for non network savy folk, although its basic OOTB configuration will work for 90% of the simple user configurations.
  15. themlruts, I am now totally confused by the multiple posts, so lets start over. What is the problem? 1) The configuration tool does not find the ISY 2) The configuration tool does not find the bridge? 3) The Echo does not find the Devices you have configured? 4) The bridge does not find the Harmony Device on your LAN? I will need the answer to the above Plus: 1) The IP address of the ISY 2) The IP address of the Raspberry Pi 3) A copy of the full Config program log (AWS_Config.log) 4) A copy of your rc.local file from the Pi 5) A copy of the Bridge's log file I suggest you reboot the Pi as that will re-initialize the Bridge's log file, or you can just erase it. Take all the information requested, it will all be textual, and put it into a zip archive. The answers to the questions can just be in a small text file. send the archive to me at my email address. My name is barry and I own the domain the-gordons.net so my email address should be obvious.
  16. themlruts, No -Dvera is the address of the ISY994 I posted this a few posts back: I run all of the HA Bridge programs on a single Raspberry Pi, changing the start line for each instance to have a different port number (8081 to 8084 for the 4 instances I run) . I have a folder /home/pi/echobridge with sub-folders logs and data. In the following sample things in <...> need to be your values. Although I show it on multiple lines it is all on one line with a space between parameters. The following is a typical start line from rc.local: nohup java -jar (space) -Dvera.address=<IP address of ISY994> (space) -Dupnp.config.address=<IP address of Raspberry Pi> (space) -Dserver.port=808x (space) -Dupnp.response.port=5000x (space) -Dupnp.device.db=/home/pi/echobridge/data/device84.db (space) -Dharmony.address=<IP address of your Harmony Hub/remote> (space) -Dharmony.user=<your harmony account userid> (space) -Dharmony.pwd=<your Harmony account password> (space) /home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &
  17. Interesting. I am running 4 emulators, all 1.0.7 with a total of 93 devices defined. The Echos (I have two) find all 93 devices and the Alexa app reports the same thing, 93 devices. The spread is 31, 35, 22, 5. The bridge with only 5 devices on it is for working with my own controller for handling my Pool and my Theater. The other 88 devices on the three emulators are all ISY devices. Do you have Amazon forget all your devices before discovering them? I always do that, and do it because when I first started with Echo if I did not do that it did not reliably find my devices. By forgetting before discovery it appears to be 100% reliable in the discovery process.
  18. I have just posted a new version (5.0.21) of the HUE Emulator Configuration program (AWS_Config.exe) on my web site (www.the-gordons.net). This version is the only valid version if you are using the Harmony Hub. It will only work with version 1.0.7 of the HA Bridge from BWS Systems (www.bwssystems.com). The ini file must have a valid Harmony Hub section i.e. [Harmony Hub] must exist in the ini file. The Restful-Harmony Java application is not needed, just the HA Bridge Java application. If you are not using the Harmony Hub and have removed the Harmony Hub section ([Harmony Hub]) from the ini file It will work with the older versions of the HA Bridge (versions 0.4.x). This version requires a complete install. It is compatible with the data bases of prior versions of the HA Bridge and will load them properly. This version has been tested with an actual Harmony Hub by a Harmony user and found to work properly. I do not have a Harmony Hub so I could not test it properly. If you discover any errors, have questions or issues, please contact me by email. I am barry and I own the domain the-gordons.net so my email should be obvious. If you feel the application is not working properly and need my help you must send me a copy of the "AWS_Config.log" file which will be found in the same directory as "AWS_Config.exe". The Debug line in the ini file should say 'All', i.e. the line in the ini file should be "Debug=All" (without the quotes). If you need information about the BWS Systems HA Bridge application, this link should help: https://github.com/bwssytems/ha-bridge I suggest you read all of the material The following link will download the HA Bridge application version 1.0.7: https://github.com/bwssytems/ha-bridge/releases/download/v1.0.7/ha-bridge-1.0.7.jar I run all of the HA Bridge programs on a single Raspberry Pi, changing the start line for each instance to have a different port number (8081 to 8084 for the 4 instances I run) . I have a folder /home/pi/echobridge with sub-folders logs and data. In the following sample things in <...> need to be your values. Although I show it on multiple lines it is all on one line with a space between parameters. The following is a typical start line from rc.local: nohup java -jar (space) -Dvera.address=<IP address of ISY994> (space) -Dupnp.config.address=<IP address of Raspberry Pi> (space) -Dserver.port=808x (space) -Dupnp.response.port=5000x (space) -Dupnp.device.db=/home/pi/echobridge/data/device84.db (space) -Dharmony.address=<IP address of your Harmony Hub/remote> (space) -Dharmony.user=<your harmony account userid> (space) -Dharmony.pwd=<your Harmony account password> (space) /home/pi/echobridge/ha-bridge-1.0.7.jar > /home/pi/echobridge/logs/log84.txt 2>&1 &
  19. The entry was being escaped incorrectly. It is fixed for the next release. The escape should only have been on the ISY address as the ISY wants to see the address that way.
  20. apnar, I escaped the entry but it seems I do not need to. I will fix it in the next release. This version, while working with the HA Bridge you are using (1.0.7) is having problems getting the Harmony stuff correct. If you are not using the Harmony remote no issue. I am working on getting the Harmony issues resolved today.
  21. rdavidowski, The new version should help you as I solved some of your issues. After making a change to the URL's for the harmony you must do an update to have it take effect on the HA Bridge. The Harmony ID is just shown for informational purposes. It can not be changed as it is used by the HA Bridge when talking to the Harmony device. The friendly name is only used by Alexa when it tries to find the device in its content.
  22. I The latest version of the Configuration system with support for the Harmony hub is on my web site. When you have an issue PLEASE follow the instructions on my web page. It is important that you send me the log file after the running of the program. Without the Log File I can't do much.
  23. I just uploaded a new version of the AWS_ Configuration program. This version, 5.0.10 will work with the Harmony emulator (Restful Harmony) as a separate java program or integrated in the HA Bridge. For the Harmony capability to operate you must have the .ini file modified to include a Harmony Hub section with two entries as Follows: [Harmony Hub] Emulator = 192.168.1.82:8081 ' if integrated into the bridge, make the same as the bridge Antonyms = Up/Down, Left/Right, On/Off, Forward/Backward, ToStart/ToEnd, BackToTick/ForwardToTick, FastForward/Rewind, Play/Pause, 16:9/4:3 Please read the word document that is included in the install. An Install is required as this version uses two icons (lock and unlock) to protect the Harmony URLs which generally should not be modified. If there are any issues or bugs discovered please contact me at my email I am barry and own the-gordons.net so my email should be obvious. Include the log file (AWS_CONFIG.log) with the Debug parameter in the system section of the .ini file set to 'All' that is, "Debug=All" without the quotes. I generally resolve issues and respond the same day, providing you send me the log file. Have fun!!
  24. None that I can see. I don't see any reason why between 4.1 and 4.10 you would need to rebuild your devices but . . . You can always save a copy of the Emulators data base and then restore it. Just remember that you need to restart the emulator after restoring the changed data base as the emulator only reads it on startup. I normally just reboot the Pi if I need to do that.
  25. I use a standard layout on the Pi. I define a directory under /home/Pi named echobridge. ergo ther is a structure on my Pi that is /home/pi/echobridge. I place all jar file (i run 4 emulators on one Pi since I have a lot of devices), but only one JAR file is needed. I keep prior versions in that directory also. In the echobridge directory, I have two sub directory, one named logs, and one named data.. The logs directory will hold all the log files that the JAR produces, The data holds all of the data files. In the directory /etc there is a file named rc.local. It is a bash script that is run at startup. It is where the 4 instances of the emulator are started. I am pretty sure I documented the exact contents of that file as it stands on my system in an earlier post in this thread. Basically there are 4 lines each of which start an instance of the emulator with slightly different command line parameters. The differences being the specific name of the log file to be used by a specific instance of the JAR and the specific name of the data.db file that that instance of the emulator is to read when it starts. The 4 lines in my rc.local look like: nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8081 -Dupnp.response.port=50001 -Dupnp.device.db=/home/pi/echobridge/data/device81.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log81.txt 2>&1 & nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8082 -Dupnp.response.port=50002 -Dupnp.device.db=/home/pi/echobridge/data/device82.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log82.txt 2>&1 & nohup java -jar -Dvera.address=192.168.1.229 -Dupnp.config.address=$_IP -Dserver.port=8083 -Dupnp.response.port=50003 -Dupnp.device.db=/home/pi/echobridge/data/device83.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log83.txt 2>&1 & nohup java -jar -Dvera.address=192.168.1.229 -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG -Dupnp.config.address=$_IP -Dserver.port=8084 -Dupnp.response.port=50004 -Dupnp.device.db=/home/pi/echobridge/data/device84.db /home/pi/echobridge/ha-bridge-0.4.10.jar > /home/pi/echobridge/logs/log84.txt 2>&1 & The last line is a little different as it has debugging turned on. The IP address is stated as $_IP which is a variable that is set up earlier in the rc.local file by the following: # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi Hope that helps. I will post the next version of the configuration system either late tonight or early tomorrow. There is a new JAR available from BWS Systems that integrates the restful harmony system directly into the HA Bridge. I need to check that one out for compatibility with the Configuration system, and then make any necessary revisions.
×
×
  • Create New...