-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
database incomplete, reload() and retry! #7
Comments
Do you get the "database incomplete" message every time you try to add/remove an entry, or is it only sometimes? At times the insteon network + the hub can be rather unstable and drop messages. Also, do you see any 'warn' log messages in the console output which could be indicative of message drops? A text snippet of the result you get from running the command would also be very useful in debugging the problem. |
Note that you can switch on debug logging via: setLogLevel("DEBUG") |
Hello, I did some more research. For example I changed the code so that any variant of DBBuilder would use 0x1fff this was a crude way of checking if perhaps it was using a different DBBuilder however the comments that this bug occurred mainly because all other devices are 0x0fff got me thinking more in depth because I Am actually using a 2441V which is the insteon adapter for Venstar Thermostats. I was able to control the thermostat from the command line, that's why I thought it was behaving the same as the 2441TH - but further testing revealed that this is a hybrid device. I modified the code so that the ThermostatDBBuilder used 0x0fff because I thought perhaps the database performs more like a standard device than a thermostat. And this appears to have worked. But all of the register locations and codes appear to be the same as the 2441TH, being that this insteon adapter is *_not *_made by Venstar but made by the same company that makes the 2441TH thermostat. I am doing further testing and I will report back. But in this case it looks like a new device type may have to be added which is 2441V and if that is the case, the ThermostatDBBuilder may then have to check thermostat type. I have not ruled out unstable insteon network, however at this stage I did get this error 100% of the time when attempting to manipulate the database of the thermostat. It's the only insteon device I have so I was not able to test any other device for integrity of the insteon network. I will also enable debug logging. Thank you again for the assistance, I will report back my findings. |
Hello, Do you have any idea why linkData1 = 0x00 during the add controller instruction. MY MODEM
According to the instructions the group data = 01 00 00 EXAMPLE MODEM
Do you think this could be causing a problem when used with openHAB Thanks! |
The openhab binding does not look at the link data. In most devices, the link data is used to store the device type of the other device (the first two bytes) and the group on which the other device has been linked (the last byte). Originally, the openhab binding used the first two bytes to do type checking for devices, but that feature was removed as it was discovered that, in many situations, the link data was either corrupted or had been zeroed out. At the moment, openhab only checks the database to make sure that all devices are actually linked to the modem, but does not use the link data. In short, the linkData1 being 0x00 shouldn't affect openhab and isn't an issue as the link data isn't being used (nor should it be, given its unreliability). |
So If I have the following items - is there any fundamental setup step I have missed in my setup below: *.cfg *.items *links: Terminal ready!
Is there anything I missed to configure this? Is there any reason why I could be getting: 2016-03-04 09:23:00 WARN o.o.b.i.InsteonPLMActiveBinding[:485]- device 14.B9.48 not found in the modem database. Did you forget to link? Thanks again for your guidance. |
I have the system working, I can confirm that the DB entries for the 2441V do use 0x0fff, I had an issue with my openHAB config as a result the insteon binding was not working correctly. I noticed that the data does not get initialized and only gets sent from the thermostat once changed. This results in empty fields until the thermostat values change. Is there any way to force the thermostat to send the data upon initialization in order to set all the values to the correct values prior to the value changing? |
I just pushed a new device in the 2441V thermostat. The only difference to the 2441TH is the top of database flag. If you have time to test and see if you can load the database that would be great. Not sure what you mean with "send upon initialization". Initialization of openhab? Or the thermostat? Some data is actively being polled for by the binding (as a matter of fact, I think all of it). So you should get correct values once the first poll happens (I have my poll interval set to 10min), not have to wait for some change to happen. And openhab should not send you any values (unless you persist them) until the first valid data comes in. Then there is also the out-of-band sending of messages by the thermostat. That only happens when the settings (or e.g. temperature) changes. So check your insteonplm debugging log to see what the thermostat answers back when it's being polled. If it doesn't reply, something is wrong. Your link database seems fine though at first glance, the thermostat should answer. You can check what command code the binding sends out to query (I think cmd1=0x2e, cmd2=0x00 and 0x02). You can try sending those out via insteon terminal (th.getData1(), th.getData1b(), th.getData2()) and see what comes back. |
I will definitely test the new device 2441V and report back the results of my testing. Thank you for your support on this matter. With regards to the initialization, all of the values in openhab are null, I have set my polling interval to 100 seconds ( I only have 1 insteon device) just to test. And there is simply null values in the user interface until I change them. Example - Increment the heat setpoint from the openhab ui then the heat setpoint a) updates on the thermostat to the revised value b) shows corretly in the openhab ui. Similar, if I increment the heat set point on the physical thermostat it then changes from null to the correct value in the openhab ui. This is the same behavior for all values ( set points, fan mode, thermostat mode, even actual temperature being reported back from thermostat) This is what the log reports Regards |
Something is wrong: the device answers to the query with a NACK. I
|
OK I will try that. In the mean time I tested your update. th = Thermostat2441V("kitchen_thermostat", "14.B9.48") then I did following is the error: I noticed that in /python there is no thermostat2441V$py.class file being created. Not sure If I missed any steps? |
tried it, works for me. It compiles a python class from thermostat2441V import * (some bad character somewhere)? |
hmm, well I deleted init.py and started over... seemed to be an issue there. Anyway it works. I nuked my db in the 2114V and re added the entries so that appears to be supported. And working as intended. th.addController("31.46.7B", 03) There is an issue with data2 though. So if I understood correctly when it polls it gets the information from data1 data1b or data2 which then gets unpacked and populates the item values in openHAB. but if an event occurs on the thermostat then the out-of-band messages receive directly this information and populate the items. It appears that only the out-of-band messages are working and that's why when something changes (ie: setpoint via thermostat) then it updates in openHAB. I did to a query on data1, data1b and data2 and only data2 fails. This appears to be the most important one. th.getData2()
I was able to find the developer's guide for the 2441V but if I understand correctly even if this was supported in insteon-terminal I Would have to make a custom deviceType with custom features in openHAB. I have attached the guide. Any guidance or direction you could provide would be great. I have a very limited understanding of the insteon protocol. But I am willing to put in the effort to get it working. Thanks again for your help |
Hello I have the same issue as PhilippeLibioulle commented on Feb 11
When I try to add / remove any entry to the db for the thermostat I get the error " database incomplete, reload() and retry!" . I checked in my linkdb.py and it contains the row 162 with... if lastVal != self.topOfDatabase: Therefore I believe I am running the latest version.
Is there any condition that would cause the ThermostatDBBuilder not to get called and may be attempting to add these entries as a standard device ( 0x0fff ) I am using Insteon HUB 2014 (2245-222) I believe that testing was completed using 2413S PLM not sure if that would be any different.
I have all other commands working including adding / removing entry to the modem database so I am confident that I have the correct syntax. I am using the instructions provided here -->>
https://github.com/pfrommerd/insteon-terminal/blob/master/README.md
Many thanks in advance.
Michael
The text was updated successfully, but these errors were encountered: