General Question about DTH coding

nope, I have already looked into it. The only thing I can really do is drop the Database and start over. I really didn’t want to do that though

i am making the assumption that if you want to graph something it need to be a number…?

what you could do is modify the influx app a bit and test for pressure name and change the fieldname to pressuremod …

Not a bad idea, thanks. I’ll give it a shot.

Ok, This is really odd.

sendEvent(name: “pressure”, value: Math.round(obs.pressure_in as Double), unit: “in”)
OR
sendEvent(name: “pressure”, value: Math.round(obs.pressure_in as Float), unit: “in”)
OR
sendEvent(name: “pressure”, value: obs.pressure_in, unit: “in”)

Do NOT send data to Influx but this does:
sendEvent(name: “ultravioletIndex”, value: obs.UV)

I have added this in the Influx Logger SmartApp:
else if (‘pressure’ == evt.name) {
unit = ‘pressureMod’
value = ‘"’ + value + ‘"’
data += “,unit=${unit} value=${value}”
}

The Data never comes to Influx at all. It just stays at the SmartWeather Tile. This begs the question, am I missing an attribute?

Here is the entire code:

could you go into live logging in the IDE, select the influxdb logger. in a seperate tab go to my locations, smart apps, click on update which is to the right of the influxdb app. This will trigger the update routine. It now should show the attributes it will subscribe to. Curious if pressure is one of them :slight_smile:

It’s always been one of them. I just can’t figure out why the sendEvent isn’t actually sending to the log or the Influx SmartApp

FINALLY.

I am not sure about how this is working…

else if (‘pressure’ == evt.name) {
unit = ‘pressureMod’
value = ‘"’ + value + ‘"’
data += “,unit=${unit} value=${value}”

Shouldn’t that be creating another field on my dB?