Oil, Volume and liquid sensor widget

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


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

Any help is appreciated :slight_smile:

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

1 Like

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)
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

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:

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.

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: )

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



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.

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

1 Like