HABdoid works with url but not with automatic discovery

314 views
Skip to first unread message

Herman van Horssen

unread,
Oct 26, 2013, 4:55:16 PM10/26/13
to ope...@googlegroups.com
If I enter the ip address in HABdroid everything works fine.
However with the ip address entered, the discovery service does not work.
The log of openhab shows that mDNS is started and with tcpdump I see the discovery packets arrive on the server (Debian Wheezy).

Do I need to enable something on the debian box to enable discovery?

Herman

Yannick Hein

unread,
Oct 27, 2013, 5:03:02 AM10/27/13
to ope...@googlegroups.com
Same here with server running on Windows 7. Access with URL is fine, but no automatic discovery. Firewall disabled.

Victor Belov

unread,
Oct 27, 2013, 6:55:41 AM10/27/13
to ope...@googlegroups.com
Hi,

What is the platform you are running Debian on? Network interface? Do you have avahi-daemon installed? Do you have any other services using mDNS?
The discovery will not work when openHAB URL is configured. To use discovery you need to leave openHAB URL field blank.

Best regards,
Victor Belov



--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/groups/opt_out.

Victor Belov

unread,
Oct 27, 2013, 6:56:26 AM10/27/13
to ope...@googlegroups.com
Hi,

Do you mean that discovery can't find openHAB when no openHAB URL is configured?

Best regards,
Victor Belov



--

Yannick Hein

unread,
Oct 27, 2013, 7:30:40 AM10/27/13
to ope...@googlegroups.com
Correct, when I leave both fields empty, in local WiFi, I cannot connect. Ping works fine.

Herman van Horssen

unread,
Oct 27, 2013, 12:06:41 PM10/27/13
to ope...@googlegroups.com
Victor,

I am using Debian Wheezy on an Intel processor (mother board DN2800MT with Atom N2800).
The avahi-daemon was not installed, but after installing no change.
In habroid the url are empty.

Any suggestions?

Herman

Op zaterdag 26 oktober 2013 22:55:16 UTC+2 schreef Herman van Horssen:

Victor Belov

unread,
Oct 27, 2013, 1:55:58 PM10/27/13
to ope...@googlegroups.com
Hi,

Ok. Can you please install some bonjour browser on your phone and confirm if openhab-server-ssl._tcp service is visible?

Best regards,
Victor Belov

Victor Belov

unread,
Oct 27, 2013, 1:58:07 PM10/27/13
to ope...@googlegroups.com
Hi,

Can you please install some bonjour browser on your phone and check if the _openhab-server-ssl._tcp service is visible on the network? And I assume both your atom machine and the phone are on the same subnet? :-)

Best regards,
Victor Belov


--

Yannick Hein

unread,
Oct 27, 2013, 2:00:48 PM10/27/13
to ope...@googlegroups.com
Yes, I have:
Workgroup Manager (_workstation._tcp)
World Wide Web HTML-over-HTTP (_http._tcp)
_openhab-server-ssl._tcp
_openhab-server._tcp
_plexmediaserver_lge._tcp

Victor Belov

unread,
Oct 27, 2013, 2:02:55 PM10/27/13
to ope...@googlegroups.com
Hi,

That's weird, should work… Do you have IPv6 enabled on your LAN? If so, can you disable it (even local link) and try if this works?

Best regards,
Victor Belov

Yannick Hein

unread,
Oct 27, 2013, 2:06:59 PM10/27/13
to ope...@googlegroups.com
I disabled IPv6, still not working. (I also disabled Hamachi which I saw running - nothing)

Herman van Horssen

unread,
Oct 27, 2013, 2:12:22 PM10/27/13
to ope...@googlegroups.com
For me turning of ip6 does the trick.
Still sounds like a bug?

Herman

Op zaterdag 26 oktober 2013 22:55:16 UTC+2 schreef Herman van Horssen:
If I enter the ip address in HABdroid everything works fine.

Victor Belov

unread,
Oct 27, 2013, 2:29:53 PM10/27/13
to ope...@googlegroups.com
Hi,

It does. Can you please make an issue with a detailed description of your environment and a log cat from android of habdroid startup if possible?

Best regards,
Victor Belov


--

Victor Belov

unread,
Oct 27, 2013, 2:33:09 PM10/27/13
to ope...@googlegroups.com
Hi,

Can you please look into details of how bonjour browser resolves _openhab-server-ssl._tcp ? Unfortunately I don't have any Windows at all - all my machines are either unix or macos, so I can't reproduce this in my environment :-( Are you able to produce a network capture during the habdroid startup on your windows machine?

Best regards,
Victor Belov

Herman van Horssen

unread,
Oct 27, 2013, 3:16:35 PM10/27/13
to ope...@googlegroups.com
I will create the issue.
Now I still have a problem when using discovery, no icons are displayed. When I enter a IP address everything is fine.

Best regard,
Herman

Op zondag 27 oktober 2013 19:29:53 UTC+1 schreef Victor Belov:

Yannick Hein

unread,
Oct 27, 2013, 3:17:36 PM10/27/13
to ope...@googlegroups.com
Hi, here's a packet capture from Wireshark when using the bonjour browser on my phone (phone is 10.0.1.23, OpenHAB server is 10.0.1.20). What's most important is that I don't get that query using HABDroid! btw. the request from bonjour browser (and all replies) are sent to 224.0.0.251.

I divided the data to match the following layers:
Ethernet
IP
UDP
DNS

0000  01 00 5e 00 00 fb d4 20  6d 2a f5 a3 08 00

                                                 45 00   ..^....  m*....E.
0010  00 fe 00 00 40 00 ff 11  8e dc 0a 00 01 17 e0 00   ....@... ........
0020  00 fb

            14 e9 14 e9 00 ea  92 6c
                                    
                                     00 00 00 00 00 01   ........ .l......
0030  00 05 00 00 00 01 09 5f  73 65 72 76 69 63 65 73   ......._ services
0040  07 5f 64 6e 73 2d 73 64  04 5f 75 64 70 05 6c 6f   ._dns-sd ._udp.lo
0050  63 61 6c 00 00 0c 00 01  c0 0c 00 0c 00 01 00 00   cal..... ........
0060  0e 0c 00 1c 14 5f 70 6c  65 78 6d 65 64 69 61 73   ....._pl exmedias
0070  65 72 76 65 72 5f 6c 67  65 04 5f 74 63 70 c0 23   erver_lg e._tcp.#
0080  c0 0c 00 0c 00 01 00 00  0e 0c 00 0f 0c 5f 77 6f   ........ ....._wo
0090  72 6b 73 74 61 74 69 6f  6e c0 4f c0 0c 00 0c 00   rkstatio n.O.....
00a0  01 00 00 0e 0c 00 08 05  5f 68 74 74 70 c0 4f c0   ........ _http.O.
00b0  0c 00 0c 00 01 00 00 0e  0c 00 12 0f 5f 6f 70 65   ........ ...._ope
00c0  6e 68 61 62 2d 73 65 72  76 65 72 c0 4f c0 0c 00   nhab-ser ver.O...
00d0  0c 00 01 00 00 0e 0c 00  16 13 5f 6f 70 65 6e 68   ........ .._openh
00e0  61 62 2d 73 65 72 76 65  72 2d 73 73 6c c0 4f 00   ab-serve r-ssl.O.
00f0  00 29 05 a0 00 00 11 94  00 12 00 04 00 0e 00 00   .)...... ........
0100  00 00 00 00 00 00 08 00  00 01 c7 05  


Herman van Horssen

unread,
Oct 27, 2013, 3:31:35 PM10/27/13
to ope...@googlegroups.com
Solved, error from my side with with a symbolic link

Op zondag 27 oktober 2013 20:16:35 UTC+1 schreef Herman van Horssen:

Victor Belov

unread,
Oct 28, 2013, 4:53:20 AM10/28/13
to ope...@googlegroups.com
Hi,

Then I need log cat from android.

Best regards,
Victor Belov

Yannick Hein

unread,
Oct 28, 2013, 1:09:28 PM10/28/13
to ope...@googlegroups.com
Sorry, I don't have root on my phone.

Any ideas why your bonjour request doesn't reach my network?

Herman van Horssen

unread,
Oct 28, 2013, 3:32:10 PM10/28/13
to ope...@googlegroups.com
submitted issue 499, cannot create logcat do not have root access.


Op zaterdag 26 oktober 2013 22:55:16 UTC+2 schreef Herman van Horssen:
If I enter the ip address in HABdroid everything works fine.

Victor Belov

unread,
Oct 31, 2013, 4:07:55 PM10/31/13
to ope...@googlegroups.com
Hi,

no, don't have an idea.
You don't need root to get log cat btw.

Victor Belov

unread,
Nov 1, 2013, 10:05:23 AM11/1/13
to ope...@googlegroups.com
Hi,

Can you please install and try latest snapshot build:

?

Best regards,
Victor Belov


On Mon, Oct 28, 2013 at 9:09 PM, Yannick Hein <yannic...@gmail.com> wrote:

Herman van Horssen

unread,
Nov 1, 2013, 2:44:55 PM11/1/13
to ope...@googlegroups.com
Victor,

I tried this snapshot, no change.
Habdroid works only with IP6 disabled.

Herman

Op vrijdag 1 november 2013 15:05:23 UTC+1 schreef Victor Belov:

Yannick Hein

unread,
Nov 1, 2013, 4:14:59 PM11/1/13
to ope...@googlegroups.com
Hi Victor,

I used log cat and I seem to get an exception when the autodiscovery runs:

2013-11-01 21:09:39.326 W 21480/DNSResolverTask: ServiceResolver(10-44-145-140.

local.).run() exception
java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:496)
at libcore.io.IoBridge.sendto(IoBridge.java:465)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:182)
at java.net.DatagramSocket.send(DatagramSocket.java:285)
at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1536)
at javax.jmdns.impl.tasks.resolver.DNSResolverTask.run(DNSResolverTask.java:74)
at java.util.Timer$TimerImpl.run(Timer.java:284)
Caused by: libcore.io.ErrnoException: sendto failed: ENETUNREACH (Network is unreachable)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:146)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
at libcore.io.IoBridge.sendto(IoBridge.java:463)
... 5 more


Hope this helps you.



Victor Belov

unread,
Nov 3, 2013, 12:45:45 PM11/3/13
to ope...@googlegroups.com
Hi,

It looks like somehow you didn't grant permissions needed for HABDroid to work, cause I can't see any other reason for this exception to happen. Which phone/Android version are you using?

Best regards,
Victor Belov



Victor Belov

unread,
Nov 3, 2013, 12:46:34 PM11/3/13
to ope...@googlegroups.com
P.s. log cat should be longer - there should be debugging messages of habdroid startup, so please show them to me too.


On Sat, Nov 2, 2013 at 12:14 AM, Yannick Hein <yannic...@gmail.com> wrote:

Victor Belov

unread,
Nov 3, 2013, 12:47:58 PM11/3/13
to ope...@googlegroups.com
Hi,

Ok. So then I'll make a workaround for openHAB itself to bind discovery to IPv4 only to fix this. Stay tuned.

Best regards,
Victor Belov

Reply all
Reply to author
Forward
0 new messages