Results 1 to 16 of 16

Thread: Home automation interface.

  1. #1
    New User
    Join Date
    Apr 2013
    Location
    Illinois
    Posts
    5

    Home automation interface.

    Another hobby of mine is home automation. This allows lights, video, music, cameras etc to be controlled by scripts, remotes etc. I would like to be able to control my Apex from my home automation system. A simple application would be to dim the tank lights when I want to watch a movie. I know that I can do this from my iphone with the apex app. But I would like to make it an automatic part of a script that controls the house lighting, the TV, etc.

    Does Apex have a TCP protocol that would allow an external application to control outlets, feedings etc? I have tried using the Telnet interface with limited success. Telnet is designed with a human interface so it gets difficult for my home automation system to handle.

  2. #2
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463

    Home automation interface.

    There is no official API.

    Obtaining status data is relatively easy by pulling the available XML data.
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  3. #3
    New User
    Join Date
    Apr 2013
    Location
    Illinois
    Posts
    5
    Thanks Russ, I want to change the state of the outlets. I have had some success using the Apex Telnet interface. I can control outlets using the Telnet interface. Just takes a lot of experimenting to get the controlling scripts just right.

  4. #4
    New User
    Join Date
    Jan 2013
    Location
    Temecula, CA
    Posts
    8
    Can you please elaborate on how you are doing it and what you are interfacing with? I also do a lot of home automation and would like to link in event triggers

  5. #5
    Regular Vistor
    Join Date
    Nov 2014
    Location
    Canada, Toronto GTA
    Posts
    27
    Is this thread alive.

    I am about to do this kind of automation/monitoring. (I'm a Newbie to Apex, just over a month). However have years of automation experience, that I can share.

    Just wrote a perl script to parse the XML and produce a OUTLET report. Willing to share how I did it...
    In less then a day, had it running on my Windows 7 PC for $free using ActiveState Per. http://www.activestate.com/activeper...FW4F7Aod_j4AXA



    Next step would be to add Expect scripting to control outlets via TELNET command. (Expect is automated TELNET script languaage), does in a script what a human does, but automatically with many things you can decide on based on many inputs you can gather. http://www.admin-magazine.com/Articl...Expect-Scripts (It may seem complex, but it's not for basic stuff). Especially easy, when you run AUTOEXPECT, which allows you to do your telnet session, and it captures what you did, and the Expect script writes an Expect script for you. http://expect.sourceforge.net/exampl...xpect.man.html

    I've used both technologies to do some really cool stuff at work. Time to do the same with my Apex.

    If you add some push buttons via the Apex Digital inputs, you can even make it more useful.

    I am surprized that there are not many posts about script automation. Considering before the WEB, and Fusion stuff came along for Apex, stuff like this was really needed.

  6. #6
    Frequent Visitor
    Join Date
    Jul 2013
    Location
    Singapore
    Posts
    52
    I agree!

    I am looking to do things the other way round! I want Apex to send a script to my irblaster to switch on or off my Aircon in detection of certain temp conditions!

    Does not seem to be possible yet

  7. #7
    Regular Vistor
    Join Date
    Nov 2014
    Location
    Canada, Toronto GTA
    Posts
    27
    Quote Originally Posted by oliverpool View Post
    I agree!

    I am looking to do things the other way round! I want Apex to send a script to my irblaster to switch on or off my Aircon in detection of certain temp conditions!

    Does not seem to be possible yet
    I might me able to help you. I've learned a lot about script automating and getting information from the Apex.

    Let me get this right. You have a IRblaster which is a serial connected IR transmitter. You want it to transmit a IR signal to your Aircon air conditioner which has a IR receiver.

    How are you controlling your IRblaster? From a computer? If yes, then you can simply use that computer to get the Temp from the Apex. Then that computer can check the temp, and then send the ON or OFF as you wish.

    That would be possible with a script. (running on the computer every 5,10, 15, 30 minutes). (Yes the computer would have to be on all the time). I guess you want the check done on the Apex, since it is on all the time. However you would still need something to controller the IRblaster.

    Is that what you are trying to do?


    Here is an example of a script OUTPUT I wrote (written in Perl). It queries the APex from my Windows or My Linux computer and tells me how long my Dosing pump outlet is running. Did this since looking at the Apex XML is a bit tricky if many outlets going on and off.

    Here is the running script OUTPUT


    ************************************************** **************
    * Starting XML Outlet Query
    *
    * (Today TYPE Query 00:00 hrs-24:00 hrs)
    *
    * Controler IP Address=(192.168.2.18)
    *
    * Scanning for OUTLET=(EB8_B3-DOS-A)
    *
    ************************************************** **************

    Please wait...

    -----> CONTROLLER NAME = ( apex )
    ----->
    -----> OUTLET NAME = (EB8_B3-DOS-A) (12/03/2014 03:00:00) (ON)
    -----> OUTLET NAME = (EB8_B3-DOS-A) (12/03/2014 03:00:20) (OFF)
    -----> OUTLET NAME = (EB8_B3-DOS-A) (12/03/2014 03:54:40) (ON)
    -----> OUTLET NAME = (EB8_B3-DOS-A) (12/03/2014 03:55:00) (OFF)-
    -----------------------------------------------------------------
    Outlet (EB8_B3-DOS-A) found: (4) TIMES
    -----------------------------------------------------------------
    '

    You could possibly scan for Probe temperature.

  8. #8
    Frequent Visitor
    Join Date
    Jul 2013
    Location
    Singapore
    Posts
    52
    thanks for your reply! My Ir blaster is a network device and accepts UDP commands. I would hope that Apex would allow the sending of udp commands as that would help alot with any home automation options we may have in the future.

    At this time, I do not want to have a PC up and running 24/7 to increase my power bill :-p It would be a option as I am building up a low power PC from zotac. Once I get this up, I will explore more on using scripts via my zotac. It seems it might open up alot of possibilities for me!

  9. #9
    Regular Vistor
    Join Date
    Nov 2014
    Location
    Canada, Toronto GTA
    Posts
    27
    HI oliverpool. Every hear of the Raspberry PI mini computer. This might suit your need for automation. Google it.

    Just ordered one of the older versions Model "B". Will run my Apex Queries on it if possible. Should work, since my code is currently running on Linux with Perl.

    For $49 (cheaper outside of Canada) I can't go wrong. So small, you can mount under your apex, runs off USB power adpater. Much cheaper than any Zotac.

  10. #10
    Regular Vistor
    Join Date
    Jan 2015
    Location
    Canada
    Posts
    22
    OK, I want to be able to get status data from my Apex for use with my ISY home automation controller. I currently use a Raspberry Pi to make voice announcements by sending it commands over the network. So I'm hoping I can read the status on the Apex (Temp, PH, etc) using my Raspberry Pi and make it available to the ISY as a network resource.

    I realize this thread is VERY old.

  11. #11
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by Pluto View Post
    OK, I want to be able to get status data from my Apex for use with my ISY home automation controller. I currently use a Raspberry Pi to make voice announcements by sending it commands over the network. So I'm hoping I can read the status on the Apex (Temp, PH, etc) using my Raspberry Pi and make it available to the ISY as a network resource.

    I realize this thread is VERY old.
    If you dont mind waiting a while, Alexa support is coming in the near future, which would make the need for that irrelevant.

    Sent from my SM-G965U using Tapatalk

  12. #12
    Aquaphile
    Join Date
    Apr 2018
    Location
    California, USA
    Posts
    70
    Quote Originally Posted by zombie View Post
    If you dont mind waiting a while, Alexa support is coming in the near future, which would make the need for that irrelevant.

    Sent from my SM-G965U using Tapatalk
    Can't wait for Fusion to be integrated with Alexa as well: "Hey Alexa, ask Zombie to write me a code to turn on my Aquarium lights and shut down all of the noisy pumps etc. when my diner guests show up tonight."

  13. #13
    Regular Vistor
    Join Date
    Dec 2013
    Location
    New Hampshire
    Posts
    20
    Quote Originally Posted by MrT View Post
    Can't wait for Fusion to be integrated with Alexa as well: "Hey Alexa, ask Zombie to write me a code to turn on my Aquarium lights and shut down all of the noisy pumps etc. when my diner guests show up tonight."
    🤣🤣🤣

    Sent from my SM-G950U using Tapatalk

  14. #14
    Frequent Visitor
    Join Date
    Apr 2014
    Location
    SE Mass
    Posts
    366
    The wait is over!

    Coming soon!


  15. #15
    Aquaphile
    Join Date
    Apr 2018
    Location
    California, USA
    Posts
    70
    That is Awesome!!!!!
    Last edited by MrT; 07-20-2018 at 10:06. Reason: spelling error

  16. #16
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940

Similar Threads

  1. RO water automation
    By evian_domino in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 18
    Last Post: 10-22-2017, 09:34
  2. Replies: 3
    Last Post: 04-05-2016, 20:17
  3. Apex Integration With Home Automation System
    By adamw in forum Misc Apex Usage & Programming
    Replies: 9
    Last Post: 10-09-2015, 13:48
  4. reservoir automation.
    By Cullymoto in forum Misc Aquarium Automation Discussions
    Replies: 7
    Last Post: 03-03-2015, 11:05
  5. H2O Automation
    By AOS in forum Misc Aquarium Automation Discussions
    Replies: 2
    Last Post: 03-01-2015, 08:32

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •