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

setValue failing for me #61

Closed
elnulo opened this issue Jan 28, 2016 · 14 comments
Closed

setValue failing for me #61

elnulo opened this issue Jan 28, 2016 · 14 comments

Comments

@elnulo
Copy link

elnulo commented Jan 28, 2016

Working on Raspberry Pi2
I see this value get updated:
value = {"value_id":"3-38-1-0","node_id":3,"class_id":38,"type":"byte","genre":"user","instance":1,"index":0,"label":"Level","units":"","help":"","read_only":false,"write_only":false,"is_polled":false,"min":0,"max":255,"value":99}

However, when i do:
zwave.setValue(3,38,1,0,25)
I get:
TypeError: setValue: OpenZWave valueId not found

any ideas?

@elnulo
Copy link
Author

elnulo commented Feb 2, 2016

bumping... hoping somebody has some ideas here.

@elnulo
Copy link
Author

elnulo commented Feb 2, 2016

What i meant in the first part of the question is: When I connect i see a callback telling me a value changed. From what i can see it means node 3, class id 38 instance 1. I can't see what setValue is expecting.. any ideas would help.

@GuillaumeNachury
Copy link

Hi there,
I'm in the same situation.... on a RPI2 I keep getting TypeError: setValue: OpenZWave valueId not found when calling setValue()

Here is the detail of my device

Then in my code :

zwave.setValue(2,37,3,0, true); // << Throw error...

@GuillaumeNachury
Copy link

@elnulo I changed quite a bit my code and I got it working. I switched to the object syntax and made sure that the data aren't strings.
zwave.setValue({nodeid:parseInt(nodeId),class_id:parseInt(comClass),instance:parseInt(instance),index:parseInt(index)},value);

Hope it'll help.

@elnulo
Copy link
Author

elnulo commented Feb 6, 2016

that ws it!!! thank you.

@ekarak
Copy link
Member

ekarak commented Feb 7, 2016

root cause finally found: it was a silly typo, see #63

@ekarak
Copy link
Member

ekarak commented Feb 7, 2016

Hello all,
I've just pushed a fix in a new bugfix branch. Can you all please download this branch and test it?
Apologies again, this all was due to a silly typo (I was checking for 'nodeid' object property, not the correct 'node_id').

Thanks!

@ekarak
Copy link
Member

ekarak commented Feb 7, 2016

@elnulo please note that the changes in this branch will break your code. Does the bugfix accept plain old valueid's as in zwave.setValue(2,37,3,0, true) ?

@cmmh
Copy link

cmmh commented May 8, 2016

I'm sorry, I'm still encountering this issue.
I've cloned the master branch.

I've tried several identified solutions.
// zwave.setValue(5,38,1,0,50); // zwave.setValue({node_id:5, class_id: 38, instance:1, index:0}, 50 ); zwave.setValue({nodeid:parseInt(5),class_id:parseInt(38),instance:parseInt(1),index:parseInt(0)},50);
The "as checked out" test2.js fails.

What am I missing?

@ekarak
Copy link
Member

ekarak commented May 8, 2016

Do you have a Zwave node numbered 5 to begin with? Can you paste any logs that might be helpful in assisting finding what's wrong?

@cmmh
Copy link

cmmh commented May 8, 2016

I do have a node 5 ... but it wasn't a dimmer. I changed it to node 3, which is as follows:

`node3: Linear, PD300Z-2 Plug-in Dimmer Module
node3: name="", type="Multilevel Scene Switch", location=""
node3: class 38
node3: Level=1
node3: Bright=undefined
node3: Dim=undefined
node3: Ignore Start Level=true
node3: Start Level=0
node3: class 39
node3: Switch All=On and Off Enabled
node3: class 112
node3: Ignore Start-Level (Receiving)=true
node3: Load Sensing=false
node3: class 115
node3: Powerlevel=Normal
node3: Timeout=0
node3: Set Powerlevel=undefined
node3: Test Node=0
node3: Test Powerlevel=Normal
node3: Frame Count=0
node3: Test=undefined
node3: Report=undefined
node3: Test Status=Failed
node3: Acked Frames=0
node3: class 134
node3: Library Version=6
node3: Protocol Version=3.42
node3: Application Version=5.41
====> scan complete, hit ^C to finish.
====> ------> Set dimming node 3 to 50%
/home/pi/node-openzwave-shared/test2.js:127
zwave.setValue({nodeid:parseInt(3),class_id:parseInt(38),instance:parseInt(1),index:parseInt(0)},50);
^

TypeError: setValue: OpenZWave valueId not found
at TypeError (native)
at EventEmitter. (/home/pi/node-openzwave-shared/test2.js:127:7)
at emitMany (events.js:108:13)
at EventEmitter.emit (events.js:182:7)
at addonModule.Emitter.emit (/usr/lib/node_modules/openzwave-shared/lib/openzwave-shared.js:39:5)`

What other types of logging are desirable?

Thanks

@ekarak
Copy link
Member

ekarak commented May 9, 2016

I suspect you're having troubles because Node.JS is booting up an older version of the addon somewhere in your system. Try running locate openzwave_shared.node to find any references to old versions and them remove them before reinstalling the current version.

Also, there's a typo in your command (should be node_id, with an underscore) and the parseInt's are not needed anymore. The command should read:
zwave.setValue({node_id: 3, class_id: 38, instance: 1, index:0}, 50);

@ekarak
Copy link
Member

ekarak commented May 12, 2016

@cmmh is your issue resolved?

@Clancey
Copy link

Clancey commented Jun 10, 2016

@ekarak I am having the same issue. I have however narrowed it down a little more. setValue does not seem to work for most my nodes that are single digit. My light switch that is node 9 fails, but 10-13 work great. I am on version 1.2.0

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

5 participants