Altsteon working on UI7

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

[glow=green,2,300]Update 5-14-15:[/glow] 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.

[glow=green,2,300]Update 5-18-15:[/glow] 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.

[glow=green,2,300]Update 5-27-15:[/glow]
Tested dimmer and relay KPLs. Everything is working, no changes needed.

[glow=red,2,300]Instructions for running on Raspberry Pi / Linux box:[/glow]
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]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
[/code]

  1. Set the Altsteon daemon to startup automatically

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

  2. Install the needed files on the Vera

    Get the files here: Altsteon 2.0 - Browse Files at SourceForge.net

    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”.

  3. 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 :
    MAC :
    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.

  4. 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.

  5. 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.

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.

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?

[quote=“xuniman, post:4, topic:186379”]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?[/quote]

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.

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>

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.

what would be involved in getting altsteon daemon running directly on Vera Edge?

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.

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.

Would it be possible to get binaries and/or instructions to build the daemon for a VeraEdge?

Thanks!

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

[quote=“BillC, post:12, topic:186379”]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[/quote]

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!

[quote=“ibrewster, post:13, topic:186379”][quote=“BillC, post:12, topic:186379”]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[/quote]

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![/quote]

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

[quote=“BillC, post:14, topic:186379”]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[/quote]
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 Altsteon download | SourceForge.net, 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 Altsteon 2.0 download | SourceForge.net, 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 :slight_smile:

Ok, got those downloaded and unzipped. I found a copy of WinSCP and I am downloading it. The part the instructions lose me is when it says to ‘start the daemon’. if its running on the Vera, I don’t see how to do that. Also the part about the IP address of where the daemon is running, if its on the Vera, its obviously the IP of the Vera I assume.

Also, for a Vera Edge, I assume I use Vera 2 folder?

I wish they had a book called “Alsteon for real dummies”

thanks

Bill

[quote=“BillC, post:16, topic:186379”]Ok, got those downloaded and unzipped. I found a copy of WinSCP and I am downloading it. The part the instructions lose me is when it says to ‘start the daemon’. if its running on the Vera, I don’t see how to do that. Also the part about the IP address of where the daemon is running, if its on the Vera, its obviously the IP of the Vera I assume.

Also, for a Vera Edge, I assume I use Vera 2 folder?

I wish they had a book called “Alsteon for real dummies”

thanks

Bill[/quote]

The directions appear to assume you are comfortable with the command line, and as such would know how to start a daemon. If you are familiar with ssh, starting the daemon is as easy as ssh-ing into the vera and running /overlay/sbin/altsteon.

If you are not familiar with SSH, then you are going to have more difficulty. For one thing, I’m pretty sure you have to access the command line to add the devices to altsteon. So maybe that should be your next research project: figure out ssh :slight_smile:

unfortunately, altsteon, while quite nice and powerful, is not really terribly user friendly at the moment.

Regarding binaries, for the edge I don’t know. Like I said, I used the 3 binaries for both my Lite and Plus, and my thought would be that the Edge would be somewhere in-between those two and as such would also want the 3 binaries. But I really don’t know.

thanks, I fumbled my way through getting shell access to Vera, but now I can’t figure where the files go. The docs show the ‘/overlay/sbin/’ directory which i don’t have

bill

[quote=“BillC, post:18, topic:186379”]thanks, I fumbled my way through getting shell access to Vera, but now I can’t figure where the files go. The docs show the ‘/overlay/sbin/’ directory which i don’t have

bill[/quote]
Yeah, I ran into that as well. You just need to create the directory:

mkdir /overlay/sbin

Then, using win scp (or whatever, but you said you were downloading that), you should be able to transfer the files into that directory that you just created.

Ok, that helped. Slowly making progress, but now I think I need to shut down the original (factory) Insteon process. I can’t find where to do that

thanks

Bill