Search found 14 matches

by AMal
07 Jan 2017 17:35
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

Yes, Z-Way has fs. and socket. and some other functions. Please check https://github.com/Z-Wave-Me/Z-Way-Manual/blob/master/zwayDev.pdf Thanks, I was using a manual based on version 2.0.1. Clearly this is a rapidly evolving ecosystem. When I get the chance, I'll try out the new facilities and repor...
by AMal
06 Dec 2016 20:29
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

You log into your Z-Way web interface. Then you click the cog in the upper right corner, and go to "Apps". Then click the "Online Apps" button. There you have a button which probably says "Featured apps". Click it and change to "Developers Stuff". There you have an app called "Load custom JavaScrip...
by AMal
05 Dec 2016 12:34
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

Quote 1:Placing the JS code in that directory does not make it start. According to the recipe you have to use the JS App to get it started: Quote 2: You can't run your script from the terminal. You have to use the Z-Way module/app for executing JS scripts inside the Z-Way environment. If you want s...
by AMal
02 Dec 2016 20:54
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

Ok, I just noticed that you said that you're running the script from /opt/z-way-server with node. That will not work. Then you're just running your file alone, and there is no global.ZWave() defined there. As the recipe says, put your script in /opt/z-way-server/automation/storage, and I assume it ...
by AMal
01 Dec 2016 11:01
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

You are creating a function expression and assigning it to this.bindFunc1, but you are never actually running the function. If you look at the recipe, you will see that after the function expression is defined, there is also the following code: // process all active bindings if (global.ZWave) { glo...
by AMal
28 Nov 2016 21:55
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

Hi pz1, thanks for your thoughts anyway.
I hope someone might come along to the forum who understands some of this stuff.
by AMal
28 Nov 2016 21:09
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

:oops: Stupid me, forgot to post the link. http://forum.z-wave.me/viewtopic.php?f=3424&t=20849 No, it's me that's stupid (or blind) (or maybe blind stupid). My code is in a file named test.js, I'm running the command node test.js in the directory /opt/z-way-server When I try to run this code... con...
by AMal
28 Nov 2016 13:02
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

Thanks, pz1, I'll take a good look at that as soon as I get a chance.
by AMal
28 Nov 2016 10:42
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

In this recipe there is some sample script that sends an UDP message on selected Z-Wave device events. The first post is kept up to date. Some of the following post are old and may be outdated. Hi pz1, your post refers to a "recipe" but I can't see a reference to that recipe or any attachment. The ...
by AMal
26 Nov 2016 19:59
Forum: Recipes
Topic: Javascript sample for a newbie
Replies: 21
Views: 15613

Re: Javascript sample for a newbie

Thanks, golaonline. I have read the reference documentation, and I think it will help when I get over the initial first steps. If I use the URL http://MyIPAddress:8083/ZAutomation/api/v1/devices, I initially get a 401 error - not logged on. If I open another browser window to log on then http://MyIP...