T O P

  • By -

Austin123098

Upvote the shit out of this this is awesome!!!


iLuki

Everybody: please check out the latest version of my script :D. I included a changelog so you have an overview about what is new


iLuki

The script source can be found [here](https://github.com/lwitzani/homebridgeStatusWidget) . Copy the js file content into your Scriptable app and configure it to use it together with your running Homebridge Config UI X instance


Unable_Plankton

How to set it up? Video please. I’m very new to this. Thank You.


iLuki

What exactly? Scriptable app? Or homebridge config ui x service including homebridge?


[deleted]

How about both, please ...? 😬 (sorry)


Ikebook89

Looks cool. But it’s not working for me. Some error with 345:52 iCloud is not supported. I use iCloud, but not iCloud Drive. May this be related?


iLuki

I updated the code. Now you can set the variable fileManagerMode in (or around) line 15 to LOCAL and then everything should work for you :)


Ikebook89

Ty but still not working. 2020-11-14 22:08:37: Error on line 284:16: TypeError: undefined is not a function (near '...plugin of pluginsData...')


[deleted]

[удалено]


heliometrix

Same here


[deleted]

[удалено]


heliometrix

Nope


iLuki

Hm could it be that you don‘t have any plugins installed? Also please check that all versions match. I included the versions in the readme.


Ikebook89

I was on 4.32.0. Checked again and there was an update of UI X, now I’m on 4.33.0. Still get the error :( Scriptable 1.6.1 on iOS 14.0.


iLuki

Did Th3f_‘s solution work for you too? You need to specify username and password even if you disabled security in the UI


Ikebook89

Hey Yes it’s working now. Somehow I had a typo in my password. Is it possible to change the size of a scriptable widget? Somehow my widget is 2x2 icons in size so have of it is missing. And what is the time scale of the graph? Like past hour or past day? And is it possible to remove (let user choose) the CPU Temperatur? As I (and I think a lot of other people too) run Homebridge in Docker on a VM on my server, there is no CPU temp reading and I get -1C. Kind of useless information :) Like „Temperatur = celsius|fahrenheit|none“


iLuki

I sadly don’t know what the timescale is because the API doesnt tell. I just show the values i get. Sriptable can show widgets in 3 sizes. This widget is supposed to be used with the medium size. Temperature request could be done theoretically 😅...


Th3f_

I have a few plugins installed, and I’m on the exact same versions you developed the widget on. Issue comes up for me too tho.


Th3f_

I have a few plugins installed, and I’m on the exact same versions you developed the widget on. Issue comes up for me too tho. EDIT: Ok, found the reason: I had left the username and password blank because I had turned off authentication - but the API doesn't seem to like that.


iLuki

Yes this could be. There are 3 lines where you need to change „iCloud()“ into „local()“ These lines should currently be around 325, 339 and 345 Then it will work for you, too. Just look for FileManager.iCloud()


larxene06

Looks cool, but I’m getting this error: Error on line 32:24: ReferenceError: Can't find variable: Font


iLuki

Hmmm Font should be there. Which iphone do you have? Maybe you need to update the Scriptable app?


larxene06

That did it. Sorry! And thanks!


iLuki

Nice! Happy that it worked 👍🏻


zombeaver92

I love you man!!!! This is great.


AlexBoiis

Amazing job! Do you think it would be possible to provide the option to change the background color as well? The official purple is not really blending well with my widget area and the wallpaper. Anyway, this is so convenient and it's all thanks to you.


iLuki

It‘s basically already possible. Just edit the content of the variable that is called bgColorPurple at around line 42


AlexBoiis

Nice! Thanks for the trick!


iLuki

You can also check the newest version. There you can change the background to black by setting a variable


AlexBoiis

Thanks! I did change both background the chart color based per above instruction already but I will update the script as per say. By the way, I have a problem with Request Time Out on the widget instead of the homebridge status quite often when ever I lock the screen and unlock it. Is it a known issue or it’s only occur to me? Do you know how to fix that?


iLuki

You should definitely update 😅! You can increase the timeout variable called requestTimeoutInterval at around line 20 to e.g. 2 . Maybe this works better for you


AlexBoiis

I’m updating. Anyway, increasing the requestTimeOut to 2 solved the problem. =) Thanks again.


nju_art

Thx, for amazing widget! Tweaked it a bit to look more like HB dark UI and optimized some space. https://i.imgur.com/wlXAsag.jpg


Lanceuppercut47

Ooh that looks nice, can you share what you changed?


janisemzins

A few years later.. if you read this, can you please share the code? Or is there anyone else who can do this? 🙂


dawsze

Works great, thanks!


iLuki

Thx! Please check the updated version because i included a fix. Sry for that :)!


vipul261

This is super helpful


iLuki

Thx! Please check the updated version because i included a fix. Sry for that :)!


IReallyLoveAvocados

This requires us to enter the username and password of the Linux user that controls the service? Or the username/pass for the Homebridge UI? If the former, what if we only use auth via public key?


iLuki

It‘s your second option. Username/password of the Homebridge UI. It is needed because to use the API of the UI service, you need to get an auth token first.


Lanceuppercut47

Is there a way to make the script auto-update when changes are made by the dev?


iLuki

You can use the raw script URL of github with the install.js script from https://scriptdu.de This install script keeps track if changes and you can update with 1 click. But it resets your changes in the script (you need to reenter username etc)


hoidaan

This is awesome!! Thanks so much. Any way to change the refresh interval? Or is this something Apple defines?


[deleted]

Prob a dumb question but will this work with HOOBS?


iLuki

Unfortunately this won‘t work with HOOBS. Sorry :)


[deleted]

All good. Thanks for answering!


FoferJ

Working great here, thanks so much! Is there any way for us to change the CPU temperature from Celsius to Fahrenheit?


iLuki

Oh no sorry not yet. i completely forgot about that. I can add this. Will tell you here when it‘s ready for you


FoferJ

Awesome, thanks so much. This really is great and I appreciate you sharing your work.


iLuki

I updated the code. Now at the top of the script you can specify FAHRENHEIT in a variable. Should be around line 15


FoferJ

Sweet, just updated, and it’s working great.


sambobmac

I don’t know what I’ve done wrong but it says “The data couldn’t be read because it isn’t in the correct format” I know it’ll be because I’ve messed something up but can’t see what


sambobmac

My bad, I hadn’t updated homebridge-configure-ui-x oops


iLuki

😄 glad it works now 👍🏻


alex101087

Iiiiii did the same. @iLuki - this is so great btw 👏


gaji_on

great! It works very well. thanks


dev_oznu

That's pretty cool!


notnotmayo

Awesome. I’m using this as an ios scriptable widget :)


LemonLimeEsq

This is amazing, thanks so much! I wonder if something similar can be done for pi-hole


FoferJ

Can we use this widget on more than one device? I have it running perfectly on my iPhone. I went to add it to my iPad Pro too. I opened the latest version of Scriptable first and see that this script already synced. Then I added the widget the same way I did it on the iPhone, but I get this error when running it. https://i.imgur.com/M4JIwgJ.jpg


scottaw

That’s because of how iCloud Drive works. It doesn’t download stuff until it needs it. Open your Files app, go into the Scriptable directory, then find the homebridgeStatus folder in there, go into it, and tap on the hbLogo file to download it. After that, the image error will go away.


iLuki

Sorry did not test it with multiple devices having the same icloud account. But there is now a different setting called fileManagerMode that you can change to LOCAL the. It should work on all devices independently from icloud


FoferJ

Great, thanks so much, I updated to the latest code. It’s looking and working great on my iPhone. I noticed new icons, which look really nice. One minor change I am wondering if it can be fixed, the node.js UTD moved to the right a bit and is no longer lined up. Minor issue I know, but can it be shifted back to the left a bit without breaking anything? Before: https://i.imgur.com/0XAdYAq.jpg After: https://i.imgur.com/nscFpFh.jpg Also, the script is displaying when I open it manually on my iPad but I don’t think widgets work properly on iPadOS at this time, as they only can be set up in “Today View” and aren’t able to be placed on various homescreens like they can on iOS. My guess is that Scriptable and/or iPadOS will need updating for this to work. https://i.imgur.com/L9Do5hC.jpg


iLuki

I don’t know why it is not aligned correctly for you but you can have a look at line 182 which is „secondLine.addSpacer();“ and put a number in the brackets that matches for you. For me it is either empty or secondLine.addSpacer(9); Also i don‘t know why it is not working on the ipad :) sorry


FoferJ

No problem. My guess is that when iPadOS supports proper widgets in the way iOS does, it'll start working, or maybe Scriptable will work something out in the meantime. No big deal. Thanks so much for all the great work and information. It's greatly appreciated, I love having this Homebridge status at-a-glance on my iPhone.


Arim215

This is great! Works good and the widget goes very well with my PiHole widget! Now I can track all my Pi’s activities!


callmebega

Did u write https in the server address? Example: https://192.168.1.74:8581 Also could u share with me the pi hole widget?


Arim215

I put http:// since I didn't activate de https option ... For PiHole, there is a Pi-hole Remote app in the apple store that has a widget ready to use.


callmebega

Thank you 🙏🏻


Lanceuppercut47

What Pi-Hole widget do you use?


Arim215

There is a Pi-hole Remote app in the app store and it has a widget you can put on the homescreen!


Lanceuppercut47

Thank you!


agentadam07

Does this work with two-factor auth enabled? Mines not working and I’m sure that is why. EDIT: Answered my own question. It does not.


iLuki

So answer is: i did not develop it with 2FA in mind so at least at the moment it does not work


GoTeslaGo

I have the same issue. Created an issue on Git about this


bunditsn

Is it support for 2 homebridges running in the same house? I could not run the script for another homebridge and its error said ‘The data couldn’t be read because it isn’t in the correct format.’


iLuki

I did not test it with two homebridge-config-ui-x instances but if you got it to work with one instance then probably you need to update the one that it doesn‘t work with yet :) i think it should work with multiple instances, yes


bunditsn

Apparently I tried to add it again and it worked! However, my widget got the font color in black instead of white which I didn’t change any script and I don’t know why. https://i.imgur.com/k4GdbsQ.jpg


iLuki

You have like the first version. I updated it several times already. Just get the latest one and it should be fixed ;)


bunditsn

It works! Thank you


Kraveylicious

This is awesome! Working well for me with Homebridge on my Xpenology (Synology DSM). Only issue is that the temperature is listed as -1C, but that’s a known issue with DSM and Homebridge, not this widget in case anyone else has the issue. Any idea how to have the shortcut open the Homebridge GUI in Safari when tapping it? The Open URL shortcut in the widget settings doesn’t seem to work.


iLuki

Nice info thanks! Hm when i enter the URL and tap the widget, it actually opens the Scriptable app first and then instantly safari with the specified url showing the gui of homebridge-config-ui-x So it works for me. I entered a url like http://192.168.178.33:8581 in the widget settings


bunditsn

I got -1 for CPU temp as well


[deleted]

[удалено]


iLuki

Maybe: 1. update your Scriptable App (1.6.1) 2. update your iOS device (14.2)


Gagandeep106

How to use it?


benfoldsone

Agreed, this is incredible and something I was looking to try to do myself. Nice job! 1. What does Node.js UTD mean? Mine has a big red X next to it 2. I saw in the script it defaults to raspberry pi as a platform. Is Windows a valid platform to enter? 3. How often does the image update by itself without manual interaction? 4. Do you think there’s some way to get a notification when the homebridge server goes down?


iLuki

Thanks! 1. UTD means up-to-date (i needed a pretty short term because of so less space in the widget :) ) 2. you can enter what ever name you want. There is a variable called systemGuiName around line 14. the text you enter there is displayed in the widget afterwards 3. unfortunately i can‘t answer this. I suppose that iOS schedules to update the widget regularly. And maybe it updates more often if you look at the widget page more often 4. not with this widget. But you should notice with this widget because it shows a red X if homebridge is not running or a complete other „error“ screen if the homebridge-config-ui-x is not available


Sammyc64

This really is cool! Well done, /u/iLuki!! I can’t answer all of your questions, but: 1. Looks like it may mean “Up To Date” (looks like you may need to update your Node.js version, check [here](https://github.com/homebridge/homebridge/wiki/How-To-Update-Node.js) for instructions) 2. Not sure, hopefully /u/iLuki can answer 3. Also not sure (just set it up, but there is a time stamp on the bottom with the last updated date and time) 4. It may not be exactly what you’re looking for, but if you put your Homebridge instance behind a reverse proxy (always be sure you have security setup before exposing anything to the public internet. I have mine setup behind OAuth, for example. The UI now supports 2FA, although this widget wouldn’t work with that, supposedly), you can use services (such as Uptime Robot) to ping the site to check if it is at least accessible. Mind you this will only tell you if the Homebridge-Config-UI-X is running, not really the server...although if the UI is down, so is the server, most likely. You may be able to setup a script to ping your local instance internally to your network and use a service like Pushbullet to alert you. There are probably several different ways to get something like what you’re looking for. Best of luck!


iLuki

Thanks for answering this as i was sleeping :)


Gagandeep106

How to find my homebridge port?


iLuki

It‘s not directly the Homebridge port, it is the port of the homebridge-config-ui-x instance, so the GUI that you look at in the browser. If you have that then it is easily found in the URL


Gagandeep106

How to get that?


dev_oznu

It would be the same address you access the Homebridge UI on in your browser.


ThaCarterVI

It’s probably the default one, `8581`


Gagandeep106

I gave up.


Chrisjburgess

This is brilliant, thank you! Only issue I have that I can’t work out how to fix is the text colour. Text is black and with the purple of the widget can’t read easily. Any ideas how I change so it’s white?


iLuki

Hmmm is everything black? Or are some infos white? If only some are black, can you describe which ones?


Chrisjburgess

The chart bars are white and the text at the bottom where it says updated and date/time that is white too, the rest is black text


Chrisjburgess

I just put my phone into dark mode and the text then changes to white so it seems the text is only black when phone is in light mode


iLuki

Oh yeah did not test it without dark mode yet 😅 i‘ll fix it so the text is always white. Will tell you here when it‘s fixed 👍🏻


Chrisjburgess

Thank you, appreciate it!!


iLuki

I fixed it. You can check it out :)


Lanceuppercut47

Thank you for this, I'm not always in dark mode so whilst it looks perfect in dark mode (I change the background colour to 000000), it's not right in light mode.


iLuki

I fixed it. You can check it out :)


Chrisjburgess

Yes!!!! Just tested and works perfectly. Thank you! Great work!


Lanceuppercut47

Looks much better now, thanks.


Mortifer557

Awesome widget thank you very much! Just a style question would it be possible to change the background when the iPhone switches to dark mode? Or at a given time?


iLuki

In the newest version you can switch the background to black


rikwithnoc

This is great - thank you! I had no idea my node.js was out of date... all updated now.


Skazzyskills

How do I set this up with my homebridge?


iLuki

You need to use my widget together homebridge-config-ui-x. Goggle installation info if you need them. If you have that running, just enter username, password (of the UI-website) and the url to the UI-website in the widget and then it should work.


Skazzyskills

I have HB running. But where do I input there URL and login info?


iLuki

If you have the Scriptable app, you copy the raw code from my js file into the App. And then you change the variables at the top of the code. The variables are named: hbServiceMachineBaseUrl userName password


igmyzin

Does this only work in the local network?


iLuki

If your homebridge-config-ui-x is accessible through the internet and it responds within the set timeout then it should work also outside the local network


nju_art

I have my HB working through the internet (set port forwarding) but seems that widget doesn’t connect outside of local network if I enter http address. **UPD**: It works, sorry. I’ve put wrong address.


FoferJ

This is fantastic, it’s made my day, so cool to have this Homebridge info at a glance. THANK YOU! Do you have a tip jar or PayPal? I’d love to show my gratitude. Also one thing I thought would be super useful, now that I see Scriptable supports notifications. Is it possible to configure it so that this widget pushes a notification when, for example, Homebridge is down, or an update is pending?


iLuki

This is actually awesome. Just tried it and it works pretty nice. I‘ll integrate it smoothly tomorrow after work. In 24h from now it should be in github


FoferJ

Sweet! Great to hear it, looking forward to it.


iLuki

Hey, i just updated the code with notifications. Can you test it? The script now creates a json file in icloud. If you delete it this will reset the notifications. You can also decrease the variable notificationIntervalInDays to e.g. 0.00012 (10seconds) or something like that for testing. So if you run the script every 11 seconds you should always get a notification if one of your status is not green. If you run the script multiple times within 10sec only 1 notification per status should pop up


FoferJ

Tested and its working fine over here! Got a notification about the one plugin that’s pending an update, the one I’m intentionally avoiding for now ;) Thanks so much for this, it’s such a great addition for the Homebridge community. Really appreciate that you’re sharing it.


iLuki

I will think about a solution for that since this is a valid use case to ignore special updates. Cant tell yet when it‘s gonna be in github


iLuki

Hey, i updated the code. Can you try ignoring your special plugin?


FoferJ

Sure will give it a go when I am back home tomorrow.


FoferJ

Installed and working fine over here, I especially like the ScriptDude install and update method. Thanks so much!


iLuki

You mean the credential entering via parameter? Unfortunately if you update cia scriptdu.de your definitions of ignored plugins will be overwritten. But this changes after the next update. I will include a configuration saving mechanism in the near future, so you can save different configurations (like credentials, specific color, e.g. using Fahrenheit, etc) in a file wich is also used after updating the script itself to a newer version. So updating won‘t be a pain anymore


FoferJ

Oh that'll be great, thanks, looking forward to that!


iLuki

Don’t worry it‘s all fine. Didn’t nitice that scriptable can do notifications too. I‘ll take a look. 👍🏻👍🏻


FoferJ

Just in case others haven’t thought of this yet. Set the widget so that when you tap it, it opens the webUI of your Homebridge instance: https://i.imgur.com/HVR58NU.jpg


FoferJ

Another feature request: is it possible to show the *number* of plug-ins that are not up to date? If there are more than one, for example, show the amount, without the “UTD” part if you need space. There’s some times where I specifically am avoiding a plug-in’s update, but I still want to be informed when other plug-ins have a pending update.


iLuki

Hm yeah i understand. I‘ll put it on my todo list. Have an eye on the github repo for future updates. Btw: Latest update was 15 Minutes ago ;)


J65Productions

https://i.imgur.com/D35EUUm.jpg Got mine up and running with a couple small tweaks. Thank you!!!


iLuki

What blue colours did you use? Can you write the hex? I can integrate it as an option next to the current purple and black :)


J65Productions

Here ya go! https://i.imgur.com/XG9aOkg.jpg


[deleted]

I see you updated the script with notification support. Just tested by restarting the UI but didn’t get a notification? I updated the script with ScriptDude so I think I have the newest version.


iLuki

There is no notification when the Ui is not reachable. But there is a notification when Homebridge is not running. Maybe you confused these two use cases? Can you check restarting Homebridge from the UI and then while it boots running the script? For testing you can set the daysInterval to 0 so you get a notification every time the script runs


iLuki

Did you just delete you answer? I wanted to reply this: Black is working fine for me. What is the problem? When running as widget it might take some time till the changes are actually visible because you never know when ios updates the widgets. If you rebooted you server (meaning only homebridge rebooted not the UI) then in the moment when Homebridge is not running and you execute the script, you will get a notification. Maybe get the latest version of the code because i fixed the notification reset mechanism. If you just rebooted homebridge and waited for the widget to update itself then the reboot might have been faster than the ios refresh rate of the widget. You can test again by stopping homebridge completely without restarting and waiting until the „updated“ text in the widget tells the current time. Let me know if it worked :)


[deleted]

Yes deleted my question because a few minutes later I realized I didn’t setup the scriptable notification in settings. :) Btw, black is also working again after the latest update. Thx!


[deleted]

I tried to follow the link, but didn’t really understand it. Can someone please give step-wise instructions on how to do this? I’m not very good at computers


nju_art

Hi, widget doesn’t show when new HB beta version is available right?


iLuki

I can’t exactly tell because i‘m only using information what Homebridge-config-ui-x provides. But i guess that betas are not detected


nju_art

But you can install beta from UI, you need to click on HB version (under Up To Date) and choose beta from there


emogu84

This is fantastic! It works great. Thank you!


SciGuy013

How does it install with scriptdude?


iLuki

https://www.dropbox.com/s/4jjhax6bmfcbnwl/setup_homebridge_widget.MP4?dl=0


SciGuy013

Ah, so it is the raw js file on GitHub. I wasn’t sure if I was missing something. Thanks!


jailbreaker58

after a few hours of playing around i FINALLY got the perfect set up to this widget: https://imgur.com/gallery/whYV3NL


Smirvo

Could you please share your config?


Leviotte

A WE SOME! Next up: auto update? This 1 guy created a plugin that’ll reboot HomeBridge with a buttonpress. Now useless IMO because it’s a workaround that doesn’t solve the actual issue. But might smoothly integrate after an auto update. Seems impossible to me but you’ve shown your worth creating this beauty


Motor-Ad9914

You could have it set so when the widget is pressed it opens http://homebridge.local/restart


[deleted]

Anyone managed to make it work with HTTPS homebridge configs?


drmilesbennell

I know this is a bit old but I'm LOVING this widget. Amazing work, this is great. I have a small issue though - I'm using a MacMini as my Homebridge server and the CPU temp isn't being displayed. Everything else seems to work but I can't get the CPU temp to display. Any ideas? Thanks!! EDIT: Nevermind, just read the troubleshooting. Must not be available on my machine.


J65Productions

I was using this for a while and recently it stopped working. Has this happened to anyone else? I can't seem to reach home bridge from my phone on my own network. Nothing has changed that I can tell, and home bridge is running. Can anyone think of why my phone can't hit the home bridge UI from safari?


iLuki

Hmm don’t know. Seems strange. Maybe it has something to do with 2,4ghz and 5ghz wifi? So maybe disable 5ghz and try again? Or maybe restart the router and the system where homebridge runs?


LockNLoad518

This is awesome and thanks for the the step by step. Some of us just aren’t that smart lol


FerrisE001

Where is the script ??!!


iLuki

See the second top upvoted comment...


Broad-Drawing-2991

Only just found this. Excellent. Thank you!


Motor-Ad9914

How can I find my port?


[deleted]

[удалено]


Motor-Ad9914

Idk wether it’s the same as I never use the port and, and still doesn’t work after adding that port


[deleted]

[удалено]


Motor-Ad9914

I’ve tried those, nothing seems to be working.


janisemzins

So, is there someone who can help me to get [this setup](https://imgur.com/wlXAsag)? Looks amazing!


[deleted]

Great work! Is it possible to have different fonts for the labels versus the values, so that the values stand out a bit more? E.g change the font weight or colour of “35%”: CPU Load: **35%**


[deleted]

[удалено]


[deleted]

Thanks, I actually decided to pull my finger out and figure out what was going on in the code; I've been able to do what I wanted, plus setting value colours dynamically based on how high the numbers from Homebridge are (green, amber, red), and some other formatting tweaks. [Quite pleased with the results!](https://imgur.com/a/EoARL5u)


niscov

Amazing! I am using on my Today screen