Load custom JavaScript code

Discussions about Z-Way software and Z-Wave technology in general
markolbert
Posts: 64
Joined: 16 Oct 2014 06:09

Load custom JavaScript code

Post by markolbert »

I am trying to build a module which transmits RazBerry event to another app, via UDP. I cannot figure out how to load code into the z-way-server so it gets included when the server starts.

Wandering around the new UI, I noticed you can add a custom javascript app. It apparently defines an instance of CustomUserCodeZWay, which I presume gets instantiated when the server starts.

But the first field in specifying the code declares:
Z-Way instance for which execute your code:
It's a dropdown, but it has no content, and you can't type anything in the dropdown area.

What is this, and how do I define it?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Load custom JavaScript code (UDP send)

Post by pz1 »

@markolbert
In follow-up of your PM, I did find this post that might serve as a starting point:
viewtopic.php?f=3422&t=20816&hilit=zwav ... =10#p53478

Unfortunately the thread ends there. I don't know if the example works. You may consider to continue the discussion there
Velouria
Posts: 3
Joined: 06 Jan 2016 14:11

Re: Load custom JavaScript code

Post by Velouria »

I think he means this problem in the attached image:
Selection_999(002).jpg
Selection_999(002).jpg (90.85 KiB) Viewed 12820 times
I'm also not to sure what to do here, and as a result, I can't get any JS code in the boxes below to run.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Load custom JavaScript code

Post by pz1 »

My remark to Markolbert was only a response on an earlier exchange of Personal Messages related to his first sentence.

I assume you are running the latest Z-Way release 2.2.0. On my test rig I have the same. I encounter the same problem as you do.

V2.20 is a very problematic release with many issues. Unfortunately developers stopped answering user feedback some three weeks ago.
Velouria
Posts: 3
Joined: 06 Jan 2016 14:11

Re: Load custom JavaScript code

Post by Velouria »

So glad to hear this - I was beginning to think it was just me.

Seriously considering going back to Domoticz again.
remoticz
Posts: 45
Joined: 07 Oct 2015 20:35
Location: no

Re: Load custom JavaScript code

Post by remoticz »

Velouria wrote:Seriously considering going back to Domoticz again.
Can't blame you :(
v2.1.1 raspi2
bogr
Posts: 190
Joined: 16 Nov 2015 22:46

Re: Load custom JavaScript code

Post by bogr »

Velouria wrote: Seriously considering going back to Domoticz again.
So you've been running Domoticz before? Why did you switch - just curious? Could you just write down some pros and cons - comparing those two? A bit off topic, but would be nice to hear about your practical experience :geek:
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Load custom JavaScript code

Post by PoltoS »

Hello. This particular module is new and there was a problem between backen developer (me) and UI developers, where a problem was not fixed before releasing this module. We will fix it very soon.
Plainsane
Posts: 81
Joined: 20 Apr 2015 01:22

Re: Load custom JavaScript code

Post by Plainsane »

bogr wrote:
Velouria wrote: Seriously considering going back to Domoticz again.
So you've been running Domoticz before? Why did you switch - just curious? Could you just write down some pros and cons - comparing those two? A bit off topic, but would be nice to hear about your practical experience :geek:
7es I'm interested as well. Considering jumping ship as I,need things like ifttt and want thinks like geofencing
Velouria
Posts: 3
Joined: 06 Jan 2016 14:11

Re: Load custom JavaScript code

Post by Velouria »

bogr wrote:
Velouria wrote: Seriously considering going back to Domoticz again.
So you've been running Domoticz before? Why did you switch - just curious? Could you just write down some pros and cons - comparing those two? A bit off topic, but would be nice to hear about your practical experience :geek:
Domoticz is awesome, but the openzwave library is its weakness. Response times can be a little slow (several seconds to turn on a light etc). I'm keen to see if that has improved.

The upside is a very passionate core development group that are always willing to help out. And then there is the open source aspect - if you're brave enough, you can always modify/fix/improve the code yourself. The documentation is decent and current, and the community is quite helpful.

Automation was easy using Google's Blocky for beginners, or Lua for more advanced functionality.

And it integrates with pretty much anything.

The downsides - the UI looks a little dated, it's quite a learning curve at first, and it means dumping what ever you have in z-way to make the switch.
Post Reply