Dashboard UI suitable for tablets

I have put together a quick ‘how-to’ along with my scripts - Hive Thermostat (British Gas) Tutorial

Hope this helps!

Can I get some help with setting this dashboard up? I am running into a couple of issues that I am not sure how to resolve.

  1. I am currently running Dashing and this Dashboard on an Ubuntu laptop as the server. I was able to install Ruby and Dashing successfully and am able to start the dashboard and view it locally with no issues by navigating to the local host ip port 3030. However, I am not able to view the dashboard from say a tablet or my other computers. I try to navigate to the Ubuntu’s ip port 3030 from my tablet and I get a site not found. Is there something else I need to setup so that other local pc’s or tablets can view the dashboard? Maybe a firewall issue on the Ubuntu server? I am running version 16.04.3 LTS. I am very unfamiliar with Ubuntu but if I can

  2. When I enter my Openhab Host IP and port and start dashing, it gives me an error that it is unable to connect to that IP. Is there another setting that I am missing? I have followed the setup instructions to a T on the dashboard Github page including copying the Dashboard rules to my openhab rules folder and changing the AUTH_TOKEN. I have also ensured the Openhab security is set to EXTERNAL and set the IP range for local pcs to not have to use authentication.

To be honest I successfully able to set this up a year ago without these issues. But things changed and I had to re-purpose the Ubuntu server. So this is my 2nd attempt to hopefully have a permanent solution.

Any thoughts or ideas would be much appreciated.

Chris

It has been quite a while since I last looked at this, but I am guessing that there is a setting in your Dashing that is pointing to localhost (i.e. 127.0.0.1). If so, this should most likely be changed to 0.0.0.0, or your actual ubuntu server IP.

Have you looked at the official openHAB dashboard UI, HABPanel (https://community.openhab.org/c/apps-services/habpanel)? This is far far easier to install, is easily customisable, is much more developed and is better supported. I would recommend using HABPanel if you are setting up again from scratch.

I have seen HABPanel, I just like the look and feel of this dashboard more.
I still want to give it a go as I was successful before, but I won’t be at
my head against the wall trying to make it work. Thanks for the
recommendation.

Chris

Whelp never mind on these issues, everything seems to be working!

Great!

I just stumbled across this thread. I don’t want to hijack it, but may I ask you if you consider HABPanel to be as SSE-friendly as any other dashboard out there? Thanks!

Yes, I believe so. There are actually only a few dashboards out there for openHAB, and HABPanel is the only one that is officially supported by openHAB. It works very well and is hugely customisable.

Thank you. I will take the plunge, then. I just wish SSE did not have the connection limit. Connection limit is a severe downside when I want to have multiple repurposed Androids around the house all displaying and controlling simultaneously, yet still be able to log in from the Internet. I want the displayed conditions to always be current without polling and without having to walk over to the room’s Android, whichever room I find myself in at the moment, and manually refresh the readings. This is an Arduino DIY system where the Arduino solely contains the thermostat code and talks back to Ubuntu-OpenHAB2 host via USB for [non-polled callback style] logging of furnace cycling and setting changes and other condition changes. Any SSE/widget advice would be appreciated, since I have not yet done a proof of concept and I’m not getting any forum help.

I’m not quite sure I understand what the SSE issue is that you are having. I have multiple android tablets around the house, and all seem to be updating in real-time for the most part, without polling.

WRT your arduino project, as long as it is getting the data back into openHAB, the rest should be straight forward. Anything you can capture as openHAB items, you can display in e.g. HABPanel without too much work. Once you have a basic system up, I suggest posting what you have and where you are stuck in the HABPanel forum (HABPanel - openHAB Community). I am sure that someone will be able to help there!

I was in a thread of my own discussing with Rich Koshak about this general subject, so I would be hijacking this thread to continue here. But let me say that I found mention in OH2 documentation that no SSE support is being offered in OH2: the OH2 Developer Guide page “Technical Difference to openHAB 1” states “the REST API does not support websocket access anymore - it actually completely drops “push” support and only has a simple long-polling implementation to provide a basic backward-compatibility for clients.” I understand, maybe incorrectly, that the quoted statement, by using the word “completely” is saying not only that WebSockets, but also SSE on the OH2 side is no longer supported as it was in OH1. Plz let me understand (via other thread maybe) if that changes what you’ve said above??? Thank you!!!

It’s been a while since I looked at this, but if I recall correctly it is the other way round. OH2 moved over to SSE. OH1 did not suport SSE but instead used websockets. In fact, I had to add an SSE client to dashing when I moved to OH2.

???
I got the impression that dashing was not part of the OH2 project…that it was a third party add-on. And in that case, maybe dashing interfaces to Eclipse SSE and provides the remaining SSE capability in itself. I see plenty of current SSE development going on in Eclipse, and the OH2 developer guide note I quote certainly couldn’t be saying that OH2 guts the Eclipse SSE out of the package???

I’m avoiding dashing for the time being due to not being able to load one of its dependencies in Ubuntu 15.10 (not supported by repositories any more, and to update to 16.04 would mean systemd and a lot of work for me, judging from what I went through doing so for my PineA64 and for another server).

That’s right. Dashing is a separate tool that I had used so that I could have a dashboard on my wall mounted tablets, before the official HABPanel was developed. openHAB is built on Eclipse and given that the underlying SSE engine is part of Eclipse, it is accessible to openHAB. The dashing dashboard of this thread doesn’t do anything special. It just connects to the same SSE server that is part and parcel of openHAB/Eclipse.

I’m not sure I understand what your concern is though. As I said in an earlier post, given where we are today, I would go with HABPanel and not worry too much about trying to build an environment for dashing - this was a solution for an earlier time in the evolution of openHAB!

I’m just trying make the correct investment as far as choosing the packages that will get my system to the end goal that I envision. It wasn’t until the development of HTML5 and SSE that it was possible for that to happen*. As recent as that development has been, it is very reasonable for me to wonder if OH2 has integrated it and has it fully stabilized. Prior to SSE in HTML5, never ending polling with polling interval latency were downsides of browsers maintaining currency. I want to ensure my controllers both around the house and online maintain currency without those downsides. I’ve learned that if I want to be sure about something like that I need to see unanimity, not ambiguity, about it in the documentation. There is something about OH2 documentation that is not completely squaring with me like I would be comfortable with. Don’t lose sight of that OH2 Developer Guide quote above which I understand to be saying that SSE support is only in OH1.

Basically, #1) I installed OH2 and started making Things and noticed to my disappointment a polling interval setting but no option to use SSE instead of polling. That confuses me in that I am left wondering how SSE can be specified or selected.

#2) I see widget code examples that ensure SSE with a markup code line or JS using onmessage function, an absolute requirement for SSE functionality like I want. I know without onmessage() or .onmessage in the HTML rendering, that polling will be used instead of SSE. Since I haven’t yet learned how to verify that the Things and Items that I’m configuring will NOT use polling, I am concerned. Is it that they will revert to SSE if the polling interval is set to 0? That would be one way to do it, I suppose, but I’m not finding anything explicit to that effect. The widgets that I’ve tried to configure don’t seem to allow me during configuration to see their underlying JS script or JSON or other markup language to give me confidence that they’re using onmessage, thus I’m suspicious of them.

*Except for WebSockets, but I don’t see support for that in OH2

Where did you see this? Was it with ZWave things or something else? If ZWave, then that is different polling and not related to SSE. I don’t recall seeing anything on polling in the core openHAB side of things (but I could be wrong).

I’m not sure what the technical differences page that you referred to actually means. Maybe it is talking about accepting push notifications from clients (i.e. as websockets are bi-directional) as compared to SSE, which will only send from the server to the client? Anyway, as such documentation is updated by volunteers, they may not be as comprehensive as we would ideally like. Also have you looked at Archived Projects | The Eclipse Foundation? This may shed more light.

All I can tell you is that I have 4 wall mounted dashboards around the house that do not use polling as far as I know, and show updated events as soon as they occur.

Paper UI path:
Configuration->Things->Edit->Current room temperature Thing
Configure parameters for the thing->Interval Interval, in seconds, the command will be repeatedly executed

(Note that the Thing is from the exec binding here.)

I understand that Paper UI itself is not a dynamic view, but nonetheless an interval can be configured right there. With no other explicit documentation otherwise, logic leads me to conclude as I did, that polling or SSE should also be able to be configured on the same page. I would like to encourage improving the documentation that leads a beginner to this page to mention, in the context of this interval setting, how and where SSE configuration can eventually be done.

I think the “Interval” you are seeing is not for polling but for how often to repeat that same command - see https://docs.openhab.org/addons/bindings/exec/readme.html. It is specific to the Exec binding and not something that is common to openHAB itself.

In general, you will see very different options when you edit Things, depending on the type of Thing (or binding that the Thing is part of) you are editing. As I said, I don’t recall seeing polling (i.e. in the context of SSE or similar) for such Things (again, that doesn’t mean that a binding may not introduce polling if it needs to).

I’m sorry but I’m still unsure what SSE configuration you are referring to. As I said, when I wrote the SSE client side for the Dashing dashboard, I didn’t do anything special. All it does is subscribe to the openHAB server topics necessary for the dashboard to get updates (I used only the information from that Eclipse page that I linked in the previous post). As soon one of these subscribed topics gets updated, openHAB sends it to the client. The client then refreshes the dashboard. I can of course only comment on the unofficial Dashing setup described in this thread. If you need information on how HABPanel works, then it would be better to ask in that part of the forum, as the users there are more experienced in it.

WRT the documentation improvement, this is of course open to all to edit as they come across any shortcomings in any specific area. Feel free to amend as you think appropriate and issue a pull request (GitHub - openhab/openhab-docs: This repository contains the documentation for openHAB.), which I am sure will be gratefully received!

Finally, please note that I am of course just a user of openHAB and not one of the main developers! As such, anything I have said above is just my opinion/understanding and could of course be mistaken :slight_smile:

You are absolutely right, I hadn’t thought deep enough.

I understand. Thank you for working so hard for me.

From what I’ve read about it from not installing it, I am very confident that dashing defaults to SSE or at least makes it easy to have certainty about it. I’ll investigate upgrading my Ubuntu over the winter to a supported version so I can install dashing dependencies. I’ve been hoping that I could get to SSE quicker by developing my own widget, but I’m losing hope.

I’m of the opinion that it would be very, very premature for a beginner like me to submit documentation changes, but I expect I will eventually.

You’re most welcome. I would still recommend HABPanel rather than going through all the hassle of setting up Dashing… It works ‘out of the box’. You could try it out within minutes on your existing installation (PaperUI -> Add-ons -> User Interfaces). If you don’t like it, it will take seconds to remove.

1 Like