DEVIReg Smart thermostat binding

In OpenHAB of course.

I gave it a try with an android-device. unfortunately it isn’t compatible.
Will try an emulated device today.
Thanks for the explanation of the connections!
I also don’t know about debugging on IPhone. Have never done it. I have searched for it, but to me it doesn’t seem very straight-forward. Also I don’t have a Mac.
so Yeah, for now it seems like it’s gonna be a bug. :neutral_face:

Would also be cool if you build the binding from master branch. I’ve finally merged Icon support in and added discovery for Room things. Unfortunately had to code blind-folded because i don’t have the hardware. So would be cool to try and debug it.

Thanks! I built it from the master Branch on Github.
I’m also working on emulating an android device, however there’s always something wrong. But I will get one up and running. :smiley:

On a different note. I couldn’t get to the ā€œwebportalā€ for pairing. (previously; IP:8080/devireg/)
I looked over parts of your code, and also tried /icon, /receive, /danfoss. But I always get E404.
Have you changed the address or do I have a problem with my build? :grimacing:
Thanks!

Hi! Should be ā€œhttps://IP:8080/danfoss/ā€. Just checked with the development environment, it works here.
Check that there are no exceptions thrown upon startup. May be something gets screwed up when configs are uninitialized or something, it’s hard to debug. See DanfossHandlerFactory.activate(), the servlet is created last.
And i know what can be screwed up. Make sure that no traces of old version are left over, including configs. Previously i had a problem with 2.4; old version of the .jar could persist in the cache, resulting in a fight over resources between several versions of the same binding. The directory in question is /var/lib/openhab2/cache. Stop the OpenHAB and look for *.jar there and delete any stale version of devireg.
Then replace the .jar in /usr/share/openhab2/addons and start the OH.
During the big overhaul i’ve replaced all the IDs; the old config doesn’t fit any more. Now it’s Danfoss binding, not Devireg.

I’m stuck. No Idea what the problem is.
I just cannot access the webinterface. (E 404 Not found)

How I proceeded;
First played around with the configs & cache.
After some problems i couldn’t access openhab2 anymore. (yeah, I messed up :D)
installing again, and restarting the service didn’t help.
So I removed openhab2 completely and installed it again. and also removed java and installed it again.
Now I can access the openhab2 webinterface.
added the .jar which I built from the most recent version of the files from github, to the addons folder.
freshly installed opensdg
waiting for 6 hours, still cannot access /danfoss
I tried:
http://localhost:8080/danfoss
https://localhost:8443/danfoss

/start/index works for both the https and http variants.
in /var/log/openhab2/ I couldn’t find an error.

The only further thing I could imagine to be worth a try is to use a .jar from someone with a working install. Any suggestions? Else it would be cool if someone would upload his .jar. :upside_down_face:
BTW I have the icon app now installed on an andoid device.

I also tried on an completely fresh setup debian maschine.
No success. :neutral_face:

Huh. Okay, i’ll add some trace logs and notify you. It just should work.:frowning:

Maybe my build really is the problem though.
I compared the packaged content of the .jars.


I built the new one using jar from default-jdk.
my java version:
openjdk version ā€œ11.0.7ā€ 2020-04-14
Did you build it in eclipse? Would you mind building it and uploading it / or making an experimental release on github?

Hello! Yes, i am building in Eclipse, installed according to instructions on openhab.org
Give me your email, i’ll build a version with some logging, just in case, and send it to you. We’ll verify it together.

Hi, I’m not so familiar with openHAB, but is there a way to use this solution separately in other home automation systems? As a standalone tool? Like: connect , set the temperature setings up or down and disconnect?
I use Linux platform on RPi 3+ with Domoticz.

Grzegorz.

Hello and welcome onboard!
It is possible to use another HA software (or build your own solution) around the opensdg library. The library itself is written in C and client-agnostic.

For all: i did not vanish, just busy with other things and construction of my next room :slight_smile:

Hi Pavel,

I just found your project and library. Kudos!!! :+1:
I’m wondering if you finished rewriting OpenSDG into pure JAVA (without extra C dependencies)?
I’m considering buying DeviReg Smart for my house and I’d like to use them with Python, so if I’ll have a pure JAVA version I think I’ll be able to port it to Python.

Again, awesome work!!!

Also wanted to thank you for superb work. I have quite many Devismart wifi thermostats for electric floor heating and was really eager to get them working with Openhab. And they work well!

A question though, is there some kind of polling interval of the temperature values and could it be changed somehow? Just noticed that room temperature values don’t get updated as often as through the Devi official Android app. I was also thinking whether it could be possible to indicate if the heating’s on in the future.

Hi! Haven’t even started. Have other things to do.
However i agree i need something in order to upstream the binding finally. I am not developing it further because there are no wishes or bug reports; and it does everything i need.

In fact there’s no polling interval at all. The thermostat sends an update itself once any value changes. If you experience lags, check if your connection is stable. Make sure there’s no ā€œthermostat went offlineā€ or something in logs.

Already done in master. Need time to update the documentation and publlish the next release.

Thanks for the reply.
You are right, if things are working there is no need to change them :slight_smile:
However, a pure java implementation would allow you to submit this as an official binding and would help me in rewriting this into Python, but if finally have those thermostats I’ll start even with C code.

Again, thanks for awesome work!

Thanks for the reply. I was just wondering if there’s a polling as the app shows temp changes far more often than Openhab does. But maybe it’s something else then.

I’m really glad to hear that you have an update already in place for enabling the operating state! :slight_smile:

By the way, fun fact: energy consumption monitoring, provided by the app, is fake :). I. e. it just takes operating time (this one is real) and multiplies it by wattage you specify in the app. The binding doesn’t reproduce this behavior and just directly makes state available instead, so that you could do your own accounting / graphing / whatever of any kind.

I know. No time. But thanks for kicking me. :slight_smile:I actually want to upstream it, and i agree that managing native code with dependencies is a pain. And i really don’t want to make a static linkage of the whole thing, it’s a pain on Linux because you would need to build everything from source.

Or you can make a python binding for the existing C library. AFAIK pip is quite good at managing native code dependencies.