#Strange Z-Wave Issue

1 messages · Page 1 of 1 (latest)

wooden vessel
#

I'm using JSUI 4.1.0 and this morning three devices spontaneously activated. Two door locks and a garage door controller. All from different manufacture. I'm also getting weird errors in the log. I've hadn't seen these errrors prior to 4.0.1

Logger: zwave_js_server
Source: /usr/local/lib/python3.13/site-packages/zwave_js_server/event.py:77
First occurred: April 23, 2025 at 9:34:43 AM (275 occurrences)
Last logged: 7:43:32 AM

Error handling event: statistics updated
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/zwave_js_server/event.py", line 75, in emit
    listener(data)
    ~~~~~~~~^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/sensor.py", line 1039, in statistics_updated
    self._attr_native_value = self.entity_description.convert(
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        event_data["statistics_updated"], self.entity_description.key
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/zwave_js_server/model/node/statistics.py", line 79, in rssi
    raise RssiErrorReceived(RssiError(rssi_))
zwave_js_server.exceptions.RssiErrorReceived

I rolled back to 4.0.4

I'm also getting notifications that devices are unavailable

The fact this unlocked my doors and opened my garage is scary shyt

WTF is going on?

deft valley
#

Issue already posted

#

It's only a logging issue

#

Unavailable devices would be a different issue. Unlocking doors could be an error in the automation, probably not considering unvailable state.

deft valley
#

RSSI errors may be a reflection of the unavailable devices (dead)

wooden vessel
#

The devices that were unlocked are not controlled by an automation only by direct unlock command. The device opens the garage is only controlled via an automation and that automation did not execute

#

I've been using Z-wave devices for 10 years and I've never seen this kind of thing. That's why I only use Z-wave S2 for locks and access control.

deft valley
#

If you have driver logs at the time you can see if a command was issued.

wooden vessel
#

I panicked and rebooted my system so I lost the logs

deft valley
#

I personally would turn on log to file

wooden vessel
#

How do I do that?

deft valley
#

The only times I've heard of devices spontaneously turning on would either be a broadcast message (which S2 would prevent), associations, or what turned out to be misfiring automations.

#

If you don't have any problems while upgrading Z-Wave JS UI, then it might exclude automations, that would cause unavailable entities as well.

wooden vessel
#

"If you don't have any problems while upgrading Z-Wave JS UI, then it might exclude automations, that would cause unavailable entities as well." I dont understand this

#

Loging enabled

deft valley
#

Upgrading ZUI results in unavailable entities temporarily

wooden vessel
#

I upgraded last week some time ... I rolled back this morning

#

Do those logs self purge after some number of days?

deft valley
#

Did you not see the "Max files" setting?

#

"Maximum number of log files to keep". So yes.

wooden vessel
#

I dont see that max log setting

deft valley
#

They rotate daily. So number of days.

#

Did you look in your settings? Or are you going by the picture?

wooden vessel
deft valley
#

Wrong place

#

Z-Wave settings

wooden vessel
#

Why the number of logs not be with log settings ?

deft valley
#

Driver logs

wooden vessel
#

OK What is the other log? Do I need it on as well?

deft valley
#

Up to you. Probably not.

#

Application logs are of limited utility and are only useful for diagnosing errors in the UI itself, versus lower-level Z-Wave network operations that are reflected in the driver logs.

#

Driver logs are required for all issues that are not purely a UI issue (for which an Application Log would instead be submitted).

wooden vessel
#

OK ...

#

Thanks ... Now that I'm logging it will never happen again. That's the first rule of intermittent issues 🤣

deft valley
#

Yeah, difficult to retroactively debug such a scenario. At least you can see if something has sent any command to activate those devices now.

wooden vessel
#

I'd have likely previously enabled logs if I had looked around the JSUI ands noticed the capability 🤦‍♂️

deft valley
#

It some point it was enabled by default in new installs.

#

The add-on disables it though.

wooden vessel
#

There's so much stuff in JSUI that I didn't see that tree for the forest

#

And, I don't mess with it

wooden vessel
#

Is there any way to set the logger to use local time?

grave notch
#

J/k, not possible atm.

wooden vessel
#

Yeah ... No I don't think so. I got used to Freedom of Speech

deft valley
#

My logs are in localtime. 😉

#

But I have a custom setup

wooden vessel
#

Seems like an easy change. Just add Time Zone as one of already very numerous config options.

deft valley
#

I think if it were that easy it would exist

#

The configuration needs to be added to the driver before it can be added to ZUI.

wooden vessel
#

What's JSUI coded in COBOL with some weird Y2K hacks? 🤣

deft valley
#

The logging you're referring to is from the driver. It doesn't provide an option to configure the timezone. Either the driver needs to provide an option to do that, the "easy change" you are referring to, or ZUI would need to implement it's own driver logging transport. I don't think they want to do the latter.

#

The application (ZUI) logs already use your configured timezone.

wooden vessel
#

So the ZWJS driver is the culprit

#

Yep ... there's an enhancement request outstanding for three years means it's never going to get done

#

Is Z-wave-js HA core now?

deft valley
#

What?

wooden vessel
#

IS Z-wave js part of HA core?

deft valley
#

Z-Wave JS is a Javascript project, so no.

#

HA is Python

#

The Z-Wave integration (based on Z-Wave JS) has existed since 2021.

wooden vessel
#

OK

grave notch
deft valley
#

Yeah, easy is not the right word.

#

But, it's not as easy as adding an option to ZUI since the driver option doesn't exist. 🙂

wooden vessel
deft valley
#

Z-Wave is already supported in HA, via the Z-Wave integration.

#

And the official Z-Wave JS Add-on has existed since the beginning.

wooden vessel
#

Integration means depending on volunteers to maintain and control the driver not bad, but not as good

deft valley
#

The driver is external to HA

#

I'm not really sure what you mean by "HA" and "Integration" in this context

#

The "integration" is part of HA core.

wooden vessel
#

Z-wave capability is not core compent of Home Assistasnt unlike ZHA. The HA guys are developing their own stick, and I expect that will do their own sever/driver

deft valley
#

The official add-on is maintained by the HA org

#

The Nabu Casa controller will be supported by Z-Wave JS or any other z-wave software.

#

ZHA is implemented in Python, which is why it's a "core component". You cannot integrate a Javascript library into a Python application.

#

OZW used to be the same way as ZHA, it was a Python wrapper around a C++ library and could be integrated directly.

wooden vessel
#

Then I consider that a core functionality vs. being part of the core HA code. IMHO getting rid of external docker containers for core functionality, like communications protocols, is a good idea

deft valley
#

The official core add-on plus the Z-Wave integration is the officially supported way of using Z-Wave.

#

Z-Wave (as in Z-Wave JS) is a client-server architecture. You cannot implement the Javascript library in the Python process.

wooden vessel
#

Is that fact? Why?

deft valley
#

Ok, tell me how you'd do that.

wooden vessel
#

I'm asking because I don't know ...I m asking why not

deft valley
#

I haven't heard of it being done. Would like to know if something exists.

wooden vessel
#

since you seem to knpow it can't be done

deft valley
#

It's certainly not mainstream if possible

wooden vessel
#

That doesn't sound like technical reason

#

A quick Grok indicates that there appears to be a several Z-Wave server Python implementations of various capability. So it looks like it's not technical problem . It's a matter of someone actually developing one but there's not sufficient interest

deft valley
#

There aren't any usable Python-based Z-Wave implementations. That's why we have Z-Wave JS.

#

Python cannot natively run Javascript code. Node.js is running Z-Wave JS.

#

Technically, HA Container and HAOS (the proposed only supported install methods), could run an embedded instance of node.js with Z-Wave JS. I don't see that happening, but feel free to propose it.

#

Would be an interesting approach.

wooden vessel
#

Explain why node,js can do something Python can't

deft valley
#

Run Javascript code?

wooden vessel
#

Why must Z-wave server be written in JS? What can JS do Python can't? I'm not trying to be contrary, I'm actually interested in understanding

deft valley
#

Because it's hard?

#

Straight from the article you linked:

Z-Wave JS is an independent driver created from the ground up based on the published Z-Wave specification. Dominic has put a lot of effort into this, and his work has formed a community of people passionate about developing the best open Z-Wave driver. Our community has many power users who test Z-Wave JS and make sure it scales and works with both old and new devices.

#

Writing a Z-Wave driver in python is non-trivial, and would require the work that Z-Wave JS has put in for many years.

#

Take that back, writing a Z-Wave driver in any language is non-trivial

wooden vessel
#

So it can be done, but perhaps not worth the effort

deft valley
#

There's a reason you don't see any other open source z-wave drivers.

wooden vessel
#

Does the javascript engine used tor Z-Wave JS perform JIT compilation?

deft valley
#

Dunno. It's node.js.

wooden vessel
#

does Z-Wave JS use any compiled C/C++ functions?

deft valley
#

The serial port library is written in C++. AFAIK there's no C++ in Z-Wave JS itself. There might be some Rust.

wooden vessel
#

I should have asked for compiled to native machine code in any language

#

Yes the V8 JS engine does inmplement JIT compilation

#

That's a good reason to use JS over Python. I answered my own question and enlightened you 🤣

deft valley
#

It's fast enough for Z-Wave

wooden vessel
#

Thanks for the chat

#

But, Python 3.13 has an experimental JIT compiler

deft valley
#

Not sure what that would have to do with Node.JS or Javascript?

#

That would be for Python code

wooden vessel
#

Yes, but if it eventually works well it could erase the compiled JS performance advantage to go along with Python's huge library of compiled C/C++ libraries

deft valley
#

But Z-Wave JS is still written in Javascript.

#

The choice of Javascript had nothing to do with any performance issues in Python, AFAIK.

#

Of course, the origination of Z-Wave JS is completely unrelated to Home Assistant.

wooden vessel
#

JS was probably selected because node,js built in support for server type applications

deft valley
#

I think it was selected because Al wanted to write it in JS.

#

But since he's in this chat, maybe he'll tell you.

#

Regardless, re-writing it in Python is probably not on the roadmap.

wooden vessel
#

He's probably got better things to do

deft valley
#

The current stack using HAOS is supposed to be undergoing Z-Wave certification.

grave notch
grave notch
#

But that's a herculean effort

wooden vessel
#

But it's true that node.js has built-in support for efficient non-blocking I/O to support server applications with a high request rate

wooden vessel
deft valley
#

not that I'm aware of. it's not too difficult to read though.

wooden vessel
#

Yeah .. after browsing a bit it looks lie i need to search for nodes of interest , I search for "ERR" and I see that associated with RSSI

#

I see stuff like this

[Node 025] [REQ] [BridgeApplicationCommand]
                                  │ RSSI: -79 dBm
                                  └─[Security2CCMessageEncapsulation] [INVALID]
                                      error: Duplicate command (sequence number 28)