Dynamically updating HM tab ttitle


 

Steve_M

TVWBB Guru
Dynamically updating HM tab title

Feature request: Dynamically update the HM tab with the current value of temp0

Not a front end guy, but it looks like this should be relatively simple to implement with a bit of javascript (which I suck at!).

Cheers.
 
Last edited:
Hrm that's not hard to do but I wonder if that's a good thing to do because the title affects browser history listings, bookmarks, and might have some other sort of interactions. I tried searching for some best practices regarding dynamic page titles and the only things I could find that said not to do it were things for SEO which makes sense. I'll give it a try and see if it mucks up anything.
 
It doesn't seem to be too much of a nuisance, except in Microsoft Edge which fades the title in and out every time it changes. Tested on Chrome, IE 11, IE 8, Android's Chrome, and Firefox. You can try it out in the snapshot release and let me know what you think.
 
Looks great, thanks!

It's nice being able to keep an eye on things just by glancing at a tab.

RYe9RWn.png
 
I gotta say I love this feature, great idea Steve. I'm working on something else and was just about to switch back to the HeaterMeter tab to see if the grill was heated up and oh I don't need to because I can see the temperature right there. Brilliant!
 
For some reason I can't seem to get this to work, I installed the snapshot release the day this feature was announced but I dont see the temp in the tab? Can you tell me what I need to install to get this feature?
 
For some reason I can't seem to get this to work, I installed the snapshot release the day this feature was announced but I dont see the temp in the tab? Can you tell me what I need to install to get this feature?

In your browser do a "view page source" and look for document.title

If it's there, you've got the correct code.

Edit: You also need to have an active setpoint. If you have the unit "off" it won't display.
 
Last edited:
Thanks, did that and dont find "document.title" in the source code of the HM page. I just went to heatermeter.com/dl and got the latest dev snapshot and installed it (config/system/backup/flash firmware : load image file from above) I still dont see "document.title" in the source? What am I doing wrong?
 
I just updated to the latest snapshot and can confirm that it's missing.

Somewhere between the snapshot on Jan 8th and the most recent one on Jan 17, the feature went missing.
 
Thanks for taking the time to load up the most recent snapshot and confirm this feature is not present, for a minute I thought I was crazy....
 
Yeah something weird is definitely up with the current snapshot images. It is missing key files for one thing. When I build, I see the packages being build but checking the rootfs image I don't see them there. I'm going to have to look into it but I am swamped currently so I can't say when.
 
Yeah I was noticing the same thing, it literally builds the packages and I can see them in the staging root but they don't end up in all the images. Doesn't help that when you're trying to find out where it went wrong with a build, you're digging through a 25,833 line file that looks like this:
v0LF4jT.png


I think it is fixed now, it was related to disabling linkmeter in the packagefeeds configuration file that is copied to the target. If the source package feed isn't listed in that list (even if it is disabled) it appears to not include the package when creating the root image? I think it is more undefined behavior because that doesn't make a whole lot of sense and I just ended up with a set of config options that aren't coded for so the packages fall through the cracks. In any instance it seems to be fixed and I just pushed all new full builds and pre-baked parts.
 
Did you update the snapshot image on the hm dl page? I just downloaded and installed but still dont see the temp on the tab?
 
I see it, but I upgraded via the HM.

system > backup/flash

In the Image URL box I used:
Code:
https://heatermeter.com/devel/snapshots/bcm2708/openwrt-rpi.gz

If you have a Pi2 or a Pi3 use:
Code:
https://heatermeter.com/devel/snapshots/bcm2708/openwrt-rpi3.gz
 
I downloaded the wifi image and installed it from file, also in system > backup/flash , maybe the image didn't take?

I just updated with the URL you posted and it works now!

For some reason when I download the snapshot image and go to system > backup/flash/ then "choose file" and select the file I downloaded it doesn't seem to update. After I hit "Flash Image" it says "downloading" on the browser info bar, when it completes it says "waiting for 192.168.X.X" and eventually says "bad gateway". When I refresh the page loads right up but doesnt seem to be updated.
 
For some reason when I download the snapshot image and go to system > backup/flash/ then "choose file" and select the file I downloaded it doesn't seem to update. After I hit "Flash Image" it says "downloading" on the browser info bar, when it completes it says "waiting for 192.168.X.X" and eventually says "bad gateway". When I refresh the page loads right up but doesnt seem to be updated.
Yeah you can't use a .img file and upload it through the webui. I haven't had a change to look deeply into it but somehow the upload just kills uhttpd which uses 100% cpu and a couple hundred megs of ram before the page times out and aborts. It has to do something with the uhttpd <-> luci transfer not expecting anything more than a few megs so something breaks. You'll notice that even with a 9MB gzip file it takes forever to get to the confirmation page, 90%+ of the time spent transferring the file from uhttpd into luci (not actually writing the file to tmp or doing the sha/md5 hashes).

I haven't had a chance to try anything from the /dl/ page yet but it should be working, although you can't upload it from the webui (and there's no reason to because you can just use the .gz image). Copying it to /tmp yourself then running sysupgrade would work but that's a lot of workaround for no purpose.
 

 

Back
Top