# Otgw working example

**URL:** <https://discourse.nodered.org/t/otgw-working-example/74084>\
**Category:** General\
**Tags:** node-red-contrib-otgw\
**Created:** [23 January 2023 13:33 UTC](https://discourse.nodered.org/t/otgw-working-example/74084 "2023-01-23T13:33:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dick/32/61180_2.png) [@dick](https://discourse.nodered.org/u/dick)\
**Post date:** [23 January 2023 13:33 UTC](https://discourse.nodered.org/t/otgw-working-example/74084/1 "2023-01-23T13:33:12Z")

</div>

Is there anybody who can gives me an example for the open-red-otgw.  
http:// node-red/opentherm/node-red-contrib-otgw  
I tried several efforts eg  
serial  
input  
wifi  
Dick

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [23 January 2023 13:40 UTC](https://discourse.nodered.org/t/otgw-working-example/74084/2 "2023-01-23T13:40:13Z")

</div>

Hi @dick

There was an example on the Node's Read Me.  
I don't use it myself, but maybe it will help

[1stsetup/node-red-contrib-otgw: A node for node-red to connect to the OpenTherm Gateway (github.com)](https://github.com/1stsetup/node-red-contrib-otgw)

```auto
[{"id":"6ddf1fe5.fe5f1","type":"tab","label":"OpenTherm Gateway","disabled":false,"info":""},{"id":"f3d55c2b.34fd38","type":"debug","z":"6ddf1fe5.fe5f1","name":"cmd/data/events","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":832,"y":159,"wires":[]},{"id":"b042e675.4d869","type":"debug","z":"6ddf1fe5.fe5f1","name":"Gateway to Boiler","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":840,"y":200,"wires":[]},{"id":"17229d10.ac9cbb","type":"debug","z":"6ddf1fe5.fe5f1","name":"From Boiler","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":820,"y":240,"wires":[]},{"id":"18905ec7.5ae3a9","type":"debug","z":"6ddf1fe5.fe5f1","name":"From Thermostat","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":840,"y":280,"wires":[]},{"id":"6882a4f5.0dfa04","type":"debug","z":"6ddf1fe5.fe5f1","name":"Gateway to Thermostat","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":860,"y":320,"wires":[]},{"id":"fb84cace.f8719","type":"inject","z":"6ddf1fe5.fe5f1","name":"PR=A (Get About opentherm gateway)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmd","payload":"PR=A","payloadType":"str","x":250,"y":180,"wires":[["eb3eec5.bf1469"]]},{"id":"eb3eec5.bf1469","type":"otgw","z":"6ddf1fe5.fe5f1","name":"","serialdevice":"/dev/ttyUSB0","baudrate":9600,"dataBits":8,"stopBits":1,"parity":"none","rtscts":false,"xon":false,"xoff":false,"xany":false,"debug":true,"x":560,"y":260,"wires":[["f3d55c2b.34fd38"],["b042e675.4d869"],["17229d10.ac9cbb"],["18905ec7.5ae3a9"],["6882a4f5.0dfa04"]]},{"id":"addec53f.3a5fa","type":"inject","z":"6ddf1fe5.fe5f1","name":"data","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"data","x":350,"y":120,"wires":[["eb3eec5.bf1469"]]},{"id":"508597ac.a5ac5","type":"inject","z":"6ddf1fe5.fe5f1","name":"SH=72.5 (Set Heating Setpoint)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmd","payload":"SH=72.5","payloadType":"str","x":270,"y":220,"wires":[["eb3eec5.bf1469"]]},{"id":"b49d723b.99df38","type":"inject","z":"6ddf1fe5.fe5f1","name":"PS=1 (Enable Print Summary mode)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmd","payload":"PS=1","payloadType":"str","x":260,"y":360,"wires":[["eb3eec5.bf1469"]]},{"id":"cd86f477.9e932","type":"inject","z":"6ddf1fe5.fe5f1","name":"PS=0 (Disable Print Summary mode)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmd","payload":"PS=0","payloadType":"str","x":260,"y":400,"wires":[["eb3eec5.bf1469"]]},{"id":"c2115ecb.a067","type":"inject","z":"6ddf1fe5.fe5f1","name":"GW=1 (Gateway mode)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmd","payload":"GW=1","payloadType":"str","x":300,"y":280,"wires":[["eb3eec5.bf1469"]]},{"id":"b0a05fc8.a32cb8","type":"inject","z":"6ddf1fe5.fe5f1","name":"GW=0 (Monitor mode)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmd","payload":"GW=0","payloadType":"str","x":300,"y":320,"wires":[["eb3eec5.bf1469"]]}]

```

I have moved this into **General** as the category **Creating Nodes** is for developing Node RED Nodes, not using using.

---

<div class="post-metadata">

**Author:** ![dick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dick/32/61180_2.png) [@dick](https://discourse.nodered.org/u/dick)\
**Post date:** [23 January 2023 15:09 UTC](https://discourse.nodered.org/t/otgw-working-example/74084/3 "2023-01-23T15:09:38Z")

</div>

thanks for the help

I know that page and the flow but there is a sentence what i do not understand:

Specify a name an the serial device to which the OTGW is connected.  
Specify a name ??  
the flow example gives:  
otgwData/node Gateway?  
that is the problem.  
Dick

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [23 January 2023 15:32 UTC](https://discourse.nodered.org/t/otgw-working-example/74084/4 "2023-01-23T15:32:29Z")

</div>

I suggest raising an issue with the developer.

Having a look at the source code on GitHub  
its not even using your configured serial device.

its forcibly setting it to `/dev/ttyUSB0`, and I can not see any changes to that.

> <https://github.com/1stsetup/node-red-contrib-otgw/blob/646fae6d44893b3e9b23426e920e6e90eaaca8a5/otgw.js#L18>

That might be ok for one environment, but is certainly not for all, i.e: another USB serial device gets initialised first.

Furthermore The `name` property is not used for any serial setup, neither is it used in any command

It was last modified 2 years.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 March 2023 15:33 UTC](https://discourse.nodered.org/t/otgw-working-example/74084/5 "2023-03-24T15:33:25Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
