txNgineer Posted March 9, 2014 Share Posted March 9, 2014 Hi, please forgive the newbie question and route me elsewhere if appropriate. I have a number of sensors around our little ranch that I would like to incorporate into the ISY-994-iZ system. My question is where to start in designing a proper interface. I can condition the sensor data into any format (analog, RS-485, TCP/IP) but I don't know where to begin on getting that data into a protocol and form that the ISY can read and use. I have downloaded the SDK information and am studying it but I am not sure that is the simplest/best approach) Any suggestions would be appreciated. Thanks in advance. Link to comment
MaddBomber83 Posted March 9, 2014 Share Posted March 9, 2014 Some sensors can be done easily if they output something the ISY can sense. An example would be a leak detector that has a 12 or 24 volt on / off signal that interfaces with an insteon I/O module. Something more complicated, such as water level that outputs a variable voltage or current. I've seen a few people use modules from the Elk Security System to send that information over to the ISY. There are a couple solutions that use the 1 wire bus through another interface such as a Raspberry PI. With these you can get temperatures, humidities, and with a bit of tinkering, 0-10vdc signals sent to the ISY. A list of your current sensors, what they do, and what outputs they have would make responses more useful. Link to comment
txNgineer Posted March 9, 2014 Author Share Posted March 9, 2014 The guide is a most excellent reference! It clears up a lot. Using the Raspberry Pi would let me easily get all the following into a single value form and then feed that to the ISY variable. To answer your question, what I have would be at least the following: Water pressure -- analog (4-20ma which I can make 0-5v very easy) Water pressure low alarm -- NO contact Water pump power -- analog 0-5v Water flow rate -- pulses/sec which I convert to analog 0-5v Main gate open -- NC contact Main gate locked -- NO contact Main gate - lock -- relay output Main gate - operate -- relay output UPS on/off signal -- NO contact Main A/C power use -- analog 0-5v Office A/C power use -- analog 0-5v Irrigation -- bypass -- relay output (note this is possible with Weather module I think) Doorbells 1, 2, & 3 -- ring -- NO contact Barn door open -- NC contact Pool Pump on/off -- relay output Pool Pump hi/lo -- relay output Pool temperature -- digital (onewire) Lots of other temperature items -- digital (onewire) etc., I will add more stuff as I have time. As you can see, it is a serious kludge to take each one of those and put it into a $80 each Insteon module (plus I cannot afford that). The other thing I want to be able to do is feed the weather and soil data into the ISY like in the Weather module but to use my actual data rather than the data from a "nearby" location. Here in the Texas gulf coast we have large variability across just a few miles due to the microclimate effects of the Gulf. My current weather data is being stored on my server and includes: Temperature Relative humidity Dewpoint Soil temperature at 6 inches Soil moisture at 0.5, 1, and 3 ft. Measured evapotranspiration Rainfall (captured every 6 min) Solar intensity Solar heat gain So I guess my second question is how can I push my weather data into the ISY? Do I also need the Weatherbug module? Thanks for your help! Link to comment
Michel Kohanim Posted March 9, 2014 Share Posted March 9, 2014 Hello txNgineer, You can use State Variables and then use the REST interface to publish your values to ISY. Above and beyond that, unfortunately, there's really no other way to publish Weather information into ISY. With kind regards, Michel Link to comment
MaddBomber83 Posted March 9, 2014 Share Posted March 9, 2014 I really need to grab my module and check out the the variable voltages. Anyway, yes you can get your local weather data into isy. There are a few catches and hangups. Using 1 Wire, you could easily get temperature and humidity, but you are looking for more weather station type stuff. One of the forum users has set up a home weather station. Using WUnderground you can actually register your personal weather station so that it is accessable online with a weather station ID. From there you can set weather bug to get the data from your personal weather station's ID. I've personnaly not gone through this process, so there are a few things you'll want to check out. A Forum post, long, but at the end they start getting into how to set this up. A forum user's web site where he lays out additional details and has some pictures. WUnderground's site on the PWS Now looking at the rest of your list: Your I/O contacts can be connected to anything I/O related with ISY. an example would be the EZIO8SA or EZIO2x4. These devices can be used to connect 4 switch type inputs into Insteon signals. There are also the I/O links. You are still looking at $40 per signal though. For the 0-5V stuff, that can be pushed through on the 1 wire bus using their battery sensor. An example of doing this is here: http://davidbray.org/onewire/barometer.html As surface mounting the ship can be a pain, I purchased a few from Sheepwalk Electronics. It is a custom part, 16 british pounds is what they sold them to me for. It is this Humidity Sensor with the humidity sensor removed. Going a different route, check out this post for doing the I/O and 4-20ma signals using the elk module. Link to comment
txNgineer Posted March 11, 2014 Author Share Posted March 11, 2014 I really appreciate all the help! I fully understand how to set up and use a Weatherunderground station and have been meaning to do that. Knowing I can point Weatherbug to a Weatherunderground station fills the need on that for the data that Wunderground uses. The hardware stuff is very easy for me. I have enough design and building experience that I can get all the data into a machine. It does not matter to me if that machine is a RPi (nice "cool factor"), an Arduino (nicer I/O but limited on interface to web/ISY), or my home server (already up and running). So my problem is not on that end. Where I have issues is that currently none of my various software solutions are as nicely integrated as the ISY is and it is much better use of my time to use the ISY than try to build some custom integration software for my server. Thanks for the tips on pushing variables into the ISY with REST. I have been studying the API documentation and it seems to give me everything I might need -- Except the basic entry points. Maybe I am just thick (or lost in the document), but I am not seeing how to set a variable in the ISY. Is it an Event and is the variable definition a Node? Also, how do I access REST? I guess I am just not clear on what I would call a functional diagram of the system. For example, is a module separately developed and integrated into the ISY firmware? Sorry to be such a noob. Thanks Link to comment
tracknut Posted March 12, 2014 Share Posted March 12, 2014 I've been having a blast in the last couple weeks putting together a "My Home Automation" web page in php that uses the rest interface to query and set stuff in the ISY. If PHP sounds like your thing, and you want some example code on setting variables, let me know and I'd be happy to forward it. Dave Link to comment
Michel Kohanim Posted March 13, 2014 Share Posted March 13, 2014 Hi txNgineer, To set a variables: /rest/vars/init/// Sets the initial value of variable at ISY startup /rest/vars/set/// Sets a variable given by var-id What you need to do - as tracknut suggested - is a network client that can create http GET requests and then send it to ISY. Do you have such a solution? With kind regards, Michel Link to comment
txNgineer Posted March 13, 2014 Author Share Posted March 13, 2014 Hi Tracknut, Yes please; if you point me to some PHP examples I can use them to help me understand. I can "speak" lots of programming languages, but I am not a "pretty code" pro. I grew up in the pre-object oriented world and tend to fall back into those habits when doing my personal code projects. But I am a quick study and your PHP would be a big help. Hi Michael, Yes I can do enough HTML to put together some simple GET-POST queries. If I understand from piecing the bits in this thread and the SDK docs this would be a general concept: 1. Using HTML or PHP (or Python bindings to one of them) to build a set of queries that first search for an ISY 2. Then when I get an answer I query the ISY on http:///desc to get the control URL. 3. Then you send a POST to authenticat and a POST to subscribe [???? not sure of this] 4. At that point I use POST commands with the REST data you gave [???? not sure of this] Am I even close on this? Thanks all. Link to comment
tracknut Posted March 13, 2014 Share Posted March 13, 2014 <?php$_SESSION['key'] = mt_rand(1,1000);display_variables_by_type ("Integer",VAR_INTEGER);display_variables_by_type ("State",VAR_STATE);?> Link to comment
txNgineer Posted March 15, 2014 Author Share Posted March 15, 2014 Most excellent! I can't wait until next weekend when i can have some time to try it out Thanks Link to comment
Recommended Posts