Slider controller widget not remembering last set value (and some inconsistencies)


#1

Hi,

I recently set up an ESP32-based development board to connect to Cayenne using the official Cayenne-MQTT-C library. I’m using ESP-IDF as I’m planning to use a few external libraries and FreeRTOS (that’s why I’m not using the Arduino-based Cayenne-MQTT-ESP library). I’m using the Linux example as a starting point so I ported the Timer & Network structures for ESP-IDF (I peeked at the arduino-esp32 libraries for some help).

I’m an iOS user (using iPhone with latest iOS 11.2.5 and the Cayenne app seems to have been last updated 8 months ago) and I also use the Web dashboard occasionally. I’ve set up a temperature sensor to report from my device and it shows great in both dashboards. I’ve also set up a button to control an LED lamp and it also works as expected (both the iOS- and Web-dashboard display it correctly and remember the last state of the button). So far all is good.

However, I wanted to add a slider controller widget and I did. I thought that it worked fine (the web dashboard received the update from the iOS dashboard, and vice-versa) but as soon as I close the web dashboard it forgets the last value of the slider. The same happens with the iOS app - as soon as I refresh the devices list or close the app - it also forgets the last value of the slider. Even if the iOS app is active the web dashboard doesn’t remember the last value of the slider upon refresh.
I’m not sure whether I’m supposed to do something in the client code (on the ESP32) but I also not doing anything special for the button that I added (I’m just triggering a device on or off and printing the status upon receiving a message from the COMMAND_TOPIC).

I’d also like to report an inconsistency in the slider implementation between the iOS dashboard and the web dashboard. The iOS app seems to send floating point values to the MQTT server and doesn’t allow me to set a step size. It also doesn’t allow me to change the unit type (i.e. it only shows “Analog” in the list - this is where I’d expect “float” or “integer” or something similar to appear, but maybe that’s just me). Basically I’d like to be able to limit the dashboard to send integer numbers only but I don’t seem to find a way to do so.
On the Web dashboard when I move the slider it goes to integer numbers only by default (without setting the “step size” option), and even if I set the “step size” to 1 the iOS app ignores this setting entirely and continues to send float’s.
On the web dashboard, going to the slider controller widget options, it shows “Choose Unit” as the unit type. Here again (like in the iOS app) the only option is “Analog” and when I select it and save the setting, as soon as I do a refresh on the page the slider controller widget disappears. It is still visible to the iOS app and I don’t have an explanation on why this happens but I didn’t set it as hidden in the iOS app (I also tried toggling the “hidden” toggle button but that didn’t cause the slider controller to appear back in the web dashboard). Deleting the widget and recreating it is the only way to make it appear again in the web dashboard afterwards. I did this twice so it seems to be reproducible, at least on my end).

Please let me know if I’m doing anything wrong so I can try and correct it.

I’m also wondering if there’s any API I can call from the C library that can automatically create a button/actuator/slider widget for me on the dashboard. Maybe that way the last value will be remembered in the dashboard? Just thinking out loud.

Sorry for the long post, I tried to describe the issues I’m facing the best as I can.
Hopefully I can get some response soon from the Cayenne team.


#2

@adam or @rsiegel, did anyone look into this already?
I had this issue last week and this week it seems to have fixed itself. Let’s maybe wait a few days and close the thread? Thanks!

Edit: The inconsistencies in the web dashboard vs. iOS dashboard are still a point I’d like to discuss. Is this something that you’re working on?


#3

I don’t believe the sliders have been fixed yet. I believe there are some mobile app fixes coming, but I’m not sure when. Tagging @bestes