theengs / app

Theengs mobile application to read BLE sensors and push data to an MQTT broker
https://app.theengs.io
GNU General Public License v3.0
37 stars 7 forks source link

Sorting not working - on iOS at least with my sensors #43

Closed DigiH closed 1 year ago

DigiH commented 1 year ago

With version 1.2 (1020001) and my 2 x IBS-TH1 2 x CGDN1 IBT-2X XMTZC05HM

the list view order is always the same, no matter which sorting I use and at which location I am trying the sorting.

https://user-images.githubusercontent.com/17110652/200594680-d59e0dac-5b89-438a-a78d-eb39321970b4.mp4

With Order by: sensor model I would expect the two TH1s to be together, and with Order by: location in the above video the two Qingping Air Monitor Lites should have been sorted to the top, as this was done about 20 cm away from them, with all the other sensors being more than 7 m away.

No matter where and how I try it, I never see any changes in the list order of my sensors.

Since @1technophile seems to have a working sort order with his different sensor models this makes me think it could be model related.

emericg commented 1 year ago

The location is a text field you can set on each sensor screen, not the distance to the sensor. The sensor model is a list of sensors from WatchFlower, and so it doesn't have the Theengs sensors. This list order sensor by type (plant, thermometer, env sensor) and then sensor manufacturer/model (mostly).

1technophile commented 1 year ago

The sensor model is a list of sensors from WatchFlower,

Could you point me to this list on Theengs please ?

emericg commented 1 year ago

https://github.com/theengs/app/blob/ab32c7566ae77aa37ab654603da31a1d7896994a/src/DeviceFilter.cpp#L112

DigiH commented 1 year ago

The location is a text field you can set on each sensor screen, not the distance to the sensor.

With the rssi sorted by 'closest' distance in the Device Browser, additionally with the 'distance' dots view on the desktop versions, I assumed this was also used for the location sorting, as I couldn't find it stated differently otherwise anywhere.

With the above explanation it might be an idea to add/change it to

Order by: assigned location

DigiH commented 1 year ago

Closing as fixed in latest 1.3 with locations correctly being populated after a new start.