[RELEASE] Custom Device Note v2

Starting a new thread for this app as the interface has changed significantly (Old Thread Link). (The function remains as enabling the ability to add and maintain a custom note(s) to any device under the Data section of the Device Details.) The HPM entry will point to the new code, but if you want to pull manually it is still at:
https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/custDevNote.groovy

Like any app devices must be authorized for use, this ability and a couple other configuration options are found under the collapsible Configuration bar.

After the devices have been authorized the screen will look similar to:


Hovering over the notes area will bring up a full listing of the note keys and values for that device:

Single Device Edit mode allows you to add or remove a new data item and/or update any data item that is already connected to the device:

Mulitple device edit/add/remove:

Entering a key/name for note that already exists will overwrite the value with the new value on Save. Likewise entering the key and hitting remove will remove the data item from the device. Key names cannot contain spaces or special characters - if entered the key will automatically be converted to camel case. Successful completion of the Save/Remove will return you to the main screen.

Note: The app will download a small javascript helper (iconify-icon.min.js) to the local file system the first time it runs.

15 Likes

Woot! Thanks again for this cool app and this major upgrade to it!

4 Likes

Excited to try this. Religiously use the V1 right now for noting what batteries a device uses and last changed.

1 Like

I have started changing the Devices Name to be the actual device manufacturer and the battery type. I can then do a device search on the battery type, ant it shows all the devices with that battery type. It doesn't help with the change date, but I don't really care. I just change them wither when they get to 25% or no longer respond.


1 Like

I'm confused on this. I have a note that was entered by error under the original version(in the yellow circle). I think this is what I'm doing, but I can't seem to get rid of it. I've tried deleting the text and save, clicking on the key title and clicking remove. Nothing seems to remove it. What am I missing?

Type (or copy/paste) GMS11Battery into the New/Remove Key field at the top and then click Remove

1 Like

So this just lets people edit all the device data fields willy-nilly? Kind of scary as a driver developer, some of that stuff is used by drivers to determine info about the device. IMO it would be nice if it had a predefined list of things to hide (maybe with a DANGER toggle to show all). Or the user had to supply the exact data fields they want to edit.

1 Like

Has always had that capability.

That’s the way the v1 worked….

Ahhh ok, ill give that a try when I get home.

For the most part, all i'm using this for is to keep track of battery info. In the first version I was constantly forgetting to change the device , so I have a bunch of devices that have the wrong information accidentally put into them. This way it seems much less likely to have errant infomation entered into the wrong device.

1 Like

Maybe a list of the note keys created on the device by CDN could be stored and only those are then editable by future use in CDN, plus adding new notes or removing old CDN-created notes? Or at least a warning if a non-CDN-created note is being updated?

2 Likes

I am trying to update the batteryDate field on a single device. After I update the note to today's date and hit save, nothing happens. The date/note does not change. I hit the save button next to the note AND the green save button on top, but still nothing. Not sure what I am doing wrong. I do have a file named iconify-icon.min.js in the local file manager.

After save the date/note does not change....

EDIT: When I start the app the following shows up in the logs, but nothing shows up after I hit the save button(s)...
Screenshot 2024-10-20 100847

I tried changing the date on another device and the same thing...nothing happens.

1 Like

Make sure you leave the entry field ( click off to the side somewhere) before clicking the save button.

1 Like

Tried that, no luck. I also tried uninstalling the app completely, including deleting the iconify.-icon.min.js file from the file manager. I then reinstalled the app from HPM. HPM says it is version 2.04. I then ran the app. The iconify-icon.min.js file is there.

I made sure I left the entry field by clicking off to the side, but when I hit the green SAVE button nothing seems to happen.

Do I need Java to run the javascript? I don't have Java installed but I do have Node.js version 20.17.0. Should I try installing Java? FWIW I am using Chrome browser.

EDIT...I am going to try to clear the browser cache and see if this helps.

Javascript ≠ Java

Try clicking on the save field buttons then

I tried clicking on all the save buttons in every which way I could imagine. When I click on a save button a circle flashes for a millisecond on the app header...so it is trying to do something, but it is not saving the data.

Clearing the browser cache did not make any difference. I also tried it using Microsoft Edge browser and it did the same thing. It flashes for a millisecond but does nothing.

EDIT...Since I use this just to keep track of the batteries, I am going to setup an Excel spreadsheet for the battery type and date starting with the one battery I changed today. I will give this a rest for a while. Thanks for your help.

I put up a new version with more debug lines. If you like pull it down, turn on debug and see what it shows.

1 Like

Not sure if I can help much....I did pull down version 2.0.5 from HPM and turned on debug....

I got it to upgrade maybe twice out of maybe 50 or so times I hit the save button(s)....

But the other 50 or so times the circle would blink in the app header, but the logs would not change. I would get the singledev pressed when I started but then nothing would happen after multiple clicks of the save button(s), and I did try your suggestions above numerous times.

I can not say what caused the few times to work....it appears random to me, and I did try it numerous times using different button sequences. I even downloaded Firefox and got the same results as Chrome.

I will give it a rest now. Thanks for your help. I will rely on my excel speadsheet for now.

Tried to get this app on my C8 platform 2.3.9.180. get the following error. What am I doing wrong?

Logs

That looks like a hub database error. May want to do a reboot with a rebuild of the database.

I am having the same issue. I tried using the gear icon next to the device as well as the "+" add/edit/remove note line, which both appear to open the same interface. Also tried "Return" after hitting both saves as well as using "Next" and "Done" to complete through the new app setup.

It took about about 15 times to get the updates to occur. Although I hit both save buttons MULTIPLE times, the debug logging only seemed to log the two successful attempts.

Debug Log

1 Like