Oil, Volume and liquid sensor widget


#1

Hi at all,
I’ve done a test with my own sensor from my private LoRaWan network.
I’ve transfer data via MQTT and it works.
But if I use Oil, Volume or Liquid I’m not able to select the widget.

With temperature and Lux it works, but for volume measure it seems to have some problems.
My payload it’s something like

oil,l=14.00
vol,m3=25.3
liquid,l=18
liquid,gal=23

I’ve tried to change channels, but I have the same behavior. Am I doing something wrong?

Any help is appreciated :slight_smile:


#2

Here is a list of all the data types Data types for Cayenne MQTT API


#3

Dear Adam,
thanks for your really fast answer.

I’ve read the client library Python code at this link.

virtualWrite() function is defined like that:

def virtualWrite(self, channel, value, dataType="", dataUnit=""):
if (self.connected):
topic = self.getDataTopic(channel)
if dataType:
payload = “%s,%s=%s” % (dataType, dataUnit, value)
else:
payload = value
self.mqttPublish(topic, payload)

So if I’m not wrong “raw” payload (i.e. the one which I can send with MQTT.fx or via a Nodered function) can have two formats:

  • value
  • dataType,dataUnit=value

If it’s correct, according with the table you have specified in your answer if payload is formatted like

liquid,l=10 or
liquid,ml=10 or
wind_speed,kmh=18

it will display the value of the channel and the possibility to choose the widget between gauge, value, graph. But it isn’t like I’ve expected

I’ve done the test with hertz value, sending freq,hz=50 and it works.

I think I’m doing something wrong, but I don’t know what :frowning:


#4

Nope, you’re right. I tested and I’m seeing this same thing. @rsiegel this seems to be a bug with the liquid data type.


#5

Just to be clear, the issue here is that you can’t see the Gauge/Line Chart widget options for these widgets, correct? I do see that on my end. You should get a choice of the Value/Gauge/Line Chart (and a tank icon by default, though you can still set that :slight_smile: )


#6

I’m seeing that the liquid data type comes through as just a values unlike other data types as @michele.ferrari said.

wind_speed,kmh=18
image

liquid,l=10
image


#7

Yeah, I think it’s behaving like an unrecognized data type. Sort of like the silly one I made in this example

If you accept the widget, and then click the settings dialog, it should at least display the unit label you selected (like ml or l). But this shouldn’t be necessary to get it to display as expected, of course. And if your behavior matches mine, you won’t be able to set it to anything but a Value widget.


#8

Thanks @adam for the quick answer.
This community forum is one of the most reactive that I’ve never found :slight_smile:

@rsiegel yes the problem is that I can not change the widget type to Gauge/Line Chart.
The solution you suggested me could be a solution, but for my scope I prefer to use Gauge.

I’ve found a workaround using tank level widget :wink:

Thank you both for the support