Hello, Daniel and all;
I've been working with insteon-terminal for a while. I have so far been able to interrogate the network and have also used it several times to diagnose and clear dead links every couple of months when switches would give the red feedback light. Unfortunately, I never quite could download my Hub's database.
Where I am currently failing is trying to figure out how to get the hub's allDB and save it to file/print it. I have tried creating a new device with `Modem2413U("Hub", addr)` and attempts to call .getdb() hang for a long time.... but eventually I see:
Reading database attempt 1 for 34.48.1E (Hub)
Modem Link DB complete!
Failed to initialize python interpreter:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./init.py", line 87, in <module>
db, isSane = device.readdb()
TypeError: 'instance' object is not iterable
The first line of output is from my init.py file (in addition to just initializing the terminal, I am also looping through known devices in a config file and making sure I have the linkdb for each so I can perform local analysis). From what I can tell, the other lines of output from a failure somewhere inside
insteon-terminal that I cannot track down. I recognize the "Modem Link DB complete!" line from the
python code. I am only calling readdb() on the modem object and the next line of output
should be a print statement from my calling code indicating the read worked or was not sane. So, I'm stumped on what instance is not iterable per the error message
My calling code is like this (the inner loop of interest):
tries += 1
print("Reading database attempt " + str(tries) + " for " + address + " (" + name + ")")
db, isSane = device.readdb()
if isSane:
print(" Successful read")
break
elif len(db.getRecordsAsArray()) > 1:
empties = 0
print(" Last read not sane, but records detected. Trying again...")
else:
empties += 1
print(" Last read not sane and no records detected... Trying " + str(3 - empties) + " more times")
I am asking because, like lots of Insteon users, the smart phone app isn't very helpful anymore. So, I'm working on a script to automate the reverse engineering of scenes so I can plug them in to Home Assistant. Therefore, I need to figure out what the group IDs are from the Hub's point of view.
Thanks in advance for any assistance or pointers