I have just connected my first Safiery Star-tank BLE sensor, with intention to add several more. Pairing and configuring sensor was super easy and quick. During configuration I found there is no support for custom tank shapes (like there are for analoge sensors). Can someone comment if support for custom tank shapes are on the Cerbo roadmap for BLE tank sensors? My Bavaria sailboat tanks are very non-linear in their shape, and this really kills the project (or my OCD)…
You should be able to define that using the custom shape on console.
Just press the + on the upper right and define up to 10 points.
Hi @dfaber
Your instruction is correct for analouge sensors, but this “custom shape” configuration option is not visible for Bluetooth sensors. Could you please help us raise a feature request for this?
BR
Sturla
Sure. I’ll see if I can ping the right people. No guarantees of course.
Even better than making a feature request, I just made a branch supporting this for both Safiery and Mopeka sensors. The branch still needs to be reviewed. Once that has been passed, it should be added to Venus.
…it is also not possible to define alarm levels.
Hi @dfaber
Will the change also result in transmitting the sensor data to N2k? Looks like that is not happening on current version 3.60-48
My patches are still under review, so not part of ~48. Hope they will get approved soon. Look for a notice of dbus-ble-sensors version 0.22.
If I am not mistaken that will automatically result in transmitting the sensor data to N2K as well.
Hi @dfaber
Still no custom tank shape available. Think you can give it a push?
BR
Sturla
I gave it another push and while there is some progress, I haven’t seen the white smoke yet.
An associated issue and it seems your the right man to mention it to, High and Low level alarms for BLE (Mopeka) in my case are not possible whereas they are for analogue sensors.
This would be a really useful update to the OS for those of us with boats and RVs.
I have brought it up as a separate feature request previously but it’s still outstanding.
Thanks in advance
Les
While waiting, I made ChatGPT generate a NodeRed flow to correct for the “odd” tank shape. Works ok, but no publishing on N2k. Here is the flow if some is interrested;[
{
“id”: “1051fa7630b146d9”,
“type”: “tab”,
“label”: “Diesel korreksjon ny”,
“disabled”: false
},
{
“id”: “289fea53f352baf2”,
“type”: “mqtt in”,
“z”: “1051fa7630b146d9”,
“name”: “Les RawValue”,
“topic”: “N/d412430b5e61/tank/28/RawValue”,
“qos”: “2”,
“datatype”: “auto-detect”,
“broker”: “mqtt_broker”,
“nl”: false,
“rap”: true,
“rh”: 0,
“inputs”: 0,
“x”: 100,
“y”: 60,
“wires”: [
[
“41e83faff29d40d7”,
“75b875c4ee0a29d1”
]
]
},
{
“id”: “75b875c4ee0a29d1”,
“type”: “debug”,
“z”: “1051fa7630b146d9”,
“name”: “debug rådata”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “false”,
“x”: 300,
“y”: 140,
“wires”:
},
{
“id”: “41e83faff29d40d7”,
“type”: “function”,
“z”: “1051fa7630b146d9”,
“name”: “Konverter sensorverdi til væskenivå”,
“func”: “const depthFromTop = msg.payload.value;\nconst tankHeight = 44.2;\nconst fluidHeight = tankHeight - depthFromTop;\n\nmsg.payload = {\n tankType: "custom_table",\n inputUnit: "cm",\n outputUnit: "l",\n measuredHeight: fluidHeight,\n tankHeight: tankHeight,\n customTable: [\n { height: 0.0, volume: 0 },\n { height: 5.7, volume: 10 },\n { height: 11.2, volume: 20 },\n { height: 13.6, volume: 30 },\n { height: 15.7, volume: 40 },\n { height: 17.2, volume: 50 },\n { height: 19.3, volume: 60 },\n { height: 20.0, volume: 70 },\n { height: 21.1, volume: 80 },\n { height: 23.0, volume: 90 },\n { height: 24.0, volume: 100 },\n { height: 24.8, volume: 110 },\n { height: 25.8, volume: 120 },\n { height: 27.1, volume: 130 },\n { height: 27.5, volume: 140 },\n { height: 28.8, volume: 150 },\n { height: 29.2, volume: 160 },\n { height: 30.1, volume: 170 },\n { height: 31.3, volume: 180 },\n { height: 32.0, volume: 190 },\n { height: 32.2, volume: 200 },\n { height: 33.3, volume: 210 },\n { height: 34.3, volume: 220 },\n { height: 34.9, volume: 230 }\n ]\n};\nreturn msg;\n”,
“outputs”: 1,
“x”: 350,
“y”: 60,
“wires”: [
[
“79b0eecb4933e83f”
]
]
},
{
“id”: “79b0eecb4933e83f”,
“type”: “tank-volume”,
“z”: “1051fa7630b146d9”,
“name”: “Beregn volum og prosent”,
“tankType”: “none”,
“inputField”: “payload”,
“outputField”: “payload”,
“measurement”: “fluid”,
“inputUnit1”: “cm”,
“inputUnit2”: “l”,
“outputUnit”: “l”,
“customTable”: ,
“x”: 630,
“y”: 60,
“wires”: [
[
“bcaa1739b3905335”,
“0ab7e10360793bd7”,
“e886d7f9759dc9d9”
]
]
},
{
“id”: “e886d7f9759dc9d9”,
“type”: “debug”,
“z”: “1051fa7630b146d9”,
“name”: “debug volum”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “false”,
“x”: 640,
“y”: 160,
“wires”:
},
{
“id”: “bcaa1739b3905335”,
“type”: “function”,
“z”: “1051fa7630b146d9”,
“name”: “Publiser % nivå”,
“func”: “let volume = Number(msg.payload.filledVolume);\nlet total = Number(msg.payload.totalVolume);\nmsg.topic = "W/cerboserialnumber/tank/28/Level";\n\nif (isNaN(volume) || isNaN(total) || total <= 0) {\n msg.payload = { value: 0 };\n} else {\n msg.payload = { value: Math.round((volume / total) * 100) };\n}\nreturn msg;\n”,
“outputs”: 1,
“timeout”: “”,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“libs”: ,
“x”: 870,
“y”: 40,
“wires”: [
[
“56e1a2c72a546c41”,
“12309e829468e2a9”
]
]
},
{
“id”: “0ab7e10360793bd7”,
“type”: “function”,
“z”: “1051fa7630b146d9”,
“name”: “Publiser liter igjen”,
“func”: “let remaining = Number(msg.payload.filledVolume);\nmsg.topic = "W/cerboserialnumber/tank/28/Remaining";\n\nif (isNaN(remaining)) {\n msg.payload = { value: 0 };\n} else {\n msg.payload = { value: remaining / 1000 };\n}\nreturn msg;\n”,
“outputs”: 1,
“timeout”: “”,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“libs”: ,
“x”: 870,
“y”: 100,
“wires”: [
[
“c55e9b42458f4022”,
“1d545c735bb7e191”
]
]
},
{
“id”: “56e1a2c72a546c41”,
“type”: “mqtt out”,
“z”: “1051fa7630b146d9”,
“name”: “MQTT Level”,
“topic”: “”,
“qos”: “”,
“retain”: “”,
“broker”: “mqtt_broker”,
“x”: 1120,
“y”: 40,
“wires”:
},
{
“id”: “c55e9b42458f4022”,
“type”: “mqtt out”,
“z”: “1051fa7630b146d9”,
“name”: “MQTT Remaining”,
“topic”: “”,
“qos”: “”,
“retain”: “”,
“broker”: “mqtt_broker”,
“x”: 1120,
“y”: 100,
“wires”:
},
{
“id”: “1d545c735bb7e191”,
“type”: “debug”,
“z”: “1051fa7630b146d9”,
“name”: “debug 25”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “false”,
“statusVal”: “”,
“statusType”: “auto”,
“x”: 1000,
“y”: 240,
“wires”:
},
{
“id”: “12309e829468e2a9”,
“type”: “debug”,
“z”: “1051fa7630b146d9”,
“name”: “debug 26”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “false”,
“statusVal”: “”,
“statusType”: “auto”,
“x”: 1020,
“y”: 180,
“wires”:
},
{
“id”: “mqtt_broker”,
“type”: “mqtt-broker”,
“name”: “localhost”,
“broker”: “localhost”,
“port”: “1883”,
“clientid”: “”,
“usetls”: false,
“protocolVersion”: “4”,
“keepalive”: “60”,
“cleansession”: true,
“autoUnsubscribe”: true
}
]