This waits until the trim sensor shows below 50 to fire the automation (by using wait until in the turn on action). But there is one problem with this, which may be quite expensive: If the trim sensor has locked up in for instance 40, but the outboard motor in reality is all the way up (which is above 100), I will damage my steering cylinder. So to make sure that can never happen (Murphy is very much a crew member on my boat, and his law is ruthless…) I would like to have a condition that says that when the sensor goes from above 60 to below 50 then it should fire. Because that means that the sensor isn’t stuck.
Can somebody please tell me if this is possible, and if it is help me with how to do it?
Of course, and thanks for answering! It’s a simple MQTT subscribe sensor. The value originally comes from the Suzuki engine interface over NMEA2000, and that value goes to SignalK (boat information server), which sends it to the MQTT broker. It is filtered to go invalid after ten seconds, so I don’t stop the outboard motor (which kills the data from the Suzuki engine interface) and then tilt it so much that it will interfere with with jackplate operation. “Motorheis” is Norwegian for jack plate, which moves the outboard motor up and down on the transom.
The expire_after is just for display in HomeAssistant (which I was told here in no uncertain terms when I thought that also applied for the sensor it self… ).
Thanks! I’ll leave it for a couple of days in case somebody else has an easier solution. If not I’ll try to make template sensors that creates booleans.
Interesting topic. For me maoin question is - what is exactly:
If sensor reports 61, then 49 - it is a case.
If sensor reports 61, 55, then 48 - ?
If intermidiate values allowed - what is a timeframe for going from above 60 to below 50 ?
Thanks for answering! I don’t really care about the intermediate values. I want to see if the sensor goes from above 60 to below 50 within the set wait time. So if sensor report 61, 55, then 48, it’s still a case.
The timeframe is, as it is now, set to the timeout for the turn_on_action, which is 45 seconds. But of course tilting the outboard motor does not take that long, it’s just that I want to wait long enough for me to have time to tilt it before lowering it on the transom with the jackplate.
So if I trim it from 90-99 (the top, the sensor isn’t totally accurate) to 60, the first of the requirements is met. If I then trim it futher down to 50 within the time that’s left it will have met the second of the requirements. So as long as it goes from 60 to 50 before the 45 seconds have gone by, the automation should start.
Edit: Changed a few things, hopefully to make it more clear…
Id make sure you test well. The (on_value above/below, in_range) can all be kind of finicky about when it will or wont trigger. I dont recall each quirk but just keep in mind that it only triggers when that value is above and then goes below that number. You could have issues if your sensor is below that number during boot or a restart. I would just thoroughly test different scenarios before final install. Those sensor configurations seem to cause a lot of people problems in my experience.
Something else, its hard to beat the dependability of a good old micro switch or limit switch to check if your trim sensor is locked up, malfunctioning, or whatever.
What are you trying to do exactly? Im having a hard time picturing what your doing with a boat. Do you have any pictures or anything?
And why? Well, partly laziness, partly fun. The finished setup will do this when I press on a switch card in Lovelace:
Connect the ignition (whitout it the engine interface doesn’t send) with a relay connected to a different ESP32.
Start tilting the motor down. If the motor is tilted to the top the steering will be damaged because it hits the transom when the jack plate goees down.
When the tilt has gone from above 60 to below 50 within 10 seconds, the text tiltsensor is set to the permissable value, which triggers the jack plate that moves the motor vertically on the transom.
When the tilt sensor in the motor goes below 10, tilting stops.
After the set amount of seconds the jack plate stops. That concludes this automation, and the motor will be ready to start, wich I’m making another automation for (triggered by pressing the wireless dead man’s grip. The goal is a keyless ride with my phone as the key. But a picture is always fun, so here’s the transom. The jack plate is the part between the boat and the outboard motor with the letters “PO” visible, here it is in the bottom position. As you can see, if the motor is tilted up above a certain level, the steering cylinder and the bracket for that will hit the transom.
Thanks! And yes it is. For crawfish, on a chute. I have 12 of those in a string, set them around 100 meters depth. To I set out them they are stood up on end, with the line attached, so I basically just drive them out the back. The green thing at the bough is what pulls them up. We also use the boat for deep sea fishing in the late spring, summer and early fall.
Nope, a lot further to the North and East. Norway. And yes, I can. For now I still have to work on weekdays, but in four years I’ll retire and go fishing whenever I want to!
Oh wow, Norway. What a presumptuous American, huh?!?!? lol. That’s so cool, I really envy you! I live in the center of the US and it’s just flat farmland here. Got a few fishing holes but nothing where i’d really want to eat out of or at least frequently. That lifestyle has always been something I want to do. I hope you enjoy it
Excuse me? A waste of time it definitely is not! Where else is the government going to collect tax money to hand out to non working people and stupid causes?? You’re not wasting your time, oh no! You’re paying your fair share!