hvxl / otmonitor

Monitor tool for the OTGW (http://otgw.tclcode.com/)
GNU Lesser General Public License v3.0
26 stars 10 forks source link

Getting the "RoomRemoteOverrideFunction" MsgID:100 in iphone.html.tmpl #19

Closed ajongen closed 1 year ago

ajongen commented 2 years ago

Hi All,

Last weekend I received the OTGW from Nodoshop and have it running with a Chronotherm IV Thermostat and Intergas HR 36/30 stable since then (firmware version 0.9.2+e9c35e9 (08-01-2022)). What a great project!

I use otmonitor (version 5.2) in daemon mode on my RPI Zero that also has a PiVPN-server running. One of my goals was to be able to adjust the thermostat temperature via my phone and get the necessary information. For that I started with the iphone.html.tmpl file (what a briljant feature to be able to adjust individual files and put them in a html folder where they are automatically used by otmonitor executable) and made some adjustments:

  1. The roomtemperature was not shown correct in the original html-page. It looked for "temperature" that was not known. I copied the code that fetches the outside temperature and have it fetch the roomtemperature using "gui(roomtemp)"
  2. I added three buttons to switch to Temperary Temperature (TT=req_setpoint) , Constant Temperature (TC=req_setpoint) or start the Program (TT=0).
  3. I added an image button in the upperleft to refresh the page in case connection was lost (also changed the icon from the lost connection).

All works fine and looks like this:

image

One last improvement would be to also have an indication what the current setting for "RoomRemoteOverrideFunction" is. With this I mean an indication if the Chronotherm IV Thermostat is currently running in Temporary Temp - mode, Constant Temp-mode or Program-mode. I already put 2 indicators (leds) in the bottom row in preparation but I have not been able to get the value for MsgID=100 into the iphone.html.tmpl. I have searched if I could get it using a simular call as I used for outside and inside temp (=gui(roomtemp)) but could not find an appropriate call-id in any of the files (assumed gui.tcl would be the place to search).

I have attached the iphone.html code for completeness.

Any suggestions?

Thanks in advance!

Cheers, Armand

iphone.html.tmpl.txt

hvxl commented 2 years ago

Thank you for pointing out the bug regarding temperature versus roomtemp. Beware that the change you made in iphone.html.tmpl will not update the room temperature over the websocket. To achieve that, you also have to change the span id to "roomtemp".

For your override mode indicators, have a look at commit 0c760f06b1. It adds two gui variables: manualoverrule and programoverrule. You would use the latter in combination with the override variable to control the indicators:

ajongen commented 2 years ago

Thanks a lot for the provided changes! I have installed the new otmonitor version (5.3) and adjusted the code to display the new gui variables. However, they do not seem to change on manual or remote adjustments. I assumed that it was sufficient to only update otmonitor but saw that there is also a new version of gateway.hex. Do I need to update that one on the PIC also in order to make use of the new gui variables?

hvxl commented 2 years ago

The changes didn't go into the version 5.3 release. You'll need to use the latest code from git. This is just a change in OTmonitor. You don't need to update the OTGW firmware to see the effect.

ajongen commented 2 years ago

Thanks a lot. Works like a charm!

Op di 8 mrt. 2022 om 10:04 schreef hvxl @.***>:

The changes didn't go into the version 5.3 release. You'll need to use the latest code from git. This is just a change in OTmonitor. You don't need to update the OTGW firmware to see the effect.

— Reply to this email directly, view it on GitHub https://github.com/hvxl/otmonitor/issues/19#issuecomment-1061554797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXNMJ7GKN3ZPV4IKVJRIGITU64J2TANCNFSM5MTQWVUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>