Devices disappeared in the app, but not in the API

Has anybody run into this before? I am creating a device handler that was working just fine. All of the sudden all devices that used this device handler disappeared from my app, but I can still see them in the API. They are also still working with automations. I just can’t do anything else with them since I don’t see them in my iOS app.
I was editing my device handler when this happened. So, I can’t rule out that some change I made caused this. Is there certain things within groovy that would cause a device to no longer show in the app?
This is really strange. I don’t see any way for me to get my devices back. I have even deleted a device within the API and repaired it again. That all works and the device shows in the API again. But, it never shows back up in the app.

Thanks for any help.

Are you sure you are looking at the same location in the phone as the devices are in?

1 Like

Yep. They were there the whole time. It wasn’t until I opened the details (selecting a device on the “My Home” view) and going back to the Things list that the device just disappeared.
If you mean my ST location, then I only have one location and one hub. (maybe I am misinterpreting what you mean)

Basically, I was editing the tile section of my device handler at the time the devices starting disappearing. Maybe there is some tile property that can cause this?

For the records. Here is a screenshot of my devices in the API and the iOS app (where they are missing). As you can see the devices are still communicating to my ST hub, since they have updated activity just minutes ago.

Ahh in the graph web ide, I thought you were hitting the API directly. In this case you may want to reach out to support.

Sorry, I should have said IDE and not API. I‘ll get in touch with support.

could it be “chard” issue? in IDE if you hit locations is there only one listed?

I have this issue from time to time as well and most of the time is because of the battery level caused by the DTH. Lowes iris motion sensor and Xiaomi humid/temp sensor are the two I can definitely can confirm of having them listed in IDE and not the apps when the battery level is out of range of the device parameters.
Only way to get them back is remove/reset and add back. Sometime waiting a couple of days and they show up as well. Very weird.

1 Like

I can confirm Iris sensor disappears if it has voltage it doesn’t like. I put to high a voltage.

This interesting, because it was the battery display and tile that I was messing around with in the DTH. But, deleting in the IDE and re-connecting doesn’t do the trick. So, it may have to do with how I have setup the battery display in the tile that is preventing this altogether. I will remove the tile totally and see what happens.

OK, it definitely had something to do with my battery display. After removing the battery tile and commenting out the parse routine for the battery attribute I was able to get the app to show the device again. It only happened after removing the device and reconnecting it again. I will give the other devices some time and see if they appear on their own at some point. Otherwise I will need to re-connect all of them again.

Thanks for the tips. I feared that this had something to do with my coding. Although it is strange, as all I did was instead of displaying the battery percentage (which worked fine), I wanted to only display if the battery is OK or not and just changed the map.value for the tile from the percentage value to simple text “Battery OK” or “BATTERY LOW!”. I did this because displaying battery percentage is misleading as your device could potentially not work just after the battery drops from let’s say 80% to 70%. That may already be too low for the device to work, so displaying percentage would be misleading when you see 80% and think you are good for a while and a couple days later your device doesn’t work.

Also, while testing this I did remove a battery from a thermostat (it has 4xAA and can run on 3xAA) to see what happens with the battery values. And the ST hub did log a battery low alarm. So,seeing what others have noticed with the Iris, I don’t know if it was my code or the low battery alarm (or both) that caused my devices to disappear.
I will come back to this thread when I have figured it out. Maybe the Iris DTH also needs to be modified with regard to its battery level handling.

1 Like

Matt, can you explain what you mean with “chard issue”? I only have one location, so it is expected that only one location is listed in my case.

Well it seems you’re way more advanced than the chard issue! Thanx for posting the detailed solution!