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

Last Seen field for monitoring battery devices? #2896

Closed
jpoeppelman1 opened this issue Jan 19, 2023 · 10 comments · Fixed by #2901
Closed

Last Seen field for monitoring battery devices? #2896

jpoeppelman1 opened this issue Jan 19, 2023 · 10 comments · Fixed by #2901
Assignees
Labels
question Further information is requested

Comments

@jpoeppelman1
Copy link

jpoeppelman1 commented Jan 19, 2023

The zigbee2mqtt integration has a last_seen field that is updated based on the last inbound signal from the device. Can we get the same for zwave-js-ui? If so, then users would have the ability to standardize our Node Red approach when monitoring battery devices that stopped communicating to the z-stick. I'm aware of the node_status entity populated in HA, but I want to know exactly the last time a device has communicated with the z-stick. FYI - the HA last_update and last_changed fields populate on HA restart so they are useless.

@jpoeppelman1 jpoeppelman1 added the question Further information is requested label Jan 19, 2023
@robertsLando
Copy link
Member

It's already there:

Schermata da 2023-01-20 11-39-12

Is your request about publishing it to mqtt?

@jpoeppelman1
Copy link
Author

It's already there:

Schermata da 2023-01-20 11-39-12

Is your request about publishing it to mqtt?

Yes, that is my request. Looks like you added it, thank you!

@robertsLando
Copy link
Member

Wait for next release or use master tag in case you are using docker

@jpoeppelman1
Copy link
Author

jpoeppelman1 commented Jan 23, 2023

I tried this out today, but I'm not seeing the new field (i.e. last_active) pass to HA as an attribute? I know you don't manage HA code base, but shouldn't this automatically populate as an attribute on the device when viewing in Node Red via node-red-contrib-home-assistant-websocket?

The zigbee2mqtt integration populates last_seen as an attribute so wondering if we could do the same under zwavejs-ui? I'm aware I could listen to the queue, but would rather query HA via node-red-contrib-home-assistant-websocket, the same way I query zigbee2mqtt devices. Is that possible?

@robertsLando
Copy link
Member

I don't pass anything to hass, I'm even not awere how this could be done? Do you have some docs about mqtt discovery?

@jpoeppelman1
Copy link
Author

I don't pass anything to hass, I'm even not awere how this could be done? Do you have some docs about mqtt discovery?

Here is the info about MQTT discovery. I'm using the HASS ZwaveJS integration which connects to your app using websockets. I'd imagine there is a discovery message you could send that would setup the attribute?

https://www.home-assistant.io/integrations/mqtt/

@robertsLando
Copy link
Member

I'm using the HASS ZwaveJS integration which connects to your app using websockets.

Zwave-js integration isn't managed by me, you should open an issue on HA core repo for that.

@jpoeppelman1
Copy link
Author

I noticed when the container is restarted, battery devices display "Never" under Last Active field. Is there a way to persist the last active field value upon a restart so there is no data loss?

@robertsLando
Copy link
Member

There is an open issue on zwave-js repo for that. Need to wait for that, @AlCalzone do you have a reference to that issue, cannot find it on zwave-js repo?

@AlCalzone
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants