Dashboard UI suitable for tablets

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

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.