Help with Maker API call not working (Tempest Weatherflow)

I had this working at one point, I can't figure out what I did to break it.
I have a VB.NET interface to a Tempest WeatherFlow Tempest reporting 6 values to Hubitat.
Here is a sample http call that the app creates and sends:
http://192.168.1.152/apps/api/8889/devices/6153/setUltravioletIndex/1?access_token=89b1cbff-5c7f-449e-83cb-644cf29bc8aa

Hubitat returns
The remote server returned an error: (500) Internal Server Error.
Which is not surprising because:

The debug logs for Maker API:


It looks like every thing runs ok, the UV value of 1 comes through (very cloudy here today) but then there is the [initialize] call without a secondary value which is causing the error. Where is this [initialize] coming from? it is not part of the http call.

So I am guessing the problem is in my Hubitat driver. I am not a driver writer so that is a huge red flag. The driver is not large, it is not complicated and it is crude, anyone want to take a look? How should I post it?

Could post it here inside a code block (the </> button)

metadata {
	definition (
        name: "Tempest Device Driver", 
        namespace: "Brian", 
        author: "Brian", 
        filename: "Tempest Device Driver", 
        importUrl: ""
        ) 
    {
//        capability "Switch"
        capability "Initialize"
        capability "TemperatureMeasurement"
        capability "PressureMeasurement"  
        capability "RelativeHumidityMeasurement"            
        capability "IlluminanceMeasurement"
        capability "UltravioletIndex"
        
//        attribute 'PrecipitationRate', 'number'
//        attribute 'ForecastTemperatureLowHour', 'number'
//        attribute 'ForecastTemperatureLow', 'number'
//        attribute 'POPHour', 'string'
//        attribute 'POPHigh', 'number'
        

//        command "setTemperature", [[name:"degrees*",type:"NUMBER", description:"Set temperature value"]]    
//        command "setPressure", [[name:"*",type:"NUMBER", description:"Set Pressurr value"]]       
//        command "setRelativeHumidity", [[name:"*",type:"NUMBER", description:"Set Humidity value"]] 
//        command "setIlluminance", [[name:"*",type:"NUMBER", description:"Set Illuminance value"]]
//        command "setUltravioletIndex", [[name:"*",type:"NUMBER", description:"Set UV value"]]              
//        command "setSolarRadiation", [[name:"W/m^2*",type:"NUMBER", description:"Set solar radiation value"]] 
//        command "setPOPHigh", [[name:"*",type:"NUMBER", description:"Set setPOPHigh value"]]   
//        command "setPOPHour", [[name:"*",type:"STRING", description:"Set setPOPTime value"]]  
        
//        command "PressureMeasurement", [[name:"xx*",type:"NUMBER", description:"Set pressure value"]] 
//        command "RelativeHumidityMeasurement", [[name:"Rh*",type:"NUMBER", description:"Set Relative Humidity value"]] 
//        command "setIlluminance", [[name:"Lux*",type:"NUMBER", description:"Set illuminance value"]]    
    }		

    preferences {
      input name: "enableDebug", type: "bool", title: "Enable debug logging", defaultValue: true 
        }
    } // metadata

//def on() {
//	if (enableDebug == true) log.debug('on')
//	sendEvent(name: 'switch', value: 'on')
//}

//def off() {
//	if (enableDebug == true) log.debug('off')
//	sendEvent(name: 'switch', value: 'off')
//}    

void setTemperature (newValue) {
	if (enableDebug == true) log.debug('setTemperature=' + newValue)
	sendEvent(name: 'temperature', value: newValue) 
}

void setPressure (newValue) {
	if (enableDebug == true) log.debug('setPressure=' + newValue)
	sendEvent(name: 'pressure', value: newValue)      
}

void setRelativeHumidity (newValue) {
	if (enableDebug == true) log.debug('setRelativeHumidity=' + newValue)
	sendEvent(name: 'humidity', value: newValue)	 
}

void setIlluminance (newValue) {
	if (enableDebug == true) log.debug('setIlluminance=' + newValue)
	sendEvent(name: 'illuminance', value: newValue)	 
}

void setUltravioletIndex (newValue) {
	if (enableDebug == true) log.debug('setUltravioletIndex=' + newValue)
	sendEvent(name: 'UV', value: newValue)	
}

void setSolarRadiation (newValue) {
	if (enableDebug == true) log.debug('setSolarRadiation=' + newValue)
	sendEvent(name: 'SolarRadiation', value: newValue)	 
}

//void setPOPHour (newValue) {
//	if (enableDebug == true) log.debug('setPOPHour=' + newValue)
//	sendEvent(name: 'POPHour', value: newValue)	
//      def df = new java.text.SimpleDateFormat("EEEE, MMMM dd, yyyy, hh:mm:ss a")
//      state.lastUpdate= df.format(new Date())  
//}

//void setPOPHigh (newValue) {
//	if (enableDebug == true) log.debug('setPOPHigh=' + newValue)
//	sendEvent(name: 'POPHigh', value: newValue)	
//      def df = new java.text.SimpleDateFormat("EEEE, MMMM dd, yyyy, hh:mm:ss a")
//      state.lastUpdate= df.format(new Date())  
//}

def initialize() {
//	if (enableDebug == true) log.debug('initialize')
//    on ()
    
	sendEvent(name: 'temperature', value: -50)	    
	sendEvent(name: 'pressure', value: 0)
	sendEvent(name: 'humidity', value: 0)
	sendEvent(name: 'UV', value: 0)    
	sendEvent(name: 'solarRadiation', value: 0)    
	sendEvent(name: 'illuminance', value: 0)   
    //	sendEvent(name: 'POPTime', value: '')
//    sendEvent(name: 'POPHigh', value: 0) 
    
}    


Thanks

Looks like the error is coming in App 8889 not the driver.

So from Maker API ?
@bravenel can you help?

If you click the 8889 in the log entry what app does it show?

It shows the label 'Tempest' which is the label I gave to Maker API. To distinguish from the label of the device which is 'Tempest Device'.

1 Like

Cleaned up the driver

metadata {
	definition (
        name: "Tempest Device Driver", 
        namespace: "Brian", 
        author: "Brian", 
        filename: "Tempest Device Driver", 
        importUrl: ""
        ) 
    {
        capability "TemperatureMeasurement"
        capability "PressureMeasurement"  
        capability "RelativeHumidityMeasurement"            
        capability "IlluminanceMeasurement"
        capability "UltravioletIndex"
    }		

    preferences {
      input name: "enableDebug", type: "bool", title: "Enable debug logging", defaultValue: true 
        }
    }

void setTemperature (newValue) {
	sendEvent(name: 'temperature', value: newValue) 
}

void setPressure (newValue) {
	sendEvent(name: 'pressure', value: newValue)      
}

void setRelativeHumidity (newValue) {
	sendEvent(name: 'humidity', value: newValue)	 
}

void setIlluminance (newValue) {
	sendEvent(name: 'illuminance', value: newValue)	 
}

void setUltravioletIndex (newValue) {
	sendEvent(name: 'UV', value: newValue)	
}

void setSolarRadiation (newValue) {
	sendEvent(name: 'SolarRadiation', value: newValue)	 
}

Logs show

Which is interesting. For each value sent to Maker API 3 are being processed.
1] Device name=setRelativeHumidity
2] value[76] correct
3] value[]. empty,
4]value. null

The null value would appear to be the issue.

Oh I fully agree.

To who ever I managed to delete your message. Sorry. Was not my intention, should not have pressed that button. But in response.

I'm not interested in using Hubitat as a weather station and the overhead it entails servicing the tempest device. I have a separate .net application servicing both the UDP and HTTP calls of Tempest and displaying current and forecast values.
Really the only value I am currently interested in from Tempest to Hubitat is Solar Radiation to feed into my Heating system. The other values were just for fun but it is beginning to look like Maker API is not going to work for me. Shame.

It was my message, no worries. Thanks for the information, I am always interested in how people use the different things in the hopes to make my drivers better. Since I have a WeatherFlow one it was of direct interest.

FYI, I was able to restore my driver back to a working copy and my Solar Radiation values have been flowing into Hubitat smoothly ever since.

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