Overview - mxtommy/SigkSens GitHub Wiki

(If you already know what SigkSens is and you're ready to go, click here for the Getting Started documentation.)

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. It's assumed that you know what the Node Server is, and that you have one set up, or are going to. Currently, sensors are defined for gathering the following data: temperature, humidity, pitch/roll/yaw, and generic digital and analog inputs. (For example, the generic digital input could be used for engine RPM, and the generic analog input could be used for bilge water level.) Because the hardware is so inexpensive, the idea is to put one MCU close to each thing or area you want to monitor (main engine, generator, bilge pump, fuel tanks, etc.), each with a relatively small number of sensors connected to it. Collectively, all of the sensors and all of the MCU's gather as much data as you want from all over the boat, and send it all to your SignalK Node Server. The Node Server then makes all of that data (plus any other data it has, such as the data from your boat's NMEA network, via an iKommunicate Gateway) available for display on any number of SignalK "consumers", such as the Instrument Panel (included with the Node Server) or WilhemSK.

Installation is similar to many open source projects you might have installed, but is thoroughly documented in the Getting Started document, so all the mystery is removed.

Once SigkSens is installed and running on your MCU, you need to access it from a web browser on a computer, phone, or tablet to do a one-time configuration of its wifi credentials. This allows it to connect to your wifi network (the one on which your SignalK Node Server is running) on all subsequent restarts. Each time it connects to your wifi network, it automatically detects, and connects to, your SignalK Node Server. It also automatically detects any supported sensors that are attached, and gathers and stores some of the low-level information necessary to use them.

At this point, it's up to you to do a one-time configuration of each sensor. Each one has one or more attributes, which represent the data the sensor can collect. For example, a OneWire temperature sensor has only one attribute: tempK (temperature in degrees Kelvin), but an SHT30 sensor has two attributes: tempK, and humidity. You don't configure these - they're defined by SigkSens depending on the type of sensor. But each attribute does have three parameters, which you do configure: path, scale, and offset.

  • path is what identifies the data to each Consumer of SignalK data. For example, the path for the data collected by a temperature sensor on your flybridge might be "environment.outside.temperature", but a sensor in your engine room would be "environment.inside.engineRoom.temperature". Without a path, the data would be meaningless. NOTE: if the path isn't set for a particular attribute, it won't even be submitted to the Node Server.
  • scale and offset are optional, and are used to correct the sensor's raw data before it's sent to SignalK.

You set parameters by simply typing a long URL into your browser. This is how you might set all three parameters for your flybridge temperature sensor:

http://192.168.2.2/setSensorAttr?address=0x42&attrName=tempK&path=environment.outside.temp&scale=1.05&offset=9

(There's much more on configuring sensors in the Getting Started and Add A Sensor documents.)

After you configure all of your sensors, you should be ready to go. When the MCU starts, it will:

  • Connect to your wifi network.
  • Connect to your SignalK Node Server.
  • Start sending data from all of your sensors to the Node Server.
  • The Node Server makes all of its data (from SigkSense and from an iKommunicate Gateway if you have one) available to any SignalK consumer that has access to the Node Server, through your local network.

Next up: Getting Started