openHAB <-> ebusd

 Mai, 13 - 2014   miscSmarthome

Yes!

I finally got my desired setup working. I think this called a functional prototype now. So here’s what I got so far:

openHAB is running on my QNAP. I needed java and I decided to get the Java 8 Embedded Edition. I downloaded the ARMv5 Linux Headless Edition. Since Java 8, you need to run the jrecreate – tool in order to package a runtime. The tool gives you the option to choose between different profiles. I went for the full SE option, my command looked like this:

bin/jrecreate.sh –keep-debug-info –debug –extension locales –dest ~/dev/java-se-embedded/out/full/

Now you have a Java-8 runtime for the QNAP. openHAB runs without any issues, but I had s ome trouble getting the config right.

The challenge was the TCP connection to the ebusd – server which runs a simple telnet like ASCII protocol. After I got excellent support from the openHAB Mailinglist, I ended up running the following config:

In order to query for example for a temperature I need to send something like „get vr630 Storage1Sensor“ to the ebusd. I achieved that by defining 2 items in openHAB:

Number Heating_15_flow1_sensor "15_flow1 sensor [%.1f °C]"	<temperature> (Heating_temp_Chart)

String Heating_15_storage_sensor1_String 		"From EBUSD Temperature [%.1f °C]" { tcp=">[192.168.178.37:8888:(REGEX((.*))]" }

The String item is needed to get the result from the TCP-Connection. In order to query the ebusd and convert the result to the number-field, I created the following rule:

rule "ebusD update"
	when 
		Time cron "0/10 * * * * ?"
	then
		sendCommand(Heating_15_flow1_sensor_String, "get vr630 15_Flow1Sensor")
		postUpdate(Heating_15_flow1_sensor, new Float(Heating_15_flow1_sensor_String.state.toString().substring(0,5)))

end

et voilá. I’m not able to graph some useful values from my heating system.

ebusd-charts

I will write a separate post about the ebus-commands which I’m still figuring out….

 


Related articles