Showing Temperature for FortrezZ WWA-*

I had an Automator.app user that wanted to see the current temperature in the primary screens of the app rather than having to view the “Control” tab. Since Automator.app renders the same content as the mios dashboard I modified the JSON to add temperature to the display.

I thought others (even if you don’t use Automator.app) might benefit from this so I attached the modified JSON.

To upload, go to Mios Developers → Luup Developers Tab

Scroll to the bottom then upload the attached file.

Select the refresh button in the dashboard (the circling arrows that sometimes says SAVE). Then refresh the browser. Temperature should then show up in the dashboard (and in Automator.app).

Works great. Now I can see the temperature displayed instead of an empty box. Thanks.

THanks, I’ve been asking Aaron and the rest of the team for this feature for over 2+ years. Amazing that it was this simple, thank you for doing this, and it’s so simple. If they don’t add this in the UI5 I’m going to $H1T myself.

Still no temps showing in UI5, this was working for me in UI5. Bummer…Any ideas how we can get this working in the new UI5?

They didn’t incorporate my change in UI5, but it should be easy enough to re-add display to the UI5 version. I’ll take a look at this tomorrow if someone doesn’t beat me to it.

Thanks, I tried updating the json file and that didn’t work for me. Any help would be great, I have several of these and use them for temp reporting in different rooms since they are the cheapest temp modules around. I also have 2 of the new WWA01 and WWA02 AA versions that use AA batteries instead of the older 3.6v expensive batteries…

thanks!

Looks like they did in fact add temperature display into UI5 for TempLeakSensors. The problem is that you have a custom TempLeakSensor1.json carried over from UI4 that takes precedence.

To resolve you need to delete the TempLeakSensor1.json in /etc/ludl so that the factory shipped one starts being used.

In the Test LUUP box (under Apps → Develop) enter

os.execute('rm /etc/cmh-ludl/D_TempLeakSensor1.json.lzo')

Thanks, trying this now and will let you know

FYI, this worked. Thanks for the heads up here!

They didn’t incorporate my change in UI5, but it should be easy enough to re-add display to the UI5 version. I’ll take a look at this tomorrow if someone doesn’t beat me to it.[/quote]

how to to get it show on UI4 please

They didn’t incorporate my change in UI5, but it should be easy enough to re-add display to the UI5 version. I’ll take a look at this tomorrow if someone doesn’t beat me to it.[/quote]

how to to get it show on UI4 please[/quote]

Umm, look at the top of this thread.

Hi there,

I’m using UI4, and the temperature display tweak works great. I was wondering if a similar tweak could be made to display the current water alarm status (leak detected, no alarm, etc.). Or, alternatively, is this functionality implemented in UI5?

Thanks!

[quote=“wimp, post:11, topic:168910”]Hi there,

I’m using UI4, and the temperature display tweak works great. I was wondering if a similar tweak could be made to display the current water alarm status (leak detected, no alarm, etc.). Or, alternatively, is this functionality implemented in UI5?

Thanks![/quote]
Read thread above for your answer

[quote=“pgrover516, post:12, topic:168910”][quote=“wimp, post:11, topic:168910”]Hi there,

I’m using UI4, and the temperature display tweak works great. I was wondering if a similar tweak could be made to display the current water alarm status (leak detected, no alarm, etc.). Or, alternatively, is this functionality implemented in UI5?

Thanks![/quote]
Read thread above for your answer[/quote]

The above thread is helpful for those interested in the temperature display. However, I’m asking if it’s possible to include a display which says, for example, “LEAK DETECTED” or “NO LEAK DETECTED.” It would be nice to have this status be immediately visible, instead of relying on emails.

Ok, so I’ve altered the .json file and the startup Lua code, and now my dashboard displays Temperature, Current Alarm Status, and the time and date of the last alarm. I seem to be the only one interested in this, but if anyone else is, let me know and I’ll attach my code.

sounds like nice work on your part, I’m sure it would be useful to others

Alright, here goes.

(Disclaimer: this is my first foray into json and Lua, so I’m sure that what I’ve done is neither pretty nor efficient, but I think it works)

Attached is my DTempLeakSensor1.json file. Note that it is configured for use in UI5, not UI4.

In order for it to work, you’ll need to add some variables to your WWA devices. (I’m using WWA-02, so I don’t know if the new json file will work for other models).

Essentially, this code adds more information to the “Control” tab. Additionally, the SceneGroup and ControlGroup keys cause this information to be posted to the dashboard (see http://wiki.micasaverde.com/index.php/Luup_plugin_tabs#Dashboard_appearance).

4 lines of information should be displayed on the dashboard for each device:

  1. The first line of information is just a label for the device (since I have a few different ones). I added the variable “LabelNum” with service “urn:micasaverde-com:serviceId:SecuritySensor1.”

  2. The second line displays temperature, as per the original tweak.

  3. The third line displays the date and time of the last alarm. I ran into a bug here which I clumsily fixed by separating the date and time into two variables. For this, I had to alter the startup Lua to convert the unix timestamp given by the preexisting “LastTrip” variable into human readable form. For example, for a device with id = 6:

local grossdate6 = luup.variable_get( "urn:micasaverde-com:serviceId:SecuritySensor1" , "LastTrip", 6 )
luup.variable_set( "urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip_HRF_ymd", os.date('%Y-%m-%d', grossdate6), 6 )
luup.variable_set( "urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip_HRF_hms", os.date('%H:%M:%S', grossdate6), 6)

This creates or sets the variable “LastTrip_HRF_ymd” and “LastTrip_HRF_hms” to the human readable date and time of the last alarm.

  1. Finally, the fourth line displays the current alarm status. This uses a new variable “Tripped_display”, which is either “LEAK NOW” (if “Tripped” is 1) or “no leak” (if “Tripped” is 0). Thus, I added to my startup Lua something like:
  local status6 = luup.variable_get( "urn:micasaverde-com:serviceId:SecuritySensor1" , "Tripped", 6 )
  if (status6 == "1") then
    luup.variable_set("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped_display", "LEAK NOW", 6 )
  else
    luup.variable_set("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped_display", "no leak", 6 )
  end

A note on dynamic updating:
While scouring through the forum, I found that someone recommended using the “variable_watch()” function to monitor a variable and call a given function if that variable changes. I didn’t have much luck with that. Instead, I just entered the above code into the startup Lua, so that those dynamic variables are reset every time you refresh. So, in order to actively monitor the alarm status, you DO have to keep refreshing the page. Not ideal, I know, but it’s the best I could manage.

Ok, that about sums it up. This code is the result of a day or two of tinkering with things that I know nothing about, so don’t be disappointed if it doesn’t work immediately. It certainly didn’t for me :slight_smile: The forum is a pretty good resource, as are the documentation pages I linked to earlier. Good luck.