Skip to content
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

CheckWindowSensors: Cannot read property 'name' of undefined #93

Closed
CaptainBalou opened this issue Apr 12, 2020 · 14 comments
Closed

CheckWindowSensors: Cannot read property 'name' of undefined #93

CaptainBalou opened this issue Apr 12, 2020 · 14 comments

Comments

@CaptainBalou
Copy link

CaptainBalou commented Apr 12, 2020

The heatingcontrol script seems to work fine but I see errors in the log.

heatingcontrol.0 | 2020-04-12 13:07:29.782 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
-- | -- | -- | --
heatingcontrol.0 | 2020-04-12 13:00:30.598 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 12:17:03.338 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 12:10:15.337 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 11:26:42.981 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 11:19:56.001 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 10:36:20.892 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 10:29:36.485 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 09:46:00.160 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 09:39:23.730 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 09:33:38.987 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 08:55:35.741 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 08:43:53.704 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 08:29:23.631 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 08:05:08.809 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 07:39:05.705 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 07:14:44.581 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 06:48:47.131 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 06:24:23.609 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-12 05:58:28.285 | error | (1773) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]

I don't know how to further debug this as I am very new to iobroker.

@rg-engineering
Copy link
Owner

please activate debug logging for this adapter and post the log again. You can also ask for help in forum

@rg-engineering
Copy link
Owner

@CaptainBalou any feedback on that? If not than I will close this issue...

@CaptainBalou
Copy link
Author

I was investigsting how to activate debug to collect more logs but I was unable to get it done. Can you give me a hint, a link to a how to document? Otherwise we would have to close this issue until I am more experienced with iobroker and adapter debugging.

@rg-engineering
Copy link
Owner

I guess you got an answer in forum? There are only two steps: activate expert mode and then you can change log level for the adapter from info to debug. Log output is than again under logging where you got alreay above posted error messages...

@CaptainBalou
Copy link
Author

CaptainBalou commented Apr 19, 2020

Indeed I got one but I have not realized it because I received no notification even if I requested one by clicking on the appropriate button. Sorry for the delay.

I did it as mentioned and here is the new log.

heatingcontrol.0 | 2020-04-19 11:38:11.176 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 20:00:00
-- | -- | -- | --
heatingcontrol.0 | 2020-04-19 11:38:11.174 | debug | (2418) [INFO]       status = true next event: 25 Apr 2020 10:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.165 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 19:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.162 | debug | (2418) [INFO]       status = true next event: 25 Apr 2020 08:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.160 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 08:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.158 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 22:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.157 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 16:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.156 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 12:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.155 | debug | (2418) [INFO]       status = true next event: 25 Apr 2020 05:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.152 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 22:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.149 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 16:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.147 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 12:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.142 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 05:00:00
heatingcontrol.0 | 2020-04-19 11:38:11.141 | debug | (2418) profile 0
heatingcontrol.0 | 2020-04-19 11:38:11.140 | debug | (2418) get profile
heatingcontrol.0 | 2020-04-19 11:38:11.139 | debug | (2418) profile type 2
heatingcontrol.0 | 2020-04-19 11:38:11.090 | debug | (2418)  ### not handled deconz.0.Sensors.8.open  {"val":false,"ack":true,"ts":1587289091029,"q":0,"from":"system.adapter.deconz.0","user":"system.user.admin","lc":1587289091029}
heatingcontrol.0 | 2020-04-19 11:38:11.089 | debug | (2418) ### 222 not handled yet
heatingcontrol.0 | 2020-04-19 11:38:11.089 | debug | (2418) calculating new target temperatures
heatingcontrol.0 | 2020-04-19 11:38:11.088 | debug | (2418) room to check is Toilette
heatingcontrol.0 | 2020-04-19 11:38:11.037 | debug | (2418) Toilette window open is false
heatingcontrol.0 | 2020-04-19 11:38:11.036 | debug | (2418)  got sensor state  {"val":false,"ack":true,"ts":1587289091029,"q":0,"from":"system.adapter.deconz.0","user":"system.user.admin","lc":1587289091029}  from deconz.0.Sensors.8.open
heatingcontrol.0 | 2020-04-19 11:38:11.035 | debug | (2418) Check sensors for Toilette
heatingcontrol.0 | 2020-04-19 11:38:11.034 | debug | (2418) calculating new target temperatures
heatingcontrol.0 | 2020-04-19 11:38:11.034 | debug | (2418) room to check is WC
heatingcontrol.0 | 2020-04-19 11:38:11.034 | error | (2418) exception in CheckWindowSensors [TypeError: Cannot read property 'name' of undefined]
heatingcontrol.0 | 2020-04-19 11:38:11.033 | debug | (2418)  ### handle devices  [{"id":7,"name":"OpenClose 8  open","OID_Current":"deconz.0.Sensors.8.open","isActive":true,"type":3,"room":"WC"},{"id":8,"name":"OpenClose  8 open","OID_Current":"deconz.0.Se
heatingcontrol.0 | 2020-04-19 11:38:11.033 | debug | (2418)  handle id deconz.0.Sensors.8.open state  {"val":false,"ack":true,"ts":1587289091029,"q":0,"from":"system.adapter.deconz.0","user":"system.user.admin","lc":1587289091029}
heatingcontrol.0 | 2020-04-19 11:38:11.033 | debug | (2418) ### 111 not handled yet
heatingcontrol.0 | 2020-04-19 11:38:11.033 | debug | (2418) ### deconz.0.Sensors.8.open deconz.0.Sensors.6.open false true
heatingcontrol.0 | 2020-04-19 11:38:11.032 | debug | (2418)  ### handle state change deconz.0.Sensors.8.open  {"val":false,"ack":true,"ts":1587289091029,"q":0,"from":"system.adapter.deconz.0","user":"system.user.admin","lc":1587289091029}
heatingcontrol.0 | 2020-04-19 11:36:57.832 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 20:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.830 | debug | (2418) [INFO]       status = true next event: 25 Apr 2020 10:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.827 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 19:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.820 | debug | (2418) [INFO]       status = true next event: 25 Apr 2020 08:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.817 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 08:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.813 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 22:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.812 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 16:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.811 | debug | (2418) [INFO]       status = true next event: 19 Apr 2020 12:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.810 | debug | (2418) [INFO]       status = true next event: 25 Apr 2020 05:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.808 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 22:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.804 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 16:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.802 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 12:00:00
heatingcontrol.0 | 2020-04-19 11:36:57.800 | debug | (2418) [INFO]       status = true next event: 20 Apr 2020 05:00:00

Maybe this is because I currently have no thermostate in this room 'WC'. I just want to have the window sensor in the heatingcontrol to see the overall window open status of everything. But I have no thermostate yet.

@rg-engineering
Copy link
Owner

I assume you use version 0.3.19?

can you show me your configuration for that room? You just have configured one sensor and nothing more for that room? but this should'nt be a problem...
Are you already able to install a version here from github? If so then I would like to add some more logs for further investigation...

@CaptainBalou
Copy link
Author

Version is 0.3.19 that is correct.

grafik

Don't be that much focused on my assumption of that room with no thermostates. I was just giving that hint because it could be that this is something "unsupported" - but I have no glue if this is really a reson for the error message.

The room looks like this:
grafik
grafik

If have this in a room called "Bad" as well. Same configuration. I enjoy seeing that window status via heatingcontrol in a single view at the end. Very useful for me.

I am able to install something via github. At least I installed one adapter for a vacuum cleaner via this way. But I don't know what you mean exactly. I at least have never tried to install a "dev" version of heatingcontrol or so while keeping the current configuration. But if you could give some hints or a link to a wiki page I would be able to.

@rg-engineering
Copy link
Owner

@CaptainBalou i pushed version 0.4.0 into latest repo. If you like you can install it, enable debug log and send me the log again. I hope I added logs on the right places now...

@CaptainBalou
Copy link
Author

@rg-engineering Thanks for your efforts. As I am on the official release I am wondering how I could upgrade to 0.4.0. Can I just install via own URL and take the 0.4.0 repo? Will my installation and instance be upgraded or do I need to follow a different procedure? I just want to be sure to don't lose my current configuration in the running instance.

@rg-engineering
Copy link
Owner

just switch temporarly to latest repo in iobroker.
grafik
Under adapters you will see the new available version
grafik
probably you need to press update as shown here in screenshot
If installed version and available version differ the update button will appear. Just update it from here. Your configuration will not be changed.

@CaptainBalou
Copy link
Author

Thanks a lot. Did it that way and updated to 0.4.0. Since I upgraded I have not seen this message anymore in the log even if I had it a lot before the upgrade. I keep watching out for it...

@CaptainBalou
Copy link
Author

@rg-engineering Since I upgraded to 0.4.0 I have not seen this log message anymore. I tried everything I did before but I cannot reproduce the log message.

@CaptainBalou
Copy link
Author

@rg-engineering I tried a lot but had no chance to get this error back into the log. Do you want me to go back to the official version and then integrate some manual debugs there or do we quit searching here? The question I have is if I get updates while being on 0.4.0 or do I have to do something to update always to the latest adapter version?

@rg-engineering
Copy link
Owner

I think we stop searching here. I did some changes on that part of code and probably this solved yor problems as well.
You can leave 0.4.0 installed and switch back to stable repository. As soon as a new version in stable appears again, you will be notified of the update. I guess I will will move 0.5.x into stable very soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants