Add "Notes" field to devices

Any errors in the logs? Just pushed up the remove I may have broken something.

1 Like

CR2032 note filled in after I posted...maybe a delay due to populating all the devices I selected. I'll try another battery device and see.

Once you're off your phone and on a computer (really, did this on your phone?!) if there is an option to rename each instance that will help a lot. Or parent-child setup. But very cool, love this generally, can see a lot of uses for it beyond just battery notes!! Is there a length limit?

image

I'll have to look at that, I know I had to refresh the device display to see it.

1 Like

Yeah, pulled in an app framework file I had lying around and added the code from my iPhone.

1 Like

Very cool. Second instance the note updated on the device as soon as I looked, so there may have been some intermittent delay. Really like this - thank you.

1 Like

App instance is an easy add, may wait until I get home though. (App isn't needed after the note is added unless you want to update or remove the note.)

1 Like

I think it's 1024 characters (it's a normal state attribute), but I know it's greater than 1024 because I've exceeded that before, but not sure how much. I'll see if I can find something to verify the actual limit.

1 Like

There is definitely some initial delay. I tested the app immediately after you posted it. When I added a note on one device, it didn't show up. I was perplexed and added a second device (which gets the same note), and then the note showed up on both devices. When I removed the note it seemed to happen immediately.

FWIW, I think your app should get it's own thread. Very nice concept.

5 Likes

Added a thread in the Code Share|Community Apps and Drivers:

Still need to get the app into HPM and add some screen shots to the thread though.

6 Likes

I've thought of asking for something similar. Better than a field would be an attribute so you could use this is rules and such, so you could create a rule that would add the batteries to your shopping list when they are running low.
The ability to add custom attributes would be even better as I have a number of variables that track additional information about devices, and it would be cleaner and more organised to have them as part of the device.

I believe what you are asking for there would have to be handled at the device driver level so that probably won't happen. However you could create an automation that is triggered when any of a list of devices that contain a particular type of battery gets low.

Can't give you attributes, but I've added the capability in the app to allow you to "name" the data element being stored which effectively permits you to store multiple unique data items on the device.

Edit: If you have a use case that needs the data element to be available to RM let me know, I think I could create an app and child device that would allow you to do a command from RM on the child device that the app could fulfill by populating an attribute on the child device utilizing data stored in the device data area.

4 Likes

If I have 3 battery devices, each with a different battery, how do I handle this with your app?

App just stores the note in the device information. Once stored the app can move on to the next device and store different information. Think of it as a notepad app for device data, it opens the device data area, stores the data, and closes the device data area.

2 Likes

gotcha - thanks

This is a slick and handy app. Thanks bear.

1 Like

Wow, this is really amazing. We've been asking for device notes for years
Thank You

2 Likes

I've seen the request off and on, but yesterday it just suddenly dawned on me how easy this was to implement.

3 Likes

Back up that info, though. If the device is excluded or replaced, seems like the notes will be lost. Perhaps the app could retain a database of all the notes it has created so that replacement devices could have the notes restored.

1 Like

if I am trying to add notes on different devices, do I just write over what's there?


I now want to add notes to some sonoff temperature sensor (and try that link suggestion from a different thread) , but I don't see where I create a new note for new devices.