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 not showing up #9398

Closed
sbcrumb opened this issue Oct 29, 2021 · 9 comments
Closed

last seen not showing up #9398

sbcrumb opened this issue Oct 29, 2021 · 9 comments
Labels
problem Something isn't working

Comments

@sbcrumb
Copy link

sbcrumb commented Oct 29, 2021

What happened

New Install just a few devices and last seen of the bulbs is not being reported.
Availability is set to 60. last seen did prev work in HA on a ZHA with the same devices.

What did you expect to happen

Last seen to been shown on front end and in home assistant.

How to reproduce it (minimal and precise)

Link to config file
https://www.toptal.com/developers/hastebin/efoxavolod.yaml

Debug info

Zigbee2MQTT version:
Adapter hardware: CircuitSetup CC2652P
Adapter firmware version: Z-Stack 3.x.0 20210708

@sbcrumb sbcrumb added the problem Something isn't working label Oct 29, 2021
@sjorge
Copy link
Sponsor Contributor

sjorge commented Oct 29, 2021

You need to set last_seen to something that is not disabled

https://www.zigbee2mqtt.io/information/configuration.html

@sbcrumb
Copy link
Author

sbcrumb commented Oct 29, 2021

Oh wow I missed that, I feel dumb. So I can just set this to true and should be good?

@sjorge
Copy link
Sponsor Contributor

sjorge commented Oct 29, 2021

  # Optional: Add a last_seen attribute to MQTT messages, contains date/time of last Zigbee message
  # possible values are: disable (default), ISO_8601, ISO_8601_local, epoch (default: disable)
  last_seen: 'disable'

you need to set it to one of the listed values

@sbcrumb
Copy link
Author

sbcrumb commented Oct 29, 2021

Ok and is there any difference or does it really just not matter?

@sjorge
Copy link
Sponsor Contributor

sjorge commented Oct 29, 2021

I assume the format would be different, but I’ve never enabled it myself.

@sbcrumb
Copy link
Author

sbcrumb commented Oct 31, 2021

Ok picking one seems to have worked. Thank you.

@sbcrumb sbcrumb closed this as completed Oct 31, 2021
@VesleSlotten
Copy link

Well, after upgrading til Zigbee2MQTT version 1.22.1 the “last_seen” attribute is showing up as “disabled by the integration”.
It’s possible to enable it in the HA UI, but that is a time-consuming way to update this.
For the “last_seen” attribute it’s not that important for me, but also other attributes are now “disabled by integration”.

I’m using the illuminance attribute, that comes with the “Aqara human body movement and illuminance sensor” (RTCGQ11LM), in a few automations, and they stopped working until I manually enabled the attribute again.

Would be nice if this could be fixed, unfortunately I don’t have the programming skills required to help out with the coding .

@Lefuneste83
Copy link

Lefuneste83 commented Jan 2, 2022

Yes same super annoying issue here. Every time I repair my Zigbee network all my devices show up in HA with basic state information, but with many disabled entities. Considering I am conducting many tests of various coordinators I have to redo it on a daily basis.

In particular :
For all devices :
-Last Seen
-Link Quality
-Battery Voltage in Volts (not Battery Level in %)

For Metering Plugs :
-All the above
-Current Drawn
-Voltage
-Outage Memory

So I have to manually edit, enable the entities one by one, then restart HA. Consider 25+ devices time between 3 and 5 entities to manually enable by hand. This is insane ! The entities do have an associated Payload, it's just that for some obscure reason, HA decides that it is not worth enabling them by default. What am I doing wrong here ? Is there a setting in Z2M to force publish these entities with an active state ? Again there is a Payload behind each of these entities. I can see it in Z2M GUI and in my MQTT broker.

I should add that I am using Z2M on a separate Z2M Gateway and so I purely integrate to HA through MQTT messages.

@gizmocuz
Copy link
Contributor

gizmocuz commented Mar 6, 2022

From a fresh newby, I also wondered why 'last seen' was always NA, if it's not configured, maybe do not display this line ?
But even better, why not set this to enabled by default (local time)
Not that it would make any difference in the TCP packet being send to the MQTT broker as the MTU is 1500+ bytes
I think it's a great feature to detect if some sensor is still functional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants