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

TypeError: Cannot read property 'room_id' of undefined #8

Closed
jwildeboer opened this issue Nov 30, 2016 · 4 comments
Closed

TypeError: Cannot read property 'room_id' of undefined #8

jwildeboer opened this issue Nov 30, 2016 · 4 comments

Comments

@jwildeboer
Copy link

jwildeboer commented Nov 30, 2016

Using the version of node-red-contrib-maxcube on npm as of today (2016-11-30) on Node Red 0.15.2, I get the above error in the Node Red debug console. Due to this, it seems I cannot send commands to my thermostats. This is also mentioned in ivesdebruycker/maxcube#12 which I guess is the same problem/bug.

I also see entries like

{ "rf_address": "0ba773" }

Which I guess are my window sensors that AFAICS are not (yet) supported?

@jwildeboer
Copy link
Author

jwildeboer commented Nov 30, 2016

Using the cli tool I get correct data. I can also succesfully change the temperature setting on my thermostats. And I also see that my window sensors are treated as thermostats with undefined data but not showing the open or close status I would expect to see. It also seems that the wall thermostats are not showing any uselfull information or settings.

maxcube$ status
0ba773 (Wall Thermostat, Living Room) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0c9362 (Eco Switch, null) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0c98c6 (Bathroom, Bathroom) - temp: 0, setpoint: 10, valve: 0, mode: AUTO
16547f (BalconyDoor, Living Room) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0c98bd (Kitchen, Kitchen) - temp: 0, setpoint: 14, valve: 0, mode: AUTO
0ba823 (Bedroom Wall, Bedroom) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0cb005 (Kitchen Window, Kitchen) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0ca84e (Bedroom, Bedroom) - temp: 0, setpoint: 14, valve: 14, mode: AUTO
0ca05a (Bedroom Window, Bedroom) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
018999 (Window Sensor, Bathroom) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0c975a (Balcony, Living Room) - temp: 0, setpoint: 14, valve: 0, mode: AUTO
018973 (WindowSensor, Living Room) - temp: undefined, setpoint: undefined, valve: undefined, mode: undefined
0c9768 (Desk, Living Room) - temp: 0, setpoint: 14, valve: 0, mode: AUTO

@jwildeboer
Copy link
Author

jwildeboer commented Nov 30, 2016

I can reliably reproduce this error by simply sending this payload (as JSON) to a maxcube-in node:

{"rfid":"0ca84e","degrees": 15 }

Immediate result:

Nov 30 18:36:28 rpi.home.lan nodered[2563]: 30 Nov 18:36:28 - [error] [maxcube in:129689aa.d5e406] TypeError: Cannot read property 'room_id' of undefined

And the temperature doesn't get set :-(

@ivesdebruycker
Copy link
Owner

This should be fixed with an update to the latest release of maxcube lib (1.0.3).
Can you perform npm update in the node-red-contrib-maxcube folder and try again?

@jwildeboer
Copy link
Author

Yes. That seems to fix it. Thank you!

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