Dashboard UI suitable for tablets

I spent a few nights trying to get it working on the RPi3. Unfortunately, i hadn’t gotten it to work. I couldn’t get dashing to get passed the error I listed above despite trying to install the dependencies.

I got it working now, yhey! :smile:

In addition to chmodding the gems folder:

sudo chmod 777 -R /var/lib/gems/2.1.0

I followed the suggestion at this page. Which in short suggest to also install a server-dev package:

sudo apt-get install postgresql-server-dev-9.4

Then “bundle install” from the dashboard folder.

But I must admit that the HABPanel alternative seems a lot more straightforward and when its a bit more mature I will give it a go. And perhaps it will also be included in future Openhab releases.

This is one of my screens…
I have a ruby task checking the audio streamed to my Yamaha A1050 amp.

1 Like

Great work interfacing this UI with Openhab! This is a lot more suitable for a tablet compared to the standard OH UI.

How would I go about creating a widget containing both the temperature and the humidity? E.g. “xx.x C / yy %”. Of course then with a smaller font so that they fit in the 1x1 box.

Both the ohtemp and ohhumidity widget is available but my HTML knowledge is not enough to combine these into one widget. Some help to get me in the right direction might be enough.

Thank you for this!

There are a couple of ways of doing this. A simple way is to create a virtual item in openHAB that is formed by the combination of two other items. i.e. have a rule that triggers on the change of either item, which forms the combined item. This item can then be posted to dashing. A second option, if you are using openHAB 1.8, is to define a rule that combines the json data from the two items before posting to a suitable custom widget in dashing that supports dual items. An example of this is the Central Heating Dashboard widget update rule in the dashboard.rule file, combined with the ohheating widget.

Yes, this is definitely easier. An alternative is @igor’s Android solution, HomeHabit Dashboard - Original thread which is just an android app, and does not require anything new on the server side.

I went for your second suggestion and thanks to the ohheating widget I believe its quite easy to adapt the code for my needs. And this I can say even though I’ve never heard of json data/syntax.

My only trouble is combining the data in Openhab with the rule. Here’s my attempt:

rule "ohtemphum Dashboard widget update"
when
	Item myTemperature received update or
	Item myHumidity received update
then
	//Need to ensure that the new status string is a valid json, as otherwise when dashing gets the state property directly, it will fail
	//logInfo("Dashboard","Updating heating status Dashboard widget")
	var String status = '{"temperature" : ' + myTemperature.state.toString + ', "humidity" : ' + myHumidity.state.toString  + '}'
	postUpdate(temphum_Dashboard,status)
end

And this is the log error:

22:19:45.337 [DEBUG] [.b.m.internal.MySensorsBinding:307  ] - myHumidity = 58.2
22:19:45.370 [DEBUG] [.b.m.internal.MySensorsBinding:248  ] - internalReceiveUpdate(myHumidity,58.2) is called!
22:19:45.407 [ERROR] [o.o.c.s.ScriptExecutionThread :50   ] - Error during the execution of rule 'ohtemphum Dashboard widget update': Could not invoke method: org.openhab.model.script.actions.BusEvent.postUpdate(org.openhab.core.items.Item,org.openhab.core.types.State) on instance: null

I’ve defined “temphum_Dashboard” as the following item:

String temphum_Dashboard "T/%" (gDashboard)

Do you have any additional suggestions?
Other than this I guess adapting the suffix in the widget will be a bit tricky but I might succeed.

Thank you for your assistance this far!

Regarding Igor’s solution I’ve opted in for Beta testing and perhaps I will be invited. It looks really promising! I prefer an open source solution and I assume, at some point, there will be a price tag for the Android app. Good for him!

The error message seems to be saying that your item temphum_Dashboard has not been instantiated. Have you tried putting logInfo to see its value (and the value of the status string) before the postUpdate command?

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