I need some help. In short, my widgets are not updating.
When I click on an OHswitch, for example, everything works fine. But when I turn the actual light on (or if I turn on/off the light from the openhab app itself) the dashing widget will not update unless I reload the page. The weird part is, my time and weather widgets are working fine.
There are no error messages in the log file, it says that the changes are posted, but they only show up in the browser then I reload the page.
What i’ve tried so far:
deleting and reinstalling the openhab-dashboard
deleting and reinstalling dashing
changing the whole setup so that only one openhab item is sent to dashing (a random demo button)
setting up a new dashing dashboard and sending it curl requests just to make sure dashing was working…it is
tried from chrome, safari, firefox and the browser on my raspberry pi
I´m also using and adapting this nice dashboard for my purposes.
I extended the OHtext widget by mappings. For example:
`
`
In the above example, the mode piped to dashing is a numeric value between 0 and 3. Based on the attribute data-map="..", the widget shows the according text.
However, an error is raised if no mapping was found and the dashboard will not work anymore.
@Jonathan_Dunn1: I ditched my OpenHAB-dashboard project, but I remember having to set it to ‘subscribe’ to a group of which the items must be members, if their states are to be ‘pushed’ to the dashboard. The OpenHAB rule that is supplied with the project must correspond with that group.
…you didn’t explicitly mention replacing/reinstalling the rule…
Hey thanks for the reply! Why did you ditch the project? its so awesome!
I’ll try replacing the rule, but I thought that if I just put the items in gDashboard group, the rule will push them to dashing. Also, I dont think the problem is on the openhab side. Dashing records that the changes, they just dont show up on the board until i reload the browser.
Try enabling the logInfo in the openhab rule for dashing, and make sure that the rule is being triggered each time that an event occurs in openHAB. This is where the state updates are pushed from openHAB to dashing.
now you can calculate the dimensions you need to fill your 1920 x 1080 screen and change the values.
in my example its 5px margin on all sides of a widget… adding that to the dimensions (145px wide and 157px high) a widget is 155px x 167px effectively. that multiplied by 7 columns and in my case 4 rows --> 1085px x 680px
Thanks for all of your help. My auth_token wasn’t the same between the openhab rule and the config.ru file. Now I don’t get the 401, but its still not updating on the dashboard unless I refresh the browser. This is what I get now
openhab log 2016-01-13 14:52:12.873 [INFO ] [openhab.model.script.Dashboard] - URI: http://localhost:3030/widgets/SandraHome; JSON = {“auth_token” : “103082”, “state” : “ON”}
2016-01-13 14:52:13.087 [DEBUG] [g.openhab.io.net.http.HttpUtil] - About to execute 'http://localhost:3030/widgets/SandraHome’
2016-01-13 14:52:15.731 [DEBUG] [.myopenhab.internal.MyOHClient] - on(): request
2016-01-13 14:52:15.735 [DEBUG] [.myopenhab.internal.MyOHClient] - Got request 19005
2016-01-13 14:52:15.737 [DEBUG] [.myopenhab.internal.MyOHClient] - {“x-atmosphere-framework”:“1.0”,“accept-language”:“en-us”,“x-atmosphere-tracking-id”:“0”,“host”:“my.openhab.org:443”,“accept-encoding”:“gzip, deflate”,“user-agent”:“openhab-cloud/0.0.1”,“accept”:“application/xml”}
2016-01-13 14:52:15.738 [DEBUG] [.myopenhab.internal.MyOHClient] - Request method is GET
2016-01-13 14:52:15.739 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header x-atmosphere-framework = 1.0
2016-01-13 14:52:15.740 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header accept-language = en-us
2016-01-13 14:52:15.741 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header x-atmosphere-tracking-id = 0
2016-01-13 14:52:15.742 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header host = my.openhab.org:443
2016-01-13 14:52:15.743 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header accept-encoding = gzip, deflate
2016-01-13 14:52:15.744 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header user-agent = openhab-cloud/0.0.1
2016-01-13 14:52:15.745 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty set header accept = application/xml
2016-01-13 14:52:15.750 [DEBUG] [.io.net.http.SecureHttpContext] - security is disabled - processing aborted!
2016-01-13 14:52:15.751 [DEBUG] [.myopenhab.internal.MyOHClient] - Transport.EVENT_REQUEST_HEADERS
2016-01-13 14:52:15.762 [DEBUG] [.r.i.resources.SitemapResource] - Received HTTP GET request at ‘sitemaps/home/home’ for media type ‘null’.
2016-01-13 14:52:15.764 [DEBUG] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item null for widget org.openhab.model.sitemap.Frame
2016-01-13 14:52:15.769 [DEBUG] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item null for widget org.openhab.model.sitemap.Frame
2016-01-13 14:52:15.775 [DEBUG] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item null for widget org.openhab.model.sitemap.Frame
2016-01-13 14:52:15.778 [DEBUG] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item null for widget org.openhab.model.sitemap.Frame
2016-01-13 14:52:15.783 [DEBUG] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item null for widget org.openhab.model.sitemap.Frame
2016-01-13 14:52:15.975 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Date = Wed, 13 Jan 2016 19:52:15 GMT
2016-01-13 14:52:15.977 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header X-Atmosphere-first-request = true
2016-01-13 14:52:15.978 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header X-Atmosphere-tracking-id = 220b745d-24f8-4c99-b6d3-301152714240
2016-01-13 14:52:15.979 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Expires = -1
2016-01-13 14:52:15.979 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Cache-Control = no-store, no-cache, must-revalidate
2016-01-13 14:52:15.980 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Pragma = no-cache
2016-01-13 14:52:15.981 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Content-Type = application/xml
2016-01-13 14:52:15.982 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header X-Atmosphere-Timeout = 300
2016-01-13 14:52:15.984 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Content-Length = 4576
2016-01-13 14:52:15.985 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received header Server = Jetty(8.1.3.v20120522)
2016-01-13 14:52:15.986 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty finished receiving response header
2016-01-13 14:52:15.988 [DEBUG] [.myopenhab.internal.MyOHClient] - Sent headers to request 19005
2016-01-13 14:52:15.989 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty received response content of size 4576
2016-01-13 14:52:15.990 [DEBUG] [.myopenhab.internal.MyOHClient] - Sent content to request 19005
2016-01-13 14:52:15.991 [DEBUG] [.myopenhab.internal.MyOHClient] - Jetty request complete 19005 with status 200
2016-01-13 14:52:15.993 [DEBUG] [.myopenhab.internal.MyOHClient] - Finished responding to request 19005
i noticed, that you put the sunrise and sunset time into the clock widget.
Would you please be so kind to tell me how to do that? I was playing arround with the clock widget to do so, but didn’t get it to work.
Just love this dashboard. I have 3 cheap KOBO 7HD tablets ($50 a piece) wall mounted.
I wanted to do something regarding always plugged in so I came up with the following and it works great. I already use MQTT on my linux server for inbound/outbound arduino messages.
Using Tasker, I downloaded the MQTT plugin for it, set it up to send MQTT the battery level every 2 minutes.
Then in OpenHab I set an item for the battery level, and an item for the charger (a Zwave plugin dimmer in fact).
Set up a rule to read the battery level and turn off the charger if charge > 98 and turn it on if < 10. This way the charger isn’t on all the time causing battery issues later on.
Was also thinking about sending the %TEMP from the tablet, which would give me local temp from where the tablet is but these cheap tablets don’t seem to have that ability.
I want to combine/build the dashboard itself out a bit too. I have it set up pretty basic but there is so much you can do with it.
@Jonathan_Dunn1 The logs seem to show that the rule is posting the message as expected. If as you said in an earlier post, posting updates to dashing using curl work fine, then I’m not sure what else to suggest. May be try again using curl but this time posting exactly what the log is showing as its json and url (using copy/paste to ensure that everything is kept exactly the same), i.e: post to http://localhost:3030/widgets/SandraHome the json payload {"auth_token" : "103082", "state" : "ON"}
OK so I followed your advice, and something very strange happened. I curled a command to a switch (lets say AwayMode) and it immediately showed up on the dashboard. But then after that, that widget started working (even when I changed it within openhab). What I ended up doing was using curl for every widget and my dashboard works now! I have no idea why this is the case though. Any ideas?
It sounds as if your sendHttpPostRequest action is failing. As far as I am aware, this should be a pre-defined action built in to the runtime and so should not require anything special. Maybe try creating a test rule with just a static sendHttpPostRequest post (again, maybe copied and pasted from your previous post) and try triggering that rule (e.g. via a test switch). Put logging in before and after calling the post command. Also you can try running openHAB in debug mode and see if there is anything related to the http post action showing up.