Automation max temp 122f

Not sure where exactly to post this problem so here goes nothing.

I’m using an arduino and a rtd to monitor my wood burning stove’s chimney pipe temp and send it to smart things in the hopes to set up temp alerts for over temp. It reads the temp perfectly, the problem at hand is ST allows a max temp of 122f and I need somewhere near 800-1000. I’m using the ST anything code for the arduino. Anyone have any ideas where to even start with the max temp?

Yeah, it’s a known issue, but I don’t know if anybody’s working on it. There are a couple of existing threads in different parts of the forum about it. I’m not sure if this is an issue with the app or the platform. :thinking:

BTW, 122 degrees Fahrenheit equals 50 degrees Celsius, so that’s probably where the limit number comes from. But it’s still way too low for home automation. It’s true that 50°C is a reasonable max limit for most battery operated devices, but not for mains powered.

Max settable temperature is 50 degrees?

@samsungzell might know who to report this issue too.

1 Like

@Mariano_Colmenarejo You’ve played around with overriding the color temperature range for light bulbs. Do you think that same process would apply here?

1 Like

I was shocked it would actually read that high but here we are. I just can’t automate with it. :disappointed::disappointed:

I haven’t messed around with it yet, but I think it’s possible to edit the device presentation to change the range. I tagged Mariano since he has edge drivers for light bulbs that change the default color temperature range in the detail view, and I would think that could be applied to the automation view too.

A workaround would be to create a custom capability that is identical to temperatureMeasurement except for the range restriction. Post events to both the stock and custom temperature capabilities and then use the custom in your automation. I would keep the stock capability on the device since it’s more likely to integrate with third parties (“Alexa, what’s the chimney temperature?”).

edit to add… Another option would be to add a stock capability with a larger range (carbonDioxideMeasurement goes to 1 million) and post your temperature to that. It’ll look a little messy since it’ll show in ppm, but you should be able to go wild with your automations and it would save you from having to learn how to deal with custom capabilities.

2 Likes

Yes, the range can be modified by creating a custom presentation for that capacity.
It can be modified to put the limits defined in the capacity. In this case -460° yo 10000°

I have modified the presentation of the thermostat temperature set point to be able to enter a temperature with a range from -50 ° C to 250 ° C.

then I’ll send you the example .json for profile type and device without battery capability

{
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "idx": 0,
                "group": "main",
                "values": [],
                "composite": false
            }      
        ],
        "actions": []
    },
    "detailView": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [
                {
                    "key": "temperature.value",
                    "enabledValues": [],
                    "range": [-50, 1000]
                }  
            ],
            "patch": []
        },
        {
            "component": "main",
            "capability": "refresh",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [
                    {
                        "key": "temperature.value",
                        "enabledValues": [],
                        "range": [
                            -50.0,
                            1000.0
                        ],
                        "step": 1
                    }
                ],
                "patch": [],
                "exclusion": []
            }
        ],
        "actions": []
    },
    "type": "profile"
}

@Tatersalad,
I have used the creation of the custom presentation for a device that uses an edge driver.
I don’t know what type of device you use in ST to monitor temperature

3 Likes

To be completly honest I have no idea where to even start. ive never been this deep into ST. Would I be adding code here to make the change?

/**
 *  Child Temperature Sensor
 *
 *  Copyright 2017 Daniel Ogorchock
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  Change History:
 *
 *    Date        Who            What
 *    ----        ---            ----
 *    2017-04-10  Dan Ogorchock  Original Creation
 *    2017-08-23  Allan (vseven) Added a generateEvent routine that gets info from the parent device.  This routine runs each time the value is updated which can lead to other modifications of the device.
 *    2017-11-04  Dan Ogorchock  Added preference for Temperature Unit Conversion: Fahrenheit to Celsius, Celsius to Fahrenheit, or none 
 *    2018-02-16  Dan Ogorchock  Fixed preferences to work with Hubitat.
 *    2018-06-02  Dan Ogorchock  Revised/Simplified for Hubitat Composite Driver Model
 *    2020-09-28  Dan Ogorchock  Tweaked metadata for new ST app, removed lastUpdated attribute
 * 
 , ocfDeviceType: "oic.d.thermostat"
 */
import groovy.json.JsonOutput
metadata {
	definition (name: "Child Temperature Sensor", namespace: "ogiewon", author: "Daniel Ogorchock", vid:"generic-temperature-measurement") {
		capability "Temperature Measurement"
		capability "Sensor"
//		capability "Health Check"

//		attribute "lastUpdated", "String"
	}

	simulator {

	}
    
	preferences {
		section("Prefs") {
			//input title: "Temperature Offset", description: "This feature allows you to correct any temperature variations by selecting an offset. Ex: If your sensor consistently reports a temp that's 5 degrees too warm, you'd enter \"-5\". If 3 degrees too cold, enter \"+3\".", displayDuringSetup: false, type: "paragraph", element: "paragraph"
			input "tempOffset", "number", title: "Temperature Offset", description: "Adjust temperature by this many degrees", range: "*..*", displayDuringSetup: false
			//input title: "Temperature Unit Conversion", description: "This feature allows you to select F to C, C to F, or no conversion", displayDuringSetup: false, type: "paragraph", element: "paragraph"
			input "tempUnitConversion", "enum", title: "Temperature Unit Conversion - select F to C, C to F, or no conversion", description: "", defaultValue: "1", required: true, multiple: false, options:[["1":"none"], ["2":"Fahrenheit to Celsius"], ["3":"Celsius to Fahrenheit"]], displayDuringSetup: false
		}
	}
    
	tiles(scale: 2) {
		multiAttributeTile(name: "temperature", type: "generic", width: 6, height: 4, canChangeIcon: true) {
			tileAttribute("device.temperature", key: "PRIMARY_CONTROL") {
				attributeState("temperature", label: '${currentValue}°', unit:"F", defaultState: true, 
						backgroundColors: [
                                // Celsius
                                [value: 0, color: "#153591"],
                                [value: 7, color: "#1e9cbb"],
                                [value: 15, color: "#90d2a7"],
                                [value: 23, color: "#44b621"],
                                [value: 28, color: "#f1d801"],
                                [value: 35, color: "#d04e00"],
                                [value: 37, color: "#bc2323"],
                                // Fahrenheit
                                [value: 40, color: "#153591"],
                                [value: 44, color: "#1e9cbb"],
                                [value: 59, color: "#90d2a7"],
                                [value: 74, color: "#44b621"],
                                [value: 84, color: "#f1d801"],
                                [value: 95, color: "#d04e00"],
                                [value: 96, color: "#bc2323"]
						])
			}
// 			tileAttribute("device.lastUpdated", key: "SECONDARY_CONTROL") {
//    				attributeState("default", label:'    Last updated ${currentValue}',icon: "st.Health & Wellness.health9")
//            }
		}
	}
}

def parse(String description) {
    log.debug "parse(${description}) called"
    def parts = description.split(" ")
    def name  = parts.length>0?parts[0].trim():null
    def value = parts.length>1?parts[1].trim():null
    if (name && value) {
    	// Offset the temperature based on preference
        def offsetValue = Math.round((Float.parseFloat(value))*100.0)/100.0d
	def units = location.getTemperatureScale()
        if (tempOffset) {
            offsetValue = offsetValue + tempOffset
        }

        if (tempUnitConversion == "2") {
            //log.debug "tempUnitConversion = ${tempUnitConversion}"
            double tempC = fahrenheitToCelsius(offsetValue.toFloat())  //convert from Fahrenheit to Celsius
            offsetValue = tempC.round(2)
            units = "C"
        }

        if (tempUnitConversion == "3") {
            //log.debug "tempUnitConversion = ${tempUnitConversion}"
            double tempC = celsiusToFahrenheit(offsetValue.toFloat())  //convert from Celsius to Fahrenheit
            offsetValue = tempC.round(2)
            units = "F"
        }

        // Update device
        sendEvent(name: name, value: offsetValue, unit: units)
//        // Update lastUpdated date and time
//        def nowDay = new Date().format("MMM dd", location.timeZone)
//        def nowTime = new Date().format("h:mm a", location.timeZone)
//        sendEvent(name: "lastUpdated", value: nowDay + " at " + nowTime, displayed: false)
//        sendEvent(name: "DeviceWatch-DeviceStatus", value: "online")
    }
    else {
    	log.debug "Missing either name or value.  Cannot parse!"
    }
}

def updated() {
	log.debug "updated()"
	initialize()
}

def installed() {
	log.debug "installed()"
	initialize()
}
def initialize() {
//	sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false)
//	updateDataValue("EnrolledUTDH", "true")
}

I have never created a vid for a dth, I can give it a try, if you want

If it doesn’t work, surely someone from the community knows how to do it

1 Like

Should be the same as with Edge so long as you’re not adding components other than main.

Then this line in the DTH:

definition (name: "Child Temperature Sensor", namespace: "ogiewon", author: "Daniel Ogorchock", vid:"generic-temperature-measurement")

Would change to this:

definition (name: "Child Temperature Sensor", namespace: "ogiewon", author: "Daniel Ogorchock", vid:"VID-HASH-GOES-HERE", mnmn: "SmartThingsCommunity")
1 Like

Try with this DTH modified

The new name is “Child High Temperature Sensor”

Modified, thank @philh30

/**
 *  Child Temperature Sensor
 *
 *  Copyright 2017 Daniel Ogorchock
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  Change History:
 *
 *    Date        Who            What
 *    ----        ---            ----
 *    2017-04-10  Dan Ogorchock  Original Creation
 *    2017-08-23  Allan (vseven) Added a generateEvent routine that gets info from the parent device.  This routine runs each time the value is updated which can lead to other modifications of the device.
 *    2017-11-04  Dan Ogorchock  Added preference for Temperature Unit Conversion: Fahrenheit to Celsius, Celsius to Fahrenheit, or none 
 *    2018-02-16  Dan Ogorchock  Fixed preferences to work with Hubitat.
 *    2018-06-02  Dan Ogorchock  Revised/Simplified for Hubitat Composite Driver Model
 *    2020-09-28  Dan Ogorchock  Tweaked metadata for new ST app, removed lastUpdated attribute
 * 
 , ocfDeviceType: "oic.d.thermostat"
 */
import groovy.json.JsonOutput
metadata {
	definition (name: "Child High Temperature Sensor", namespace: "ogiewon", author: "Daniel Ogorchock", mnmn: "SmartThingsCommunity", vid:"8c35852b-6d7b-3ed7-9d2e-0ebc54183b67") {
		capability "Temperature Measurement"
		capability "Sensor"
//		capability "Health Check"

//		attribute "lastUpdated", "String"
	}

	simulator {

	}
    
	preferences {
		section("Prefs") {
			//input title: "Temperature Offset", description: "This feature allows you to correct any temperature variations by selecting an offset. Ex: If your sensor consistently reports a temp that's 5 degrees too warm, you'd enter \"-5\". If 3 degrees too cold, enter \"+3\".", displayDuringSetup: false, type: "paragraph", element: "paragraph"
			input "tempOffset", "number", title: "Temperature Offset", description: "Adjust temperature by this many degrees", range: "*..*", displayDuringSetup: false
			//input title: "Temperature Unit Conversion", description: "This feature allows you to select F to C, C to F, or no conversion", displayDuringSetup: false, type: "paragraph", element: "paragraph"
			input "tempUnitConversion", "enum", title: "Temperature Unit Conversion - select F to C, C to F, or no conversion", description: "", defaultValue: "1", required: true, multiple: false, options:[["1":"none"], ["2":"Fahrenheit to Celsius"], ["3":"Celsius to Fahrenheit"]], displayDuringSetup: false
		}
	}
    
	tiles(scale: 2) {
		multiAttributeTile(name: "temperature", type: "generic", width: 6, height: 4, canChangeIcon: true) {
			tileAttribute("device.temperature", key: "PRIMARY_CONTROL") {
				attributeState("temperature", label: '${currentValue}°', unit:"F", defaultState: true, 
						backgroundColors: [
                                // Celsius
                                [value: 0, color: "#153591"],
                                [value: 7, color: "#1e9cbb"],
                                [value: 15, color: "#90d2a7"],
                                [value: 23, color: "#44b621"],
                                [value: 28, color: "#f1d801"],
                                [value: 35, color: "#d04e00"],
                                [value: 37, color: "#bc2323"],
                                // Fahrenheit
                                [value: 40, color: "#153591"],
                                [value: 44, color: "#1e9cbb"],
                                [value: 59, color: "#90d2a7"],
                                [value: 74, color: "#44b621"],
                                [value: 84, color: "#f1d801"],
                                [value: 95, color: "#d04e00"],
                                [value: 96, color: "#bc2323"]
						])
			}
// 			tileAttribute("device.lastUpdated", key: "SECONDARY_CONTROL") {
//    				attributeState("default", label:'    Last updated ${currentValue}',icon: "st.Health & Wellness.health9")
//            }
		}
	}
}

def parse(String description) {
    log.debug "parse(${description}) called"
    def parts = description.split(" ")
    def name  = parts.length>0?parts[0].trim():null
    def value = parts.length>1?parts[1].trim():null
    if (name && value) {
    	// Offset the temperature based on preference
        def offsetValue = Math.round((Float.parseFloat(value))*100.0)/100.0d
	def units = location.getTemperatureScale()
        if (tempOffset) {
            offsetValue = offsetValue + tempOffset
        }

        if (tempUnitConversion == "2") {
            //log.debug "tempUnitConversion = ${tempUnitConversion}"
            double tempC = fahrenheitToCelsius(offsetValue.toFloat())  //convert from Fahrenheit to Celsius
            offsetValue = tempC.round(2)
            units = "C"
        }

        if (tempUnitConversion == "3") {
            //log.debug "tempUnitConversion = ${tempUnitConversion}"
            double tempC = celsiusToFahrenheit(offsetValue.toFloat())  //convert from Celsius to Fahrenheit
            offsetValue = tempC.round(2)
            units = "F"
        }

        // Update device
        sendEvent(name: name, value: offsetValue, unit: units)
//        // Update lastUpdated date and time
//        def nowDay = new Date().format("MMM dd", location.timeZone)
//        def nowTime = new Date().format("h:mm a", location.timeZone)
//        sendEvent(name: "lastUpdated", value: nowDay + " at " + nowTime, displayed: false)
//        sendEvent(name: "DeviceWatch-DeviceStatus", value: "online")
    }
    else {
    	log.debug "Missing either name or value.  Cannot parse!"
    }
}

def updated() {
	log.debug "updated()"
	initialize()
}

def installed() {
	log.debug "installed()"
	initialize()
}
def initialize() {
//	sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false)
//	updateDataValue("EnrolledUTDH", "true")
}
3 Likes

You’ll need to add the mnmn too, and namespace can be left as ogiewon

3 Likes

Thank, I swapped mnmm and namespace!!! :man_facepalming:

3 Likes

I swapped this code in and it all stayed the same. im not ruling out operator error just yet. anything special i need to do that im missing? i saved and published and reloaded the device into ST and the 122 is still the limit.

Close smartthings app and Delete memory cache on your phone

2 Likes

Also mnmn not mnmm

1 Like

no luck on clearing my phone… im sure its something silly that im missing

It seems that I have dyslexia !!!

@Tatersalad do what it says @philh30 , change mnmm for mnmn

It is already corrected in the post

2 Likes

@Mariano_Colmenarejo, @philh30 you guys are life savers! I was ready to rip my hair out after all setup just to find out i was limited on temp. tha works amazing. Happy Thanksgiving! can I tip yall for your help? Beer or soda on me?

so to try to understand this…
mnmn: “SmartThingsCommunity”, vid:“8c35852b-6d7b-3ed7-9d2e-0ebc54183b67”)
this is what changed but what does that call out? just trying to better my understanding.

2 Likes

The vid is a code that points to a certain way of displaying the device in the app - what shows on the dashboard, detail and automation screens. @Mariano_Colmenarejo did the heavy lifting to set up that display the way you need it, and now anyone that uses that vid hash will get the same display for their device as you now have. The json he posted earlier is what the vid points to, and if you were to use the CLI or API you could query that vid to see the json he uploaded.

The mnmn is the namespace that the vid falls under. Anything we create goes under SmartThingsCommunity, but companies can have their own namespace.

1 Like

Thank you, Enjoy the day.
It has been a pleasure to help you

perfectly explained by @philh30 , just note that
A presentation (vid) is created in smartthings API, which tells the app how to present the capabilities and data in each view of the device.

Dashboard view (Tile)
Details View (when you open the device)
Automations: conditions (how and what is shown in the automation conditions, values range (-50 to 1000)
Automations: actions, (in this case the temperature has no actions since it cannot be modify from an automation).

This is the presentationfile in API of the generated vid “8c35852b-6d7b-3ed7-9d2e-0ebc54183b67” and you can see each of the views that the app shows

I send it to you in case you want to have it,

{
    "mnmn": "SmartThingsCommunity",
    "vid": "8c35852b-6d7b-3ed7-9d2e-0ebc54183b67",
    "version": "0.0.1",
    "type": "dth",
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "idx": 0,
                "group": "main",
                "values": [],
                "composite": false
            }
        ],
        "actions": []
    },
    "detailView": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [
                {
                    "key": "temperature.value",
                    "enabledValues": [],
                    "range": [
                        -50,
                        1000
                    ]
                }
            ],
            "patch": []
        },
        {
            "component": "main",
            "capability": "sensor",
            "version": 1,
            "values": [],
            "patch": []
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [
                    {
                        "key": "temperature.value",
                        "enabledValues": [],
                        "range": [
                            -50,
                            1000
                        ],
                        "step": 1
                    }
                ],
                "patch": [],
                "exclusion": []
            }
        ],
        "actions": []
    },
    "presentationId": "8c35852b-6d7b-3ed7-9d2e-0ebc54183b67",
    "manufacturerName": "SmartThingsCommunity"
}
1 Like