Signal K native Sensors

455 views
Skip to first unread message

Andi

unread,
Apr 11, 2017, 11:45:32 AM4/11/17
to Signal K
Hi,

I'm about to whip together some native signal k sensors using esp8266
wifi modules. Stuff like temperature, humidity, baro, rpm, ...

I've been over the extensive documentation and probably can manage
putting the requests together. But in case somebody has an example like
"just post this to there" I would really appreciate it, might save me
some time juggling paths and such.

Cheers, Andi

Teppo Kurki

unread,
Apr 12, 2017, 4:56:04 AM4/12/17
to signalk
I need to brush the dust off the ESP8266 temp sensor project I started last fall to have it onboard for this season - should we collaborate? 

Are you on our Slack? 

Are you aware of https://github.com/tzapu/WiFiManager ? I was planning to use that.



--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andi

unread,
Apr 12, 2017, 6:27:09 AM4/12/17
to sig...@googlegroups.com
Hi,

see attached what I've got so far, in case somebody else want's to join
in as well. Works with a Wemos D1 mini, nice board, cheap and you don't
have to mess around with a programmer. Should work on an ESP01 as well,
maybe not the vcc reporting and different pinout.

Just some cobbled together arduino code gathering the data and sending
it to a carbon/graphite instance.

My plan is to send to SignalK instead of carbon, let Signalk add a
timestamp (bc esp8266 has no rtc) and send to carbon from there. Server
is a raspi 3, I'm planning to run two wifis on the same device, one
exclusively for sensors, one for connecting to the interwebs over
router, hotspot, whatever. So my next steps would be to implement
sending to signalk, rip out the ntp code and get deep sleep to run
reliably. I'm hoping to get through the season with one LiIon 18650 with
submitting data every 15min. A second line of sensors will run off 12V
for stuff where I want continous updates.

> I need to brush the dust off the ESP8266 temp sensor project I started
> last fall to have it onboard for this season - should we collaborate?

Sure! Let's get in touch after easter, I'm probably busy over the
holidays, not too sure yet. Not on slack yet, but wanted to give it a
shot soon.

> Are you aware of https://github.com/tzapu/WiFiManager ? I was planning
> to use that.

No didn't know it. On first glance I see some pros and cons. I guess I
would start without to keep stuff as simple as possible and add it in
after we get a stable version of the sensor. Just to keep the possible
points of failure to a minimum...

Cheers, Andi

>
> On Tue, Apr 11, 2017 at 6:45 PM, 'Andi' via Signal K
> <sig...@googlegroups.com <mailto:sig...@googlegroups.com>> wrote:
>
> Hi,
>
> I'm about to whip together some native signal k sensors using esp8266
> wifi modules. Stuff like temperature, humidity, baro, rpm, ...
>
> I've been over the extensive documentation and probably can manage
> putting the requests together. But in case somebody has an example like
> "just post this to there" I would really appreciate it, might save me
> some time juggling paths and such.
>
> Cheers, Andi
>
> --
> You received this message because you are subscribed to the Google
> Groups "Signal K" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to signalk+u...@googlegroups.com
> <mailto:signalk%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Signal K" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to signalk+u...@googlegroups.com
> <mailto:signalk+u...@googlegroups.com>.
DhtEsp8266Server.ino.txt

rob...@42.co.nz

unread,
Apr 13, 2017, 6:01:26 PM4/13/17
to Signal K

The https://github.com/SignalK/signalk-imu is mainly an IMU, but puts out temp and pressure too (over usb). Probably not directly relevant but maybe some of the code will be useful.

Andi

unread,
Apr 23, 2017, 8:30:41 AM4/23/17
to sig...@googlegroups.com
Hi folks,

I dockerized my first shot on the server side of things and pushed it to
github.

https://github.com/a-n-d-i/signalk-stuff

I've problems figuring out on how to coerce the server into digesting my
rest post requests, it would be awesome if someone who has done this
before could have a looksie and/or point me to docs/examples/anything.

Just clone & "docker-compose up" and you'll see my testclient getting a
404. The "request.js" is under watch by nodemon, any change triggers a
new run (in case you want to tinker with it). If you change the signalk
config, you I guess need to restart the docker containers.

It would be awesome to get this going, I got quite some sensors and
esp8266 lying around and some time on my hands :-)

Cheers, Andi

Teppo Kurki

unread,
Apr 23, 2017, 10:34:57 AM4/23/17
to signalk
On Sun, Apr 23, 2017 at 3:30 PM, 'Andi' via Signal K <sig...@googlegroups.com> wrote:
I've problems figuring out on how to coerce the server into digesting my
rest post requests, it would be awesome if someone who has done this
before could have a looksie and/or point me to docs/examples/anything.

Assuming that you are talking about the Node server:

SIgnal K Node Server supports
- delta over websocket (connect to /signalk/v1/stream, see for example https://github.com/SignalK/signalk-server-node/issues/101#issuecomment-292723662)
- delta over udp (https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-udp-settings.json)
- delta over tcp support is just around the corner, available in a branch, see https://github.com/SignalK/signalk-server-node/pull/175
- delta over http (experimental/created for testing, use settings file https://github.com/SignalK/signalk-server-node/blob/master/test/server-test-settings.json and POST delta json to /signalk/v1/api/_test/delta) 

If none of these work for you let me know, I'm sure we can work something out.

Personally I am not crazy about posting full model data to the tree. The conversion from full to json is nontrivial (needed for the updates to be sent over ws interface) and logic for merging the incoming data with the previous data is not trivial either (consider for example the case for getting data from a new source for a path for which there is already data in the model).

So I would urge you to use delta format for sending the updates.

Another topic is how the different providers should be documented (in SK Node Server) and which of these methods should be part of the Signal K Specification (currently not documented in http://signalk.org/specification/master/).


Andi

unread,
Apr 23, 2017, 11:19:49 AM4/23/17
to sig...@googlegroups.com
Thanks!

got rest working. No need to urge me for delta :-) Memory is at a
premium on embedded devices...

one question:
this sort of sounds like nmea183 over udp. Is json over udp possible as
well?

next step: get the esp sensor chooching.

Cheers, Andi

Teppo Kurki

unread,
Apr 23, 2017, 11:28:35 AM4/23/17
to signalk
> - delta over udp
> (https://github.com/SignalK/signalk-server-node/blob/master/settings/volare-udp-settings.json)

this sort of sounds like nmea183 over udp. Is json over udp possible as
well?

Sure, as long as you don't exceed maximum packet size.

OpenPlotter uses delta over UDP to interface with the Node server.

 

Andi

unread,
Apr 23, 2017, 2:10:04 PM4/23/17
to sig...@googlegroups.com
Hi,

alright, we got a working protoype which reads data from a real sensor
and successfully sends it to a dockerized signal k. Still crusty but
that will change soon...

https://github.com/a-n-d-i/signalk-stuff

Cheers, Andi

Paddy Burnside

unread,
May 25, 2017, 4:07:49 AM5/25/17
to Signal K
Reply all
Reply to author
Forward
0 new messages