Cannot access openHAB server via Android App or Browser

I’ve recently stumbled upon openHAB after looking for a free home automation solution that doesn’t require an internet connection, and I’m really interested in using this to automate my house. I’ve ordered a smart switch and a zwave usb adapter, but those won’t be here for a few days. I’ve downloaded openHAB 1.8 anyway onto my chromebook running crouton just to see what I can already get going.

I have a simple setup that just shows the temperature min, max, and current of home and work, and the sunrise and sunset. I’m trying to access the server via the android app, but I’m having no luck. I’ve disabled the demo mode and put in the IP address of my Chromebook with the correct port (http://<chromebook-ip>:8080), but I cannot seem to get the app on my phone to connect even though they’re on the same wireless network. Can anyone help me know what I’m missing?

Does the Chromebook or the chroot environment have port 8080 blocked?

Do the logs indicate any sort of errors?

Logs don’t indicate any errors. I suppose it is possible that the chromebook is blocking on that port. I’m new enough to linux that I’m not sure how to approach that, though. What can I do to verify that the port isn’t the problem, or if it is, how to rectify the problem?

Here is the log file from startup to shutdown:

Launching the openHAB runtime...
osgi> 2016-01-11 14:44:48.697 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.0).
2016-01-11 14:44:51.089 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-01-11 14:44:51.224 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-01-11 14:44:55.225 [INFO ] [] - Started REST API at /rest
2016-01-11 14:45:00.430 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
2016-01-11 14:45:00.696 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.items'
2016-01-11 14:45:01.782 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/
2016-01-11 14:45:06.216 [INFO ] [o.o.b.w.i.common.WeatherConfig] - LocationConfig[providerName=YAHOO,language=en,updateInterval=10,latitude=<lat>,longitude=<long>,locationId=slc,name=<null>]
2016-01-11 14:45:06.220 [INFO ] [o.o.b.w.i.common.WeatherConfig] - LocationConfig[providerName=YAHOO,language=en,updateInterval=10,latitude=<lat>,longitude=<long>,locationId=home,name=<null>]
2016-01-11 14:45:06.221 [INFO ] [o.o.b.w.i.common.WeatherConfig] - LocationConfig[providerName=YAHOO,language=en,updateInterval=10,latitude=<lat>,longitude=<long>,locationId=orem,name=<null>]
2016-01-11 14:45:06.253 [INFO ] [.b.a.internal.bus.AstroBinding] - AstroConfig[latitude=<home_lat>,longitude=<home_long>,interval=300,systemTimezone=America/Denver (MST -0700),daylightSavings=false]
2016-01-11 14:45:09.257 [INFO ] [.o.b.w.i.s.WeatherJobScheduler] - Starting and scheduling weatherJob-loc1 with interval of 10 minutes
2016-01-11 14:45:09.258 [INFO ] [.o.b.w.i.s.WeatherJobScheduler] - Starting and scheduling weatherJob-loc2 with interval of 10 minutes
2016-01-11 14:45:09.258 [INFO ] [.o.b.w.i.s.WeatherJobScheduler] - Starting and scheduling weatherJob-loc3 with interval of 10 minutes
2016-01-11 14:45:09.282 [INFO ] [.b.a.internal.job.JobScheduler] - Scheduled a daily job at midnight for astro calculation
2016-01-11 14:45:09.810 [INFO ] [runtime.busevents             ] - weatherTempLoc3 state updated to 26.60
2016-01-11 14:45:09.813 [INFO ] [runtime.busevents             ] - weatherLowLoc1 state updated to 17.60
2016-01-11 14:45:09.813 [INFO ] [runtime.busevents             ] - weatherHighLoc1 state updated to 32.00
2016-01-11 14:45:09.816 [INFO ] [runtime.busevents             ] - weatherTempLoc1 state updated to 32.00
2016-01-11 14:45:09.820 [INFO ] [runtime.busevents             ] - weatherHighLoc3 state updated to 32.00
2016-01-11 14:45:09.821 [INFO ] [runtime.busevents             ] - weatherLowLoc3 state updated to 15.80
2016-01-11 14:45:09.885 [INFO ] [runtime.busevents             ] - Sunset_Time state updated to 2016-01-11T17:21:00
2016-01-11 14:45:09.895 [INFO ] [runtime.busevents             ] - Sunrise_Time state updated to 2016-01-11T07:52:00
2016-01-11 14:45:10.083 [INFO ] [runtime.busevents             ] - weatherTempLoc2 state updated to 26.60
2016-01-11 14:45:10.085 [INFO ] [runtime.busevents             ] - weatherHighLoc2 state updated to 28.40
2016-01-11 14:45:10.085 [INFO ] [runtime.busevents             ] - weatherLowLoc2 state updated to 15.80
2016-01-11 14:47:45.757 [INFO ] [] - Stopped REST API

I don’t know Chromebooks or crouton so that is an added bit of complexity. But on a regular Linux I’d run sudo iptables -L which will print out your firewall rules. Then I’d spend some time with Google trying to interpret what they mean. :wink:

1 Like

Bam. thanks a ton, rikoshak, I didn’t even have iptables on here, so I apt-get installed them, ran it, and the policies were all set to DROP. Once l updated them to ACCEPT, I was able to connect. Appreciate the help.

That makes sense on a Chrombook. Google deliberately locked down as much as possible in the interest of security. In their plans for Chromebooks you should be running local software at all, let alone servers.

Glad it works and was that easy to fix. Hopefully you won’t run into trouble connecting to the serial device when you zwave dongle comes.

I’m hoping to use the Chromebook temporarily to see what I can really do with openHAB, and I have plans to snag a Raspberry pi 2 and then run everything with that. Just using this for now because I already have it, and spent ~$85 already on the dongle and the switch, and I don’t have another $75 or so for the pi and sdcard.