OpenTherm Gateway plugin

[quote=“A.Ardon, post:146, topic:177124”]@freemann,

First I have used the OTG with the TP-link. (Ip Based)
Since I have an second bridged Vera Lite I connect it trough USB.
I just have plugged it in and had to set the serial device under " Apps → Devolp apps → Serial Port configuration"

I just had to select the OTG under ‘used by device’.

See screenshot.[/quote]

I just built an OTG with a USB interface myself, which works perfectly (via a laptop). My next step was to configure a Raspberry Pi as a dedicated WiFi-connected device for hosting the Opentherm Monitor, which would then be connected via IP to the Vera plugin. But reading this I am starting to doubt: I could apparently also control the gateway directly from my Vera. This would have to go via the USB hub I’m using (I already have a USB stick for DataMine and a USB-connected RFXtrx device), but this should not be a problem, right? Only thing is that I then have to extend the cables from my boiler to where my Vera is. This is about 5 meters away, the cables need to go via two walls but that’s not a big problem.

All in all this saves me from having another device which always needs to stay on. Or am I overlooking something here?

There is indeed no need for the Pi. The Vera plugin can monitor all the values and change the configuration settings of the OTG. The only thing it does not support is upgrading the firmware.

Did it like this, and it works like a charm! In the end I needed almost 9 meters of 4-stranded cable, so effectively 18 meters since the signal goes back and forth, but apparently this is not a problem for Opentherm.

Next step is to find the best way to show the relevant data in Imperihome. The standard thermostat module is a nice start, and Imperihome can also show child devices that the Opentherm Monitor can create, but these are only temperatures. Would it be possible to add child devices for e.g. pressure or modulation level?

Vera does not have devices for pressure (bar) and/or modulation level (%). So we’d either have to create them or ‘abuse’ the GenericSensor.

I now have a working intermediate solution using the MultiString plugin, which I can also use in Imperihome. But this type of device is not “clickable” in Imperihome, i.e. it does not show a graph (provided that the sensor is logged in Datamine). How difficcult is it to create a GenericSensor that follows the values of another device? If somebody has examples, I am more than interested. I tried to Google it, but found nothing (yet) that matches my requirements.

Hi,

The Netatmo plug in from akbooer does this; using a Generic sensor as one for pressure or humidity. You can have a look at that.

Cheers Rene

Have a look at revision 25: you can create child devices for a number of additional messages (17,18,19,77,78,79). Let me know if others need to be added as well.

Hi,

First post in this forum, I’ve had a Vera3, running UI5, for about 1.5 yrs now. I’m seeking help now for a problem I haven’t been able to resolve myself after several hours of trying.

Since nov last year I’ve had the OTG plugin running nicely using the USB interface, but after some trouble last week with my Vera3 I can’t get it to communicate to the OTG hardware anymore. The trouble started with a failed inclusion of a new Aeon Labs micro energy switch, which left my Vera in an unresponsive state. Several reboots and resets to factory defaults later, followed by restore from backup, everything seems to work again (including the new zwave device), EXCEPT the OTG plugin. I’ve tried uninstalling it (with manual deleting of the luup files from /etc/cmh-ludl), followed by reinstalling, luup reloads, reboots and browser reloads, but all to no avail. None of the OTG variables get updated. I’ve attached screenshots of all plugin tabs and my serial port config. The ‘Settings’ tab does not show the ‘Communicate using UART’ item, which I believe it did before, and which is also shown (IP instead of UART) in the screenshot in the wiki [url=http://code.mios.com/trac/mios_opentherm-gateway]http://code.mios.com/trac/mios_opentherm-gateway[/url]. Also I noticed that setting the LED A…D functions on the ‘Hardware’ tab does not persist; going to a different tab and back to ‘Hardware’ again, the LED A…D function settings are reverted. For the last install attempt I’ve used the v1.3 files from the last forum post by nlrb. The screenshots are from this last install.

The otmonitor application on my laptop is still able to communicate normally to my OTG hardware. Also another USB-serial device on my Vera3, used for the ‘dutch Smart Meter’ plugin, functions normally. Both USB-serial devices are on the same USB hub.

Another peculiar thing, which may or may not be related to the OTG plugin problem, is that when I go in UI5 to ‘Setup → Net & Wi-fi’ , the Luup ‘Reload’ button in the upper right corner changes to the red ‘SAVE’ button, even though I didn’t make any changes. I don’t recall having seen this behavior prior to the trouble of last week. Although it’s only a little bit annoying, I’m afraid it may point at an underlying problem that may cause some other trouble in the future.

Any help is greatly appreciated.

Ton

Hi,

Some progress, although I don’t understand it. After changing the ‘Net & Wi-fi’ setting from ‘automatically configure’ to ‘manually configure’ and then turning off Wifi, the OTG device is updating normally, it seems ???. (apparently the ‘Net & Wi-fi’ settings were not restored from the backup.) However I’m still unable to give commands to it. None of the free format commands (e.g. CS=60) have any effect and neither do the LED A…D function settings on the ‘Hardware’ tab.

Also the the Luup ‘Reload’ button still changes to the red ‘SAVE’ button, once I select ‘Setup → Net & Wi-fi’.

Attached is a snippet of the otg-related entries (id 105) in the LuaUPnP.log file. At time 10:42:13.201 I gave a CS=60 free format command. This should override the control setpoint from the thermostat to the boiler. However at 10:42:14.067 the thermostat issues a new control setpoint (46.97), which is acknowledged by the boiler at 10:42:14.207. Somehow the CS=60 command does not arrive at the OTG hardware. I see no error messages in the log.

Any ideas?

Ton

Is it really in gateway mode and not monitor mode? All LED functions being the same is also not normal. Try to connect the OTG to the PC with otmonitor and see what happens.

Thanks for your response, nlrb.

Otmonitor showed the operating mode was ‘unknown’. I could not even set it at either ‘monitor mode’ or ‘gateway mode’. Only after replugging the otg power cord was I able to set the operating mode. Apparently the OTG firmware (vs 4.0.1) can hang. While I was at it, I flashed the newest otg firmware (4.2.3).

Back to Vera then. First try was partially successful. Free format commands worked, but the items on the ‘Hardware’ tab were still detached from the reality as used by the firmware. A browser reload did the last part. Now the LED functions A…F reflect reality, the GPIO A…B functions are back and the ‘Operating mode’ selection works. :slight_smile:

The only thing that remains is that selecting ‘Setup → Net & Wi-fi’ turns the luup Reload button into the red SAVE button. But that is probably not related to the otg plugin anymore. I will search the forum for it.

Ton

No sure if this was discussed before, but is it normal that I cannot see the real time monitor in UI7 when I am connected & logged in via the Mios relay system (home.getvera.com)? Would be nice if this restriction was not there, as I sometimes would like to look at the monitor when I’m not at home (ok, I have a workaround using a remote desktop connection to a server at home, but this is not ideal).

P.S.
By the way, I never checked this before but I now see that also the Hardware and Setup tabs are not working from a remote connection.

Hi nlrb,

Using the latest trunk 25 version on UI7 I keep getting the ‘Can’t detect device’ error. This is because the plugin start up does not return a true value at the end. In my own plugins I also found that setting the luup.status at the end is the best way to avoid this to display.

Attached is my tweaked LUA version.

I also made minor update to the json so it shows the thermostat icon in UI7 and puts the Monitor, Eco, Hardware and Settings at the top for easy navigation.

Neither changes have a negative impact on UI5 or UI6 use. Feel free to use for trunk 26.

Runs great on UI7 nlrb. This is still one of my most critical plug ins. It keeps my house warm :slight_smile:

Cheers Rene

Hi reneboer,

Thanks a lot for the changes - looks great. I’ve committed them to the trunk. If you want I can add you as collaborator on http://apps.mios.com. Just PM me.

Hi nlrb,

Found one other minor thing for UI7. It would not show the Monitor, Hardware and Settings tabs when working remotely. Made some small changes to otgjsGetInfo and now it works on UI7. I added the timestamp too. I know it should be IE only, but does not seem to harm for other browsers.
I have not yet tried on UI5/6.

function otgjsGetInfo(device, sid, what, func) {
   var result;
   var tmstmp = new Date().getTime(); // To avoid caching issues, mainly IE.
   new Ajax.Request(command_url+"/data_request", { 
     method: 'get', 
     parameters: { 
         id: 'lr_' + what + device,
         serviceId: sid,
         timestamp: tmstmp,
         DeviceNum: device,
         output_format: 'json'
     },
     onSuccess: function (response) { 
         result = response.responseText.evalJSON();
         func(device, result);
     },
     onFailure: function (response) {
     }
   });
}

Cheers Rene

I have an iSense thermostat running a schedule and use the gateway to ‘override’ e.g. heat up via imperihome etc.

If I leave the home are on holiday I want Vera to keep the temperatuur at 16 degrees.

I check currentsetpoint via device proporties
Then have a condition to check if this is > 16
If so ; setcurrentsetpoint=16 & setmodetarget=off

However it does not seem to ‘stick’ eg the iSense keeps overriding back to the normal schedule.

The gateway is NOT in monitor mode.

Any tips?

Hi,

Not really a tip, but I have the same with a Honeywell. The standard program always takes over and I have not found a way to change that. I did look at this document [url=http://otgw.tclcode.com/firmware.html#cmdcs]Firmware for the OpenTherm Gateway and maybe it is the CS command?. There is something about message ID 100, but not sure how to send that. I did try TC and that does not stick in my case.

Let me know if you can find anything.

Cheers Rene

Fellow country man! If I change operating mode from ‘normal’ to ‘eco’ it seems to stick until next setpoint change from the thermostat. Could you check if you see the same behaviour?

Hi tyfoon,

Yep. I see the same. Still looking for a way to truly overrule the thermostat. I will ask Raymon if he knows a way.

Cheers Rene

Hi,

I have been asking around and did some more testing with my own setup and it is one of these “your mileage may vary” cases.

Officially the TC=xx.x command should set the room temp setpoint to be fixed to value xx.x that is not overwritten by your thermostat program until you send TC=0. With some luck you will see this in your thermostat display.

However, some thermostats seems to respond to TC= just as to TT= (temp temporary setting). My advice is to test the TC= command to see how it works in your case. When the temp does not stick the only option is to write a little bit of LUA to monitor the setpoint and resend the TC= (or TT=) when it is changed from the value you desire. You can even create a scene for this, or PLEG, Rules Engine or any of the other great control tools.

Success.

Cheers Rene