insteon-terminal

530 views
Skip to first unread message

mchlw...@gmail.com

unread,
Jan 8, 2016, 4:43:47 PM1/8/16
to insteon-terminal
In the past I was having some issues with the insteon binding. I have installed the new binding and still having some issues. I am vested in the insteon product but have some of the older models of various devices. Under advisement I have started again but this time with the insteon-terminal pgm figuring that as I got that working I could not only learn something but could get this thing to work. I have got the insteon-terminal pgm working on my RPI. it took a bit but it compiled and runs but I have an error when I start the insteon-terminal pgm:


Insteon Terminal

Connecting

Connected

connected

Terminal ready!

>>>

So I know that the sw is working but that's it.

when I give it a command:

>>>listDevices() 

gives me nothing back and I know that it works since it is currently handling the scenes and devices.

>>> getId()
Trace back (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'getID' is not defined
>>>

I am guessing that it is not really connected to the 2014 hub (2245-222) or there is really a problem with the compile.
So just need some directions.

Got some time between projects and need to get this working so I can bet back to openhab (and all the things that I want it to do for me)

For now I am just trying to get the insteon-terminal pgm working. And maybe that would help with the binding.and I might learn something too.

FYI - None of my devices are listed since they are older so sooner or later I have to address that too.

ThanX,
Michael

ps - wasn't sure where to post this but this was the only specific place that talks about the insteon-terminal pgm. if it needs to move just let me know and we can pick up elsewhere.

Daniel Pfrommer

unread,
Jan 8, 2016, 5:08:13 PM1/8/16
to insteon-terminal, mchlw...@gmail.com
Hi,
I want to make clear that the insteon terminal *does not* connect to the binding to get its device list, you need to configure those in the init.py. If you haven't configured the devices in init.py, that would explain why listDevices() is not showing any devices. As there is no getID() function built in to the terminal, that line gives an error.

If you could explain what you hope to accomplish using the terminal that would allow me to better assist you. Also, a copy of your init.py (username and password X'd out) could potentially help.

Daniel

mchlw...@gmail.com

unread,
Jan 8, 2016, 6:56:46 PM1/8/16
to insteon-terminal, mchlw...@gmail.com
Daniel, 
Thanx for the quick reply. First, I was looking at the insteon-terminal pgm to figure out what going on with insteon in general and perhaps if I could figure that out then I could get the openHab binding working. Ok thats the goal. Now back to the devices, since they are older do I have to create something for each of them? I did create entries for each of them all be it copied the similar ones from the list (see init.py). so now I get another error when try query any device other than the modem. I can get a list of addresses from the modem including the ones that are named in the init.py file. There are other ones in the list not defined in the init.py file.


Thanx again,

Michael

Daniel Pfrommer

unread,
Jan 8, 2016, 7:08:51 PM1/8/16
to insteon-terminal, mchlw...@gmail.com
Your init.py seems in order, so I'm not quite sure why listDevices() isn't reporting anything (unless you've changed the init.py since the first post?).

That aside, all the insteon terminal lets you do is: manage your modem database, link devices, and do some simple commands (query the state of devices, on, off, configuration, etc.). For example you can use light.on(), light.off(), and light.getStatus() (I think those are the commands, use help(device) to get all possible commands for a given device). Using the insteon terminal without having a clear goal of what you want to do is like having a solution without a problem.
If you could provide the new error message or stack trace which you get when you try and query another device (as well as the command which caused the error), I might be able to help. 
The insteon terminal is a completely separate project from the insteon binding (apart from some low-level message reading code). If you have any difficulties setting up the binding, I would recommend you post on the openhab community forums under the insteon tag.

Daniel.

mchlw...@gmail.com

unread,
Jan 9, 2016, 12:03:57 PM1/9/16
to insteon-terminal, mchlw...@gmail.com
Daniel,
Yes you are correct I did change the init.py from the first one that didn't work. The end game is just to understand the insteon better I would like to contribute someday.
So my whole reason looking in this tool is, the last time I had problems with the binding Bernd mentioned that we might have to look at it in the insteon-terminal tool. So since I have time I thought it would be good to get it working and then get back to the binding. I still have problems with the binding but thought this was a better start here. Ok here is what is happening now:

pi@OpenPi /insteon-terminal $ sudo ./insteon-terminal
Insteon Terminal
Connecting
Connected
connected
Terminal ready!
>>> 19:53:10.788 [Thread-3] WARN  us.pfrommer.insteon.msg.MsgReader - incoming message does not start with 0x02
19:56:28.012 [Thread-3] WARN  us.pfrommer.insteon.msg.MsgReader - incoming message does not start with 0x02
20:29:16.654 [Thread-3] WARN  us.pfrommer.insteon.msg.MsgReader - got unknown command code 02
22:30:17.485 [Thread-3] WARN  us.pfrommer.insteon.msg.MsgReader - incoming message does not start with 0x02

>>> Office.getdb()
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'Office' is not defined
>>> listDevices()
Office                         16.74.07
tableLamp                      14.37.2b
Upstairs_Hall                  0d.77.2c
standingLamp                   14.36.34
modem                          34.27.65
>>>

The messages happened overnight and the rest was done by me. Not sure why "Office is not defined. As stated previously if I do a modem.getdb() I get a long list of devices in the hub. Any help would be greatly appreciated.

ThanX,

Michael 

Daniel Pfrommer

unread,
Jan 9, 2016, 4:11:25 PM1/9/16
to insteon-terminal, mchlw...@gmail.com
In reality, there are two names for every device:
          1) The device variable name
          2) The label of the devices (what listDevices() and database dumps call the device)

If you want to issue a command to a device, you would have to use the device variable name. 

So declaring (as is the case in your init.py):

keypad = Keypad2487S("Office","16.74.07") 
# the above keypad is really model#2486D 
dimmer = Dimmer2477D("Upstairs_Hall", "0d.77.2c") 
# the above dimmer is really model#2467D 
dimmer = Dimmer2477D("standingLamp", "14.36.34") 
dimmer = Dimmer2477D("tableLamp", "14.37.2b")
#the two above dimmers are really model#2475D2

Will create two variables in your terminal: keypad and dimmer

keypad will be the "Office" keypad
dimmer will be the "tableLamp" dimmer

Which is why Office.getdb() doesn't work - you need to use keypad.getdb()


What you probably meant to do was this:

officeKeypad = Keypad2487S("Office","16.74.07") 
# the above keypad is really model#2486D 
upstairsDimmer = Dimmer2477D("Upstairs_Hall", "0d.77.2c") 
# the above dimmer is really model#2467D 
standingDimmer = Dimmer2477D("standingLamp", "14.36.34") 
tableLampDimmer = Dimmer2477D("tableLamp", "14.37.2b")
#the two above dimmers are really model#2475D2

Which would create 4 variables in the terminal's namespace: officeKeypad, upstairsDimmer, standingDimmer, and tableLampDimmer.
So to access a device you would use:
officeKeypad.getdb() # gets the database of the "Office" device
upstairsDimmer.on() # would turn on the device

If you want to get all the available functions on a device use

help(deviceVariableName) # for example, help(officeKeypad)
Reply all
Reply to author
Forward
0 new messages