Author Topic: Altsteon working on UI7  (Read 12130 times)

Offline Tank

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +11/-7
Altsteon working on UI7
« on: March 10, 2015, 09:31:44 pm »
Ok so this is still a work in progress but I have a couple Insteon devices working on UI7 with the Altsteon daemon running on a Raspberry Pi. (I moved it to a Linux VM now to free up the Raspberry Pi, it works just as well)

If you have any useful input I'm welcome to suggestions.  And if anyone else wants to give it a try I'll attach the modified files here.

What I've tested so far:
- SwitchLinc (On/off and dimmers)
- FanLinc

To-Do:
- I need to update the Device Options javascript.  Right now the device options show a blank page.
- Test KPLs
- Create an SD card image for the Raspberry Pi - See here
- Automate creation of Insteon devices through Vera UI

Update 5-14-15: I made some changes that allow the FanLinc to work with UI7.  Please see attached for the updated files.  The original file was causing reloads due to an typo in the device type of the child device that controls the fan.  I was able to find the error thanks to RexBeckett's advice on plugin migration to UI7. 

Update 5-18-15: I've created a new repository on SourceForge since the old one is dead.  I'm in the process of updating the files and instructions for UI7.  I'm not a developer and I'll prob have trouble getting everything working on UI7, so if anyone wants to help out let me know.

Update 5-27-15:
Tested dimmer and relay KPLs.  Everything is working, no changes needed.

Instructions for running on Raspberry Pi / Linux box:
This can also run entirely on the Vera, but since it's not supported I'm not including the instructions here.


1) Install pre-requisites, get the source, and build the binaries

Code: [Select]
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install automake
sudo apt-get install git

git clone git://git.code.sf.net/p/altsteon/code altsteon-code

cd altsteon-code/
cd altsteon-daemon/
aclocal
automake --add-missing
./configure
make
make install

2) Set the Altsteon daemon to startup automatically

    I would recommend creating a service under /etc/init.d

3) Install the needed files on the Vera

   Get the files here: https://sourceforge.net/projects/altsteon2/files/

   Go to "Apps" -> "Develop Apps" -> "Luup files"
   and upload all of the files in that folder using the Vera UI.
   When uploading the files, do not check the box to "Restart Luup after upload".

4) Create the PLM device

   Go to : Apps -> Develop Apps -> Create device and enter these values :
   
      Device type : urn:geektaco-info:device:plm:1
      Internal ID : plm
      Description : plm
      Upnp Device Filename : D_InsteonPlm.xml
      Upnp Implementation Filename : I_InsteonPlm.xml
      Ip Address :  <Address of the machine you are running the daemon on>
      MAC : <blank>
      Room : <doesn't matter>
      Parent device : No parent/Please select
     
   Click "Create device".   You should eventually get a pop-up indicating that a new device has
   been created.  If you go back to the "Devices" section of the dashboard you should see a place holder
   for the plm.  If not, hit the "Reload" button to let the Vera find it.
   
   If you see the PLM in your dashboard, you are ready to start adding Insteon devices to be controlled.
   It is best to start with adding a single device and then testing it before starting to bulk add your
   devices. 

5) Link all devices to PLM.
    You MUST link all your Insteon devices to your PLM. See your PLM's and device specific User Manuals for the method.

6) Add your devices to the Vera.  Instructions for each device can be found in altsteon_instructions.txt
    which is included with the Vera files that were downloaded in step 3.
« Last Edit: May 27, 2015, 01:59:53 pm by joey52685 »

Offline xuniman

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-1
Re: Altsteon working on UI7
« Reply #1 on: May 18, 2015, 03:34:12 pm »
I am very interested in installing 2 fanlincs and already have a RPi running for a security system interface (AD2USB through the Pi via ser2sock). What do I need to actually make this work with my Vera 3 running UI7? Do I need just a powerlinc modem like the Insteon 2413U? Does it connect to the Pi via USB or to the Vera3?

Offline Tank

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +11/-7
Re: Altsteon working on UI7
« Reply #2 on: May 18, 2015, 03:37:11 pm »
I am very interested in installing 2 fanlincs and already have a RPi running for a security system interface (AD2USB through the Pi via ser2sock). What do I need to actually make this work with my Vera 3 running UI7? Do I need just a powerlinc modem like the Insteon 2413U? Does it connect to the Pi via USB or to the Vera3?

You need the powerlinc modem.  It can connect to either the Pi or the Vera.  But you'll have to gain root access if you want to connect it to the Vera which may void your warranty.

Offline xuniman

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-1
Re: Altsteon working on UI7
« Reply #3 on: May 18, 2015, 03:42:26 pm »
Thanks for the quick reply. So I plug the 2413U into the RPi; add the Fanlincs to the 2413u, compile and run Alsteon on the PI, and then use the instructions in this post (http://forum.micasaverde.com/index.php/topic,10471.0.html), along with your files, to create the Fanlinc devices in the UI7 interface?

Does that sound right?
« Last Edit: May 18, 2015, 03:46:32 pm by xuniman »

Offline Tank

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +11/-7
Re: Altsteon working on UI7
« Reply #4 on: May 18, 2015, 03:52:03 pm »
Thanks for the quick reply. So I plug the 2413U into the RPi; add the Fanlincs to the 2413u, compile and run Alsteon on the PI, and then use the instructions in this post (http://forum.micasaverde.com/index.php/topic,10471.0.html), along with your files, to create the Fanlinc devices in the UI7 interface?

Does that sound right?

You got it.  I should probably add those instructions  to this page and post the binaries for Raspbian to make it easier.

Also I would recommend adding the Altsteon binary to your init file so that it starts up automatically.
« Last Edit: May 18, 2015, 03:55:29 pm by joey52685 »

Offline M2MExpert

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
Re: Altsteon working on UI7
« Reply #5 on: September 13, 2015, 03:53:16 pm »
Trying to get this running on UI5 before upgrading to UI7. I have Altsteon running OK on my Linux VM. In my Vera Lite I uploaded everything and created my PLM device but it won't load. I get a Luup error.

I reset to defaults and started over.  I get the same error:

01   09/13/15 12:45:47.567   LuaInterface::LoadCode: [string "..."]:546: 'end' expected (to close 'if' at line 539) near 'luup' <0x2ab1d000>
01   09/13/15 12:45:47.830   Device_Interface::CreateLuaInterface 8 failed to start engine <0x2ab1d000>
- M2MExpert
Machine to Machine Communications Specialist

Offline jimbo333

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
Re: Altsteon working on UI7
« Reply #6 on: January 11, 2016, 05:57:10 pm »
One of the Altsteon devs here.  The original Altsteon is still alive, just not much activity since everything has been working for me (UI 7 included).  Could you describe your problem and let me know if you want to try and get some of your changes merged back in.

Offline wystewart

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Altsteon working on UI7
« Reply #7 on: January 22, 2016, 10:06:28 pm »
what would be involved in getting altsteon daemon running directly on Vera Edge?

Offline ibrewster

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Altsteon working on UI7
« Reply #8 on: January 24, 2016, 07:54:12 pm »
One of the Altsteon devs here.  The original Altsteon is still alive, just not much activity since everything has been working for me (UI 7 included).  Could you describe your problem and let me know if you want to try and get some of your changes merged back in.
Just FYI, one issue I ran into with UI7 just now (that this fixed, thankfully), was that with the .8 code, adding a FanLinc caused my llup engine to go into a reboot loop. Switching the FanLinc files over to the ones from this distribution did fix the issue.

On a different note, can the daemon be compiled and work on Mac OS X? My first attempt wasn't successful, apparently due to trying to do a static build and the lack of a static version of one of the libraries. I haven't dug into the build enough to be sure yet, however. Wondering if someone else has experience with it. Otherwise I may just be sticking to running it on my VeraLite with the pre-built binaries from the original project.

Offline scravott

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +0/-1
Re: Altsteon working on UI7
« Reply #9 on: February 10, 2016, 07:44:29 am »
Is there support for older keypadlincs. I have said button keypadlinc subcat 9 insteon version 1.8 that I can't get working. I have tried to add it to the I_Insteonplm.XML file and can only get tile in UI 5 that don't work.  I have been runningthe last developer build of altsteon(10-2013) for quite sometime and have several insteon devices operating successfully including 3 iolincs, 2 8 button dual band keypadlincs, a fanlinc, and an EZflora. If someone could help me out and add the older keypad to the daemon or tell me how that would be great. Earlier attempts to upgrade to UI 7 with altsteon were disasterous for me thats why im still on UI 5. Thanks.

Offline sship21

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Altsteon working on UI7
« Reply #10 on: February 29, 2016, 03:01:56 pm »
Would it be possible to get binaries and/or instructions to build the daemon for a VeraEdge?

Thanks!

Offline BillC

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Altsteon working on UI7
« Reply #11 on: March 25, 2016, 12:44:41 pm »
I am really struggling understanding how all this fits together.  I have a VeraEdge with a Insteon PLM installed.  Its working and controlling several switches.  I want to use the Insteon leak sensors and since they don't work natively with the factory Insteon compatibility from Vera, I want to install Alsteon.  I am confused on installing it.  Do I need another device running some code that the Alsteon calls, or can it all be running on the Vera Edge?

Sorry if these may be dumb questions, but I am new to this and I haven't gotten all the pieces together in my mind

thanks

Bill

Offline ibrewster

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Altsteon working on UI7
« Reply #12 on: March 25, 2016, 01:38:05 pm »
I am really struggling understanding how all this fits together.  I have a VeraEdge with a Insteon PLM installed.  Its working and controlling several switches.  I want to use the Insteon leak sensors and since they don't work natively with the factory Insteon compatibility from Vera, I want to install Alsteon.  I am confused on installing it.  Do I need another device running some code that the Alsteon calls, or can it all be running on the Vera Edge?

Sorry if these may be dumb questions, but I am new to this and I haven't gotten all the pieces together in my mind

thanks

Bill

The altsteon daemon needs to run on the device with the instead PLM, which in this case is your vera edge. Note that it runs INSTEAD of the built in insteon support, not in addition to it - you have to disable the built-in support before altsteon will work. Once the altsteon daemon is running, you go into the altesteon_cli (the other binary provided) and "add" each of your devices. This lets the altsteon daemon know about them and communicate with them. Then, following the directions included in the distribution, you add each of your devices to the Vera UI.

I can't speak to the Vera Edge specifically, but on my old Vera Lite and my current Vera Plus the Vera 3 binaries included in the distribution work fine. I used scp to copy them to my vera, then followed the included directions to get it all set up and working. I also found that, in general for me, the "old"/original release worked best, with the exception I noted previously for the FanLinc implementation files. I didn't have much luck getting a full 2 install to work, but then I didn't spend much time trying either, as the .8 release did work fine (after replacing the fanlinc files) Good luck!

Offline BillC

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Altsteon working on UI7
« Reply #13 on: March 25, 2016, 01:49:57 pm »
I am really struggling understanding how all this fits together.  I have a VeraEdge with a Insteon PLM installed.  Its working and controlling several switches.  I want to use the Insteon leak sensors and since they don't work natively with the factory Insteon compatibility from Vera, I want to install Alsteon.  I am confused on installing it.  Do I need another device running some code that the Alsteon calls, or can it all be running on the Vera Edge?

Sorry if these may be dumb questions, but I am new to this and I haven't gotten all the pieces together in my mind

thanks

Bill

The altsteon daemon needs to run on the device with the instead PLM, which in this case is your vera edge. Note that it runs INSTEAD of the built in insteon support, not in addition to it - you have to disable the built-in support before altsteon will work. Once the altsteon daemon is running, you go into the altesteon_cli (the other binary provided) and "add" each of your devices. This lets the altsteon daemon know about them and communicate with them. Then, following the directions included in the distribution, you add each of your devices to the Vera UI.

I can't speak to the Vera Edge specifically, but on my old Vera Lite and my current Vera Plus the Vera 3 binaries included in the distribution work fine. I used scp to copy them to my vera, then followed the included directions to get it all set up and working. I also found that, in general for me, the "old"/original release worked best, with the exception I noted previously for the FanLinc implementation files. I didn't have much luck getting a full 2 install to work, but then I didn't spend much time trying either, as the .8 release did work fine (after replacing the fanlinc files) Good luck!

OK, thanks - that clears that up, but where is the best place for the best instructions and code?
 I have found several places with old code with conflicting instructions   and dead/outdated links

Bill

Offline ibrewster

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Altsteon working on UI7
« Reply #14 on: March 25, 2016, 02:12:02 pm »
OK, thanks - that clears that up, but where is the best place for the best instructions and code?
 I have found several places with old code with conflicting instructions   and dead/outdated links

Bill
As far as install instructions, I always just turn to the instructions included with the distribution in the "Vera Files" folder - the altsteon_instructions.txt file. They are (to my mind at least) well written, and fairly comprehensive. Of course, I've done the install several times, so generally I just have to look for a quick refresher, but I don't recall any major problems following those instructions the first time.

As far as links/code, there are two places that I look. The first is https://sourceforge.net/projects/altsteon/, just click the green "download" button to get the code/binaries/directions. This gives the original "0.08" release, which is what I run. Then there is https://sourceforge.net/projects/altsteon2/, where the green download button just gets you the Vera Files directory, not the binaries. That's fine, though, since for me at least all I used from that distribution was the FanLink files from that directory. Either download will get you the instructions.txt file.

If you do want to try just running altsteon2, you can get the binaries from that project by going over to the code tab of that second link, where you can also get source code for building the binaries yourself. Personally, I wouldn't bother :-)