Dashboard UI suitable for tablets

Hey Smar, could you shoot me an email? I was going to send you a PM here with a couple dashing-related questions and a few questions regarding potentially paying you to create a Dashing.io dashboard for an openhab installation. Nothing crazy though. However it seems this community doesn’t have a PM function. My email is internetjoelol@gmail.com - Thanks for all your work here! EDIT: after posting this I was changed to “basic user” and unlocked messaging capabilities so nevermind!

Hi @fohdeesha

It will be better if you post your queries here, it may not only help others but you may get faster response from other forum members. WRT paid work, sorry but I am not available for that. However, if you post here, we can try to help you get started.

1 Like

Finally got a moment to get going on this - quick question. The original Dashing.io was abandoned, but there is an up to date fork being maintained here - https://github.com/Dashing-io/dashing

Does following the install instructions in your guide (well, the dashing site it references to follow), install this new fork, or the old abandoned codebase? eg “gem install dashing” installs which one?

I ask because even just setting up a test dashboard before even looking at openhab or your custom repo, I’ve found some pretty odd things. The one that sticks out is widgets/iframe/iframe.coffee is basically empty, it doesn’t have any of the lines it’s supposed to, so I couldn’t get the iframe widget to work for the life of me, I had to replace the iframe widget files with the ones from here to work - https://gist.github.com/hussfelt/a6fe71ebd7cce327df29

iframe.coffee was so empty (it even still had the instructions on how to write a coffee file still in it like it had never been touched) that I worry about the default “gem install dashing” install

I had a look in your repo however and “widgets/iframe/iframe.coffee” contains the correct code, so it seems your repo came from an install that wasn’t installed via “gem install dashing”? Or maybe it was but this is a new bug?

Thanks for all the help! Just want to be sure I’m set up 100% correctly and with the latest working code before I start inevitably editing and breaking it to pieces for hours for my openhab install :stuck_out_tongue:

@fohdeesha I am aware of the fork but haven’t really looked into it as I have not had to do an install in some time. At a guess, I would think that gem install will install the original version, as this is still available for install.

With regards to the custom changes such as iframe, I recall that I had to play around with this when I first set up. However, from your perspective, all you have to do is go ahead with installing dashing and then follow the instructions/download files from my repo. This will give you the necessary files to get up and running. The key step is to ensure that your initial dashing install completes correctly. Different users have had different challenges in getting dashing installed, depending on the platform they are installing on. A couple of important ones that I recall is to ensure that you have the headers for postgres and libsqlite3 installed (postgresql-server-dev-all and libsqlite3-dev).

Hi,
I have a value that when is retirved from openhab is a float with lots of decimal:

How can I rount it to 1 decimal? Wich part of .coffee file i need to edit and how?

Thanks

Not only perhaps, it is now an official part (currently only as experimental feature, but it probably won’t take long before it matures to a standard option).

Have a look at the ohheating widget coffee file. You’ll see a line with .toFixed(1). This should get you 1 decimal place.

I finally had the time to sit down and get dashing running with openhab and it’s “working” so far. I have an extremely simple dashboard for now with a couple light switches and a temperature display.

However I have a big proiblem - dashing doesn’t update the display. For instance when the temp changes, or I toggle a switch outside of dashing - the new states aren’t reflected in dashing.

If I manually refresh the dashing page with my browser, it shows all the new updated states correctly, so it’s not having a problem getting the data. It’s just not doing it automatically.

It’s almost like the openhab rule isn’t properly sending updates to dashing on item changes? Item changes are displayed live no problem in the openhab UI, it’s just dashing that’s not updating without a manual refresh.

I’m on openhab 1.8 using the rule file you provided.

Also, maybe related, this is the output I get when starting dashing (from your repo), are these important or potentially the cause? http://pastebin.com/70U6difP

Thanks again! Really looking forward to getting this working :slight_smile:

Is the rule file triggering (use logInfo in the rule file to see if the rules are being triggered)? Also have you put all the items you want to post to the dashboard in a group called gDashboard?

I’m an idiot - I added all my items to the dashboard group but never actually created the group in the items file with the simple “Group gDashboard” line.

Working great now!

1 Like

Glad to hear that you’ve got it working.

I want to use ohmeter.widget since it looked nice on the page with half circle, but when I added it on my own site I get only this version of ohmeter.

Is there anything I forgot to add when i installed this https://github.com/smar000/openhab-dashboard

Not sure where that ohmeter you’re seeing is coming from! Did you get any errors during the install? Maybe try putting in some test changes into the ohmeter html code and see if they show up. If so, then the the widget part is ok. If not, you are not picking up the correct widget.

I’ll try to add some test data directly in the html.
I did some clean up in the folders the it start working :s anyway much better
so now I can make proper changes to it to fit my project.

@smar Hi there mate!
What version of Android are you running on your tablets?

Hi @AV_HomeAuto

I’m running Cyanogenmod 12.1 and 13 on my tablet/dashboard controllers.

I’m using the BigImage widget to add some PNG-images to the dashboard. Some of them are server side generated in Grafana. The dashboard is diplayed on a wall mounted iPad (in kiosk mode with the Frameless app) and is manually switched on when needed, i.e. it is mostly in “sleep mode”.

Currently, one has to manually reload the whole page to refresh the images. From the big_image.coffee file, I understand that it should be possible to reload the image with a scheduled job i Dashing:

You can update the image via a background job or API key.

If anyone would be able to help me out in creating such a job, it would be very much appreciated!

I’ve just sorted this problem btw. You need to edit the oh2dashing.rb file to put in the address of Openhab and Dashing.

I’m running dashing smar000 solution for OpenHAB2. https://github.com/smar000/openhab-dashboard

Using the SSE client provided oh2dashing.rb with is fantastic. Managed to setup some widgets and learning day by day by reading all from you here.

I have a Sonos controller in-house and now I’m up to adding widgets for radiostations and also getting the openHAB2 item “Player” to work. So I edited the Ohswitch widget and changed ON to Play and OFF to Pause, this works great! It does the sendCommand to my “Player” item which is:

Player Controller (controllerGroup) {channel="sonos:CONNECTAMP:MY_UDN_ID:control"}

I then edited the widget Ohswitch again (know its a bit ugly) to make widget do sendCommand “my radio name” and this works great to, I will later on try to code it a bit better instead of hard-code every station name.

My problem is that every 4-5 time I try to change radiostation, even from the native Sonos controller application the status of my Player “switch” does not update and so presents the Sonos as paused. I watch the “ring” on my switch become “off” when my Sonos controller buffers the new station and then sometimes it relights to green but often don’t. I can’t figure out from tail of OpenHAB any differences taking place when it does work in comparison to when is does not work. Maybe the millisec between itemstatechanged ?

This is what tail of openhab tells me:

2016-11-10 13:29:46.374 [ItemCommandEvent          ] - Item 'Radio' received command P2
2016-11-10 13:29:46.405 [ItemStateChangedEvent     ] - sonos_CONNECTAMP_currenttitle changed from Rendezvous med Kristjan Saag to 
2016-11-10 13:29:46.442 [ItemStateChangedEvent     ] - sonos_CONNECTAMP_control changed from PLAY to PAUSE
2016-11-10 13:29:46.448 [ItemStateChangedEvent     ] - Controller changed from PLAY to PAUSE
2016-11-10 13:29:46.815 [ItemStateChangedEvent     ] -  sonos_CONNECTAMP_control changed from PAUSE to PLAY
2016-11-10 13:29:46.827 [ItemStateChangedEvent     ] - Controller changed from PAUSE to PLAY
2016-11-10 13:29:47.619 [ItemStateChangedEvent     ] -  sonos_CONNECTAMP_currenttitle changed from  to Rendezvous med Kristjan Saag

My feeling right now is that dashing (coffescript?) does not recognize a fast change, in this case a half second.

I don’t have a Sonos so can’t really help. However, you could look in your browser’s console to see if there are any errors there?