OTG with own application

Forum about Opentherm, Hvac, House heating, Boilers

Moderator: hvxl

OTG with own application

Postby Jeroen001 » Mon Nov 09, 2015 9:54 am

I use the OTG with the OT Monitor program running on a Raspberry.

Is it possible to get the current values (e.g. room temperature) and to send commands (e.g. room temparature up 1 degree) by (http) commands from an other application?
Does the OTG support an API?

Regards, Jeroen.
Jeroen001
Starting Member
Starting Member
 
Posts: 11
Joined: November 2014

Re: OTG with own application

Postby mike7 » Mon Nov 09, 2015 4:19 pm

Check http://<your gw ip>:8080/userpages.html
mike7
Member
Member
 
Posts: 69
Joined: December 2013

Re: OTG with own application

Postby ThinkPad » Mon Nov 09, 2015 8:26 pm

mike7 wrote:Check http://<your gw ip>:8080/userpages.html

That's cool! The command function is really great! I can now easily override the setpoint of my thermostat with a simple HTTP-request.

But..... what about the 'PS=1' command? That doesn't show any output in the browser, just the PS=1 command is shown. Would be great if the output of the PS=1 command would also return output in the browser. Retrieving the OTGW-data is much easier then, for example with a PHP-script running on a webserver on a different machine.
User avatar
ThinkPad
Member
Member
 
Posts: 75
Joined: November 2014

Re: OTG with own application

Postby mike7 » Mon Nov 09, 2015 9:36 pm

I don't use PS=1

Schelte provides support fot OTGW and monitor in another forum http://www.domoticaforum.eu/viewforum.php?f=75
mike7
Member
Member
 
Posts: 69
Joined: December 2013

Re: OTG with own application

Postby ThinkPad » Mon Nov 09, 2015 9:42 pm

I have opened an own topic about the PS=1 webpage output: viewtopic.php?f=75&t=10862
User avatar
ThinkPad
Member
Member
 
Posts: 75
Joined: November 2014

Re: OTG with own application

Postby Jeroen001 » Fri Nov 20, 2015 1:13 pm

Great. Thanks for the info.
Jeroen001
Starting Member
Starting Member
 
Posts: 11
Joined: November 2014

Re: OTG with own application

Postby Jeroen001 » Fri Nov 20, 2015 10:09 pm

Ok. I get the JSON information from OTG with the following LUA code:

local IP = "xxx.xxx.xxx.xx"
local Port = "8080"

OpenTherm = Net.FHttp(IP,Port)
response = OpenTherm:GET("/json")
fibaro:debug(response)

The response is: { "otgw": { "time": "2015-11-20 22:06:18 +0100", "firmware": { "name": "Opentherm Gateway", "version": "4.2.3" }, "software": { "name": "Opentherm Monitor", "version": "4.2" } }, "flame": { "value": "0", "description": "Flame status" }, "dhwmode": { "value": "0", "description": "Domestic hot water mode" }, "chmode": { "value": "1", "description": "Central heating mode" }, "dhwenable": { "value": "1", "description": "Domestic hot water enable" }, "diag": { "value": "0", "description": "Diagnostic indication" }, "fault": { "value": "0", "description": "Fault indication" }, "temperature": { "value": "20.38", "description": "Room temperature" }, "setpoint": { "value": "20.50", "description": "Room setpoint" }, "modulation": { "value": "0.00", "description": "Relative modulation level" }, "boilertemp": { "value": "62.59", "description": "Boiler water temperature" }, "controlsp": { "value": "36.40", "description": "Control setpoint" }, "maxmod": { "value": "100.00", "description": "Max relative modulation level" } }

How do I get the current room temperature value in a variable (20.38 degrees)?

I tried the following code:

jsonTable = json.decode(response)
kamerTemp = jsonTable.temperature
fibaro:debug(kamerTemp)

Then I get an error: [ERROR] 22:08:04: line :debug (arg 2), expected 'string const &' got 'nil'
Jeroen001
Starting Member
Starting Member
 
Posts: 11
Joined: November 2014


Return to Hvac, Heating Opentherm Forum

Who is online

Users browsing this forum: No registered users and 1 guest