New binding Resol VBUS

Honestly I don’t yet know how it will behave with updates, but I do not expect, that they are just magically pulled into your installation. The need to remove and readd the things is only due to changes in the channel types. I hope this is not needen in future. The marketplace will not help here. That just simplifies the setup, as you don’t nees to handle the jar files manually.

I have just removed the jar file & installed it from the marketplace instead, now seems to be updating fine.

@ramack
Once again a big thank you for the openhab 2 update, it works perfectly in my OH 2.2 with a Resol Vbus Lan adapter connected to a Cosmo Multi 2 heating controller. This was the last missing binding to run a successfully working openhab 2 instance for me!! Great

Do you know if the RESOL VBUS binding is working with the RESOL KM2?
If it’s working for you, could you explain me your configuration? What’s your vbus bridge config? I can’t connect the binding and KM2 :frowning:
Thank you

Hello,

I myself have only a VBUS-LAN interface (as I understand the predecessor of the KM2), but I would expect, that it should work also with KM2. Normally I would hope, that after adding the binding a new thing - the VBUS-LAN bridge should be automatically found.

  • Was that the case?
  • If you have it, the only thing that you normally need to adjust is the password. - And the binding intentionally even doesn’t try the default password, because I strongly recommend to change that.
  • Do you know the IP address of your KM2? - Did you a assign a static IP (either in the KM2 web interface your your router/DHCP server)?
  • Can you do a nmap scan of that IP and at least the port 7053?
    nmap -p 7053
  • Can you telnet this port if it is open and see whether it responds with something like
Trying <KM2-IP-ADDRESS>...
Connected to <KM2-IP-ADDRESS>.
Escape character is '^]'.
+HELLO
  • You might want to add and configure the bridge thing manually, normally the IP address should be sufficient (beside the password).
  • Last but not least, what do you really see and what do you expect?

Hi @ramack,
Thank you for your quick reply. Here are some more details:
two things are created:

  1. The RESOL device, named “Resol KM2”
  2. The “Bridge VLANBus Adapter”

In the Resol device, I’ve manually configure it to use the “Bridge VLANBus Adapter”.
The IP address of the device is FIXED : 192.168.0.200

The 2 things are OFFLINE. The Device says it’s due to the adapter … Logic :') but on the “Bridge VLANBus Adapter”, there is communication error: “Server returned HTTP response code: 502 for URL: http://192.168.0.200:80/cgi-bin/get_resol_device_information

I’ve manually tested this URL, and, indeed, not a valid one. The response is :

Bad Gateway
The process did not produce any response

A full nmap command on the device:

Initiating ARP Ping Scan at 10:49
Scanning 192.168.0.200 [1 port]
Completed ARP Ping Scan at 10:49, 0.31s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 10:49
Completed Parallel DNS resolution of 1 host. at 10:49, 0.01s elapsed
Initiating SYN Stealth Scan at 10:49
Scanning 192.168.0.200 [65535 ports]
Discovered open port 8080/tcp on 192.168.0.200
Discovered open port 443/tcp on 192.168.0.200
Discovered open port 53/tcp on 192.168.0.200
Discovered open port 80/tcp on 192.168.0.200
Discovered open port 22/tcp on 192.168.0.200
Discovered open port 1883/tcp on 192.168.0.200
Discovered open port 7053/tcp on 192.168.0.200
Discovered open port 57053/tcp on 192.168.0.200
Completed SYN Stealth Scan at 10:49, 8.97s elapsed (65535 total ports)
Initiating Service scan at 10:49

Result of the NMAP -p 7053 command:

PORT STATE SERVICE
7053/tcp open unknown
MAC Address: A8:40:41:18:FB:27 (Dragino Technology, Limited)

And indeed, the TELNET command is working.

So, my guess is that the requested URL is not working on the KM2 device and that the VBUSLan Adapter is bloquing on it :wink:

Thank you for your help. Do you need additional information?
yann

Wow, that was a good set of data you provided here. I think I know what’s going on, an created a ticket for the used library. Please give us a few days to check and fix it…

Wiat and see :wink:
Thank you for your help

Hi @yphyph01,

I tested accessing the corresponding URL on my KM2 using a browser and the “resol-vbus-java” library @ramack uses in this bindings. Both requests worked mine with my KM2, so I assume it has something to do with your KM2.

“Bad Gateway” sounds like the CGI executable that should handle the request crashes without having generated the requested information…

I’m currently running a modified firmware version 1.1.1 on mine. What version does your device run on? Have you tried to restart the KM2 yet? If not and you are willing to do that, it would be helpful to create a support report before pulling the power supply. You can generate that report on the “Status” page if you have the “Expert mode” enabled under “Configuration > General”.

If the problem persists after the restart (and optionally a firmware update if you like and your device is not already on 1.1.1) we might have to dig deeper using the SSH server on the KM2 (calling the CGI manually perhaps, …)

Thanks in advance,
Daniel

Hi @dwippermann,
thank you for your reply.
“a modified firmware version …” what do you mean?
I’m running the latest version, 1.1.1 … standard one :wink:
At will look at my config, thanks for your input. I’ll let you konw if I can find something with the CGI interface.
Regards

Hi @dwippermann,
How could I connect in SSH to the KM2 module?
what are the user / pass?

Hi @yphyph01,

How could I connect in SSH to the KM2 module?
what are the user / pass?

I answered that one on the other thread and simply copy it here for reference:

log into the web interface of your KM2 and click on the “Configuration / General” link in the sidebar. The URL in your browser’s address bar should be something like http://x.x.x.x/#/config/general . Please change the “general” part to “ssh” to from a URL like http://x.x.x.x/#/config/ssh .

On the corresponding web interface page you can enable the SSH service and change the password. The username is hard-coded to “root”. The factory default for the password is printed on the sticker on the back of the KM2 and the back of its user manual.

Then use your favorite SSH client to connect to it. It basically a OpenWRT system extended with some RESOL tools and scripts.

“a modified firmware version …” what do you mean?

I took the sources that come with the KM2, added some things to it, recompiled the firmware and installed it manually on the KM2 using SSH since the update over the web interface only accepts digitally signed firmware images from RESOL.

At will look at my config, thanks for your input. I’ll let you konw if I can find something with the CGI interface.

The CGI is located under /www/cgi-bin/get_resol_device_information. It is a LUA script that reads the device info from /var/run/resol/get_resol_device_information.txt and prepends HTTP headers to make it “valid” CGI output.

Perhaps running the command manually or looking for the text file it reads yields information on why your CGI does not work.

Best regards,
Daniel

Hi @dwippermann,
Thank you for your support and answer … SSH connection is successfull :wink:
Indeed, the CGI script is simple … reading the “/var/run/resol/get_resol_device_information.txt”
and, of course, this file doesn’t exist on my KM2.
the folder /var/run/resol contains only 2 files: current_packets.vbus & openvpn.pid

Do I miss something? Any idea / suggestion?
Regards
Yann

Hi @yphyph01,

the file should have been created at boot-up during the /etc/init.d/resol-bootsetup script. Try running the command responsible for it manually:

resol-worker --bootSetup -vvvv

Perhaps it prints an error that helps us find the reason…

Best regards,
Daniel

Hi @dwippermann,

you’re right … I found the following error:

root@KM2-A8404118FB27:/# resol-worker --bootSetup -vvvv
======== ERROR ========
File: /home/vagrant/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/resol-vbusconnect-tools-1.1.1/common/rs-licenses.c:221
Func: __CheckAndParseContents
Category: App
Message: Unexpected CBOR item 4 type
[DEBUG] worker-defaults.c:692 Package = 0x6da618
[DEBUG] worker-defaults.c:753 Changes = 0
[DEBUG] worker-wifi-sta.c:98 Setting up WiFi STA
[DEBUG] worker-wifi-sta.c:145 Enabled = 0
[DEBUG] worker-wifi-sta.c:159 AutoJoin = 0
[DEBUG] worker-wifi-sta.c:171 Ssid =
[DEBUG] worker-wifi-sta.c:181 Encryption =
[DEBUG] worker-wifi-sta.c:191 Key =
[DEBUG] worker-wifi-sta.c:205 Package = 0x6db640, Section = (nil)
======== ERROR ========
File: /home/vagrant/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/resol-vbusconnect-tools-1.1.1/worker/worker-wan.c:121
Func: __SetupWan
Category: App
Message: Unable to lookup ipaddr

Strange, something the the ip adress? I’m with a fix IP adress … do you think it could be the reason?

Hi @yphyph01,

yeah, might be… The worker searches for an entry “resol.wan.ipaddr” in the UCI database. Try executing uci show resol.wan.ipaddr or uci show resol.wan to see what the entry contains.

If it says uci: Entry not found that would explain the error you see. That would be obviously a bug that has avoided QA up to now… :confused:

Best regards,
Daniel

@dwippermann
YES, that’s it !!
I’ve removed the fix IP adress, connect with DHCP and the CGI-BIN is working :smiley:
thank you for precious help an deep knowledge of the module … are you part of the development team?
Now, I’m going back to the Resol Binding config :wink:
Regards
Yann

Yes, Yes, Yes … a new thing found :+1:

Hi @yphyph01,

thanks for your patience, I’ll file a ticket for that error… Have you used the static IP for the LAN or WiFi connection?

And yes, I am part of the development team of that product… And most likely the “author” of that bug. Sorry about that :slight_smile:

Best regards,
Daniel

Hi @dwippermann,
:wink: A chance you’re part of the openhab community :slight_smile: working the week-end !!!

The static IP is for the LAN connection
Regards
Yann