This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sensors aboard
#1
Hi!


So now I am stuck, finally... I can't figure out how to get a proper sensor solution.

Wireless sensors:
Easy to install cable wise, but hard to find a suitable sensor. Has anyone found a sensor that works well with OP?

I2C/1W:
The problem with the latter is that i have the Moitessier hat, which does not feature any of the needed pins... And if i introduce another shield on the Pi, it does not fit the perfect case. Has anyone else done some sensoring along with the moitessier hat and can provide some guidance?

NodeMCU:
A great project with the best of two worlds, NodeMCU sensor groups that can be spread out across the boat. Need a reliable NodeMCU though and several power supplies. Anyone has experience here? https://github.com/mxtommy/SigkSens
"SigkSens is a program that runs on an ESP8266-compatible, or ESP32, micro-controller unit ("the MCU" from now on), for the purpose of collecting data from various pre-defined sensors and sending it to your SignalK Node Server."

Ideas?
Reply
#2
http://signalk.org/2019/08/20/sensors-part-2.html


Sent from my iPhone using Tapatalk
Reply
#3
(2019-11-18, 09:04 PM)tkurki Wrote: http://signalk.org/2019/08/20/sensors-part-2.html


Sent from my iPhone using Tapatalk

Seems to go in that direction yes, and the more working modules the better.
I will focus on finding a solution that can be multiplied - both for me and for others looking to hook up the boat.

Thats why modules like wemos:
https://lolin.aliexpress.com/store/1331105

And the project mentioned above would work really smooth, hopefully. Need to look into the control potential of the parts though, want to be able to turn equipment on/off from home using the same system.
Reply
#4
http://signalk.org/2019/11/20/sensors-pa...tware.html is now out.

Wemos has a relay shield, but it only has one relay. Anything beyond gets convoluted with Wemos.
Reply
#5
(2019-11-18, 07:16 PM)flybob Wrote: Hi!


So now I am stuck, finally... I can't figure out how to get a proper sensor solution.

Wireless sensors:
Easy to install cable wise, but hard to find a suitable sensor. Has anyone found a sensor that works well with OP?

I2C/1W:
The problem with the latter is that i have the Moitessier hat, which does not feature any of the needed pins... And if i introduce another shield on the Pi, it does not fit the perfect case. Has anyone else done some sensoring along with the moitessier hat and can provide some guidance?

NodeMCU:
A great project with the best of two worlds, NodeMCU sensor groups that can be spread out across the boat. Need a reliable NodeMCU though and several power supplies. Anyone has experience here? https://github.com/mxtommy/SigkSens
"SigkSens is a program that runs on an ESP8266-compatible, or ESP32, micro-controller unit ("the MCU" from now on), for the purpose of collecting data from various pre-defined sensors and sending it to your SignalK Node Server."

Ideas?

I've been using Home Assistant with ESPHome to connect some sensors to. Home Assistant uses an API to connect to the NodeMCU ESP32/8266. There's no need for coding, just a few lines of YAML. The Home Assistant GUI is nice for non-technical people to access and for easier remote control and access, but with MQTT and SignalK sensors can be made available into NMEA2000, SignalK and so on.

The sensor I started with was an ultrasonic fresh water tank level sensor. It uses a NodeMCU 8266 with a temp sensor and waterproof ultrasonic senors and sends details to Home Assistant via WiFI and the ESPHome plugin API. The HA GUI has very easy OTA firmware updates and wifi strength sensors around the boat. I then export the value from Home Assistant to SignalK via MQTT, in this case the target value is in MQTT and using OpenPlotter I pull the MQTT value into SignalK /vessels/self/tanks/freshWater/starboard/currentVolume.

Below is the YAML for the ESP8266 with Ultrasonic sensor, temperature sensor, humidity, wifi and also converts the ultrasonic cm result for distance into litres (before sending it to Home Assistant) as well as sensor uptime. This is then logged historically in HA for 7 days and also exported to an InfuxDB for longer term logging and water usage. 

Code:
esphome:
 name: freshwatertanksensor1
 platform: ESP8266
 board: nodemcuv2

wifi:
 ssid:
 password:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

sensor:
 - platform: ultrasonic
   trigger_pin: D1
   echo_pin: D2
   name: "Tank Level Sensor"
   unit_of_measurement: "L"
   icon: "mdi:water"
   accuracy_decimals: 0
   filters:
     - lambda: return (1-x) * 1000.0 - 55;
     - filter_out: nan
     
 - platform: dht
   pin: D3
   model: DHT11
   temperature:
     name: "Tank Room Temperature"
   humidity:
     name: "Tank Room Humidity"
   update_interval: 60s
   
 - platform: wifi_signal
   name: "Fresh Water Tank WiFi signal"
   update_interval: 60s

 - platform: uptime
   name: "Fresh Water Tank Sensor uptime"

text_sensor:
 - platform: version
   name: "Fresh Water Tank ESPHome version"

From the above in Home Assistant, I have a automation that disables the water pumps automcatically when the tanks get to less than 50l to stop the pumps running dry if no one is around, it also sends an alert to mobiles that the tanks are empty. (I live aboard and it's handy to know remotely if the tanks are getting empty).

I tried to use the SignalK to MQTT plugin in OpenPlotter to automatically pull the MQTT value into SignalK, but it hasn't worked for me so far. I wasn't exactly sure how to get it to automatically pull in the MQTT topic /vessels/self/tanks/freshWater/starboard/currentVolume and automatically map it to the same SignalK path. 

The upshot of all of this is I have a girlfriend friendly tablet that shows Home Assistant with things like water levels, what lights are on, power usage and a few other things and then also export that data into OpenPlotter for handling in the nav station as well.

If the SignalK NodeMCU integration works well and can be run without coding, it would be awesome, however, I think the Home Assistant ESPHome integration is very tight, extremely easy to set up and can then export any data needed to other systems such as OP.

The next stage of this is to automate the watermaker to be able to start it up and run it to half fill the tanks using a NodeMCU to control the pressure values and check flow rates and use Home Assistant to turn on the two water pumps that run the watermaker.

Sorry it was a log post, but I really hope it helps. The combination of OP and HA with Sensors works really well for me, also means that OP isn't having to do the heavy lifting of running the sensors that aren't needed for navigation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)