# Implementing device:getName or some similar function

**URL:** <https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542>\
**Category:** Ideas / Feature requests\
**Created:** [June 5, 2022, 7:01am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542 "2022-06-05T07:01:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 5, 2022, 7:01am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/1 "2022-06-05T07:01:38Z")

</div>

Currently, there is no way to retrieve the 16 already typed device names. This would cover that area.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [June 10, 2022, 6:36am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/2 "2022-06-10T06:36:56Z")

</div>

functions to set and get device names and message rates were added to the upcoming version 3.0 (3.0-a.2 specifically)

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 10, 2022, 7:45am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/3 "2022-06-10T07:45:26Z")

</div>

Cool, keep us posted.

Also, a BIG request. When saving, a way to save some table with our data! Im building stuff that is just virtual devices,  
And same pots change functionality depending on a variable. This allows me to use way more than the 412 controls, and easier to reuse stuff… Could the saving be possible?

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [June 10, 2022, 8:42am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/4 "2022-06-10T08:42:20Z")

</div>

ok, if I got you right you are asking for some general key-value store that would be saved as part of the snapshot?

btw, as of 3.0 Electra base firmware can run sqlite database. It is currently accessible from C++ API only but Lua should not be too hard I guess. I will check that out.

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 10, 2022, 11:24am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/5 "2022-06-10T11:24:55Z")

</div>

Well, no really key value, since that would be harder to retrieve and decode. I’m thinking storing a lua table, that might be multidimensional. Maybe a way to convert it to json, so it can be stored in plain text?

I’m pretty new to LUA, but i’ve been amazed of how fast it is doing stuff for an interpreted language.

This storage suggestion would make it possible to just make apps in lua and use the main app just for designing the interface

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 10, 2022, 11:37am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/6 "2022-06-10T11:37:40Z")

</div>

sample of what would be stored:

{  
car = true,  
[“key”] = {1,2,3}  
}

sorry, can’t format it since i’m on my phone on a plane about to take off.

---

<div class="post-metadata">

**Author:** ![Kaltar](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/kaltar/32/1051_2.png) [@Kaltar](https://forum.electra.one/u/Kaltar)\
**Post date:** [June 10, 2022, 11:38am UTC](https://forum.electra.one/t/implementing-device-getname-or-some-similar-function/1542/7 "2022-06-10T11:38:01Z")

</div>

and obviously way longer than that
