Comments (8)
Do you get information from the temp and humidity sensors? My device has stopped sending these while charging the battery and while I see new values transmitted in MQTT Explorer they don't register in Home Assistant.
from homebuttons.
@EarMaster , temp & hum do update, but not on a fixed schedule. Perhaps they update only if the delta is big enough.
Anyway, this update also causes the batt% to update, until Home Assistant decides it's been unavailable for too long, causing the % to not be visible anymore.
from homebuttons.
Just to clarify: the device is always in deep-sleep. There is no other mode. It wakes up on a button press and every 10 minutes to post temperature, humidity and battery percentage. Then it goes back to deep-sleep.
Last will and Birth messages are not used. Home Assistant will display the sensor entities as unavailable only based on time since last received MQTT message.
This option is set in MQTT discovery sensor setup: expire_after: '660'
Therefore the entity should never become unavailable, because messages are posted every 600 seconds normally.
@Zixim Are the button presses reliable for you? Does the battery percentage become available right after you press a button? Please check that you really receive messages every 10 minutes in MQTT Explorer or a similar app. Maybe your Wi-Fi is not reliable enough. Which Home Assistant version are you using?
You can see two times in Home Assistant: Last changed and Last updated. But they only change if the value changes by a delta (see here). Which for battery, it doesn't very often. But for expiry, the actual time of the last received MQTT message is taken into account. So the Last changed can be longer than 10 minutes and the entity should still be available. Given that MQTT messages are received of course.
@EarMaster Do the values you see in MQTT Explorer differ from the ones in Home Assistant?
Charging should't have any effect on how the device works and when it posts sensor messages.
from homebuttons.
When I press a button the action is triggered in Home Assistant (so the connection itself works). In MQTT Explorer the values appear:
In Home Assistant the sensors register as "unavailable".
In the sensor's history you can see that there the sensor received values (yesterday when I first activated the device), but the last value is too old and from around the time I plugged in the charger.
I have tried to restart the device (enter setup mode and call the /restart route, but still the values are not recognized by Home Assistant.
from homebuttons.
@EarMaster Thanks. That's strange. I'll try reproduce it. What version of Home Assistant is this? Could you also please share what it says if you press MQTT INFO and then open payload for temperature. Should be something like this:
name: Home Buttons DDB400 Temperature
unique_id: HBTNS-2209-001-DDB400_temperature
state_topic: homebuttons/Home Buttons DDB400 /temperature
device_class: temperature
unit_of_measurement: °C
expire_after: '660'
device:
identifiers:
- HBTNS-2209-001-DDB400
platform: mqtt
from homebuttons.
name: Mother Temperature
unique_id: HBTNS-2210-046-9FF628_temperature
state_topic: homebuttons/Mother/temperature
device_class: temperature
unit_of_measurement: °C
expire_after: '660'
device:
identifiers:
- HBTNS-2210-046-9FF628
platform: mqtt
I think I found the issue. I think I tried to change the Device Name during initial setup, but it always gets reset, when you enter setup mode again. So the sensors are listening for my new device name (Mother) instead of the actual device name (Mother 9FF628) which I at some point kept because it didn't seem worth it to change it every time. I reloaded the MQTT integration and the sensor values now show up.
from homebuttons.
@Zixim Are the button presses reliable for you? Does the battery percentage become available right after you press a button? Please check that you really receive messages every 10 minutes in MQTT Explorer or a similar app. Maybe your Wi-Fi is not reliable enough. Which Home Assistant version are you using?
- Yesterday button presses were reliable. Today it shows "wifi error" or "mqtt error" or it works.
- When HA (Home Assistant) receives the button press, battery % is also updated as well as hum & temp.
- I was running MQTT explorer all day yesterday, just to monitor the button's messages, and the interval definitely wasn't 10 minutes exactly. The delay varied from 10m to 30m, which led me to believe it would only send if a certain threshold was reached. My bad.
- I'm fully certain that wifi is reliable. For now the button is in my lab/workshop, there is an AP in the same room. Also, I have dozens of other esp devices across the house - if wifi were spotty it would be pretty obvious.
- HA is version 2022.11.4 which is latest at time of writing.
from homebuttons.
@EarMaster Exactly, that was the issue. The topic was different.
When entering Setup the random ID is appended to device name each time. Thats a bug.
But when exiting the setup, MQTT discovery setup message is sent every time. So the topic in Home Assistant should update. I don't know why it hasn't in your case. If reloading the MQTT integration helped, maybe it was a problem there.
@Zixim Your issue is not related to this one. I opened a new issue and referenced your post.
from homebuttons.
Related Issues (20)
- Request: Add ability to change URL MDIs are downloaded from HOT 2
- Mqqt Error: Mqtt Password Truncated HOT 6
- Download the binary directly from GitHub
- Update from v2.3.0 to v2.4.0 on original HomeButtons does not work using Online Flasher HOT 1
- Feat. request : export/import settings
- Update failed HOT 9
- Update case files HOT 1
- Icons not displaying HOT 2
- special chars limitations? HOT 2
- Show value from HA on Label6 HOT 1
- [Bug] Using '{% ... %}' syntax in label bricks device HOT 2
- Need support for recovering my bricked Home Buttons after update HOT 1
- Automatic WiFi reconnection HOT 2
- After Update v2.4.1: single button pressed automatisation are not executed anymore / reliably transmitted (?) HOT 5
- Feature request: display a custom message with an optional timeout
- home button controls do not show up in home assistant HOT 3
- Single press does not work anymore with Home Assistant HOT 3
- Please reset IP-Configuration after WiFi-Setup ? HOT 2
- Icons not downloading HOT 2
- Flickering while updating HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebuttons.