HSM and Mode are available on all dashboards as defaults. Is your Withings device added to the relevant dashboard using Apps, Dashboard?
Well, that's interesting. My wife's sleep pads updated the info into the app in the morning. Mine did too, but is missing the "presence" attribute. How could that happen?!? Something strange is still going on with my setup.
It sounds like the bedin/bedout event aren’t working. I’ll take a look tomorrow
Yeah, it's strange. I think they were working OK but now not for me. But as I said I've had some connection issues with the pads and some connectivity issues with the Withings server it seems too (maybe timeouts based on their API email to me, above). So not blaming your app at all ok
Those emails would be related to the discussion of having deleted the devices. I’ll add better error handling for that
Ah, I see. Thank you!
Thanks, that was the problem...
That is really weird. My understanding was that an attribute keeps its value until an event updates it. So, even if the bed in/out event isn't triggering like it is supposed to, it seems like the attribute would just show a stale value, not disappear entirely. Mine has been working without any issue, so I can't contribute anything towards resolution unfortunately (or, fortunately for me )
If it was never set it won’t show. My gut says that’s what happened. But otherwise you’re correct
It's now started showing presence on both our sleep pad devices in HE. I will give it some time to settle down I think and report back in a few days. But certainly, reconnecting the app to Withings blows away the devices leaving issues with ghost devices in dashboards that must be refreshed and potentially broken and irreparable triggers/actions in rules based on my experience.
Hi @dman2306, my pad worked OK this morning so it seems to have resolved itself. Nevertheless, a thought arises...
[Feature Request]
Would it be possible please to include an option to select a switch that then gets set "on" for "present" and "off" for "not present" on the sleep pad. Yes, I realise this can be done in a rule or 2 (or 4). But it's best to have it embedded in the app for simplicity, performance and to avoid the issue I mentioned above of rule actions and triggers getting detached from the sleep pad devices. The use case for me is that since presence devices cannot have their presence setting "forced" (to either present/not present), I would like some automations that need presence sensing run off switches instead. This way you can manually override the presence yourself with a simple switch to force various things to happen but the app will still synchronise the switch to the pad when it receives a presence signal. Please do consider my request! Thank you!
@bptworld asked about it too. I really try to keep capabilities related to the device at hand. Seeing an on or off command would be confusing to many users. Does it turn the pad on/off? No, I set it to off but it still recorded my sleep... why?
What about this. Someone (don't recall who) asked for a command that lets you set the state in case it got out of sync. What if I add a custom command for setBedPresence or something like that. Then you could change it yourself. Of course, if you set it to not present, then a new presence event occurs it will mark you present again but I think that's what you want. I just really would prefer a command that "makes sense" vs adding a switch capability that I think could be confusing. Would that work for your use case?
Personally I don't like to force a device to report something that it isn't genuinely. So requesting it to move to a present state when it is not doesn't seem appropriate to me, although this is a function added to motion sensors and can be useful if/when a sensor gets stuck. That's not the problem in this case. I just want the app to activate a switch based on the presence. I'd rather have the app activate a separate switch that I can manually adjust. This type of functionality is commonly available in other drivers (for example Bryan has several where a switch gets activated based on other functionality in the app). But no worries, really, if it doesn't match your opinion. It is fine I can work around it in RM as long as the existing devices don't get blown away if the app needs reconnecting with Withings. Because that then causes all sorts of issues with the triggers or actions getting corrupted inside RM as I documented above. Whatever you decide is good for me ok!
Ah I think is misunderstood. You just want to select a virtual switch to toggle?
Exactly. The model would be like Bryan's Web pinger app. It just allows a switch to be thrown on/off. So the same here for presence. Allow a switch to be selected to be thrown on/off with presence in bed (not toggled because it may get out of sync, but on for present and off for not present). That's it
Managed to achieve this by editing your code
In case anyone else has the need to throw a switch with in/out bed presence, here you go (in the child app)...
First allow selection of a predefined switch:
Then throw it on/off according to the in/out bed status:
Why not just do this in a rule? Because if you have to reconnect the app to Withings (as I've had to a few times if the connection fails with timeouts) then the Withings sleep pad sensor can get deleted from your hub and a new one created. This messes with any rules that use that sensor device as a trigger leaving the rule unable to be edited. Using a switch like this instead for your automations isolates you from that issue. Why a switch? Because it can be manually set from a dashboard, whereas a presence device cannot. So this way I have complete control
Thank you for the awesome app!
Sorry. Been too busy to get this added lately!
No worries at all. I understand completely. If it makes sense for you to include it in the core code some time, that would be nice in case you enhance other aspects and an update blows my changes away!
Just bought an eight sleep pad which is useless because presence detection takes 10 mins. How fast is the withings?
5-10 seconds for me.