espressif / esp-rainmaker-ios

ESP RainMaker iOS app sources
https://rainmaker.espressif.com/
Apache License 2.0
48 stars 25 forks source link

Problem with parameter confusion (MEGH-3749) #14

Closed jacek12345 closed 1 year ago

jacek12345 commented 2 years ago

Reproduced on multi_device example. Using ESP-IDF v4.4.2 ESP32-C3 iOS app Problem is that edited value of parameter A sometimes is comming to device as value of parameter B. You can see this issue on multi_device example. Go to Temperature sensor device and change name to something that is accepted as float (e.g. 25). It is comming as Temperature value, not name value. Sometimes it comes as should. If change name value to other text - it correctly comes as name parameter or sometimes give "Failure! Please enter a valid float value" message on app, that means it treat parameter as temperature, not name value.

I'm not sure if it is iOS app related or RainMaker backend related issue.

https://user-images.githubusercontent.com/34368502/183907889-59cdf50e-efd4-4ce9-8019-899564e6a85d.MP4

From monitor:

I (58223) esp_rmaker_param: Received params: {"Temperature Sensor":{"Temperature":14}}
I (60473) esp_rmaker_param: Reporting params: {"Temperature Sensor":{"Temperature":25.50000}}
I (71113) wifi:new:<1,0>, old:<1,1>, ap:<255,255>, sta:<1,0>, prof:1
I (72133) wifi:new:<1,1>, old:<1,0>, ap:<255,255>, sta:<1,1>, prof:1
I (74203) esp_rmaker_param: Received params: {"Temperature Sensor":{"Name":"abc"}}
I (74203) esp_rmaker_param: Reporting params: {"Temperature Sensor":{"Name":"abc"}}
I (81343) esp_rmaker_param: Received params: {"Temperature Sensor":{"Temperature":88}}
jacek12345 commented 2 years ago

can You confirm this issue?

shahpiyushv commented 2 years ago

@jacek12345 , yes we have confirmed this issue and will work on fixing this. This is not related to the backend though.

jacek12345 commented 1 year ago

Still, there is a problem

https://user-images.githubusercontent.com/34368502/209129694-35d71ba3-c0b1-43a7-a51a-2be9ab678633.MP4

From monitor: I (45518) esp_rmaker_param: Received params: {"OUT 1":{"Name":"1"}} I (45528) esp_rmaker_param: Reporting params: {"OUT 1":{"Name":"1"}}

vikas-chandra-mnnit commented 1 year ago

Still, there is a problem

RPReplay_Final1671710080.MP4 From monitor: I (45518) esp_rmaker_param: Received params: {"OUT 1":{"Name":"1"}} I (45528) esp_rmaker_param: Reporting params: {"OUT 1":{"Name":"1"}}

Thanks for notifying the issue will take a look again and push the app update with this fix.

vikas-chandra-mnnit commented 1 year ago

Hi, @jacek12345 We have tried multiple examples with app version 2.9.0 but were not able to reproduce this issue. Is it possible for you to share your email id so we can decide to connect over call for live debugging?

jacek12345 commented 1 year ago

sure, can send You by e-mail?

jacek12345 commented 1 year ago

I loaded standard Temperature sensor example and reproduced in 2 minutes.

https://user-images.githubusercontent.com/34368502/213454263-ebeed399-d412-4373-84b4-9f41aa7aafed.MP4

vikas-chandra-mnnit commented 1 year ago

Hi @jacek12345, fix for this issue is added to the ESPRainMaker App Store release 2.10.0. Please have a look and verify.

jacek12345 commented 1 year ago

Thank You @vikas-chandra-mnnit Now it looks quite ok. I tested with changing name parameter and i had twice something like "Optional("xxxxx")" but it is hard to replicate and it was in proper parameter (Name), so it is not very bad.