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
Esp8266 - esp easy
#41
see it now, and set it up .. look at the screenshot
Reply
#42
Dear PaddyB,
Good evening, hope all is well.
We have been in contact on the forum about EasyESP and the connection to SignalK
I'm still not there ...

Step 1. I was able to connect a 1W sensor via my arduino and configure it like in screenshot 1 (where I send it via WIFI to the SignalK server via UDP to port 55557 (via https://sites.google.com/site/olewsaa/ya...monitoring)

Step2. Via Serial Monitor I can see the sensor works and I get data and temperature

(I have installed Node Red via SignalK app store)

Step 3. Next I add an SignalK Subscribe node 

Step 4 Now the difficult part ... Which path do I use ? See the last screenshot. I think I go wrong here, because I do not see anything in the debug window.

Hope you can help.

Bart


Attached Files Image(s)
                   
Reply
#43
(2020-01-13, 11:04 PM)leif_klasson@hotmail.com Wrote: Hi, after some googling and testing, it was quite easy to EspEasy to send UDp message to SignalK directly.
So I don't use MQTT or Nodered in this.

See attached images.

EspEasy:
- Setup a controller for UDP >> SignalK server
- Setup a device

In my example with temperature, I have Celsius + 273.15 =Kelvin, that SignalK is using.

Json template is:
{"updates": [{"source": "%sysname%","values":[ {"path":"environment.inside.mainCabin.%valname%","value": %value% }]}]}

Or as pretty print:
{"updates":
  [
    {
      "source": "%sysname%",
      "values":
        [
           {
            "path":"environment.inside.mainCabin.%valname%","value": %value%
          }
        ]
    }
  ]
}

%sysname is the name of EspEasy.
%valname is the name of the device value sent, "temperature" as example.
%value is the actual value from the device.

A better way could be to setup PATH in device, now I need to create several UDP controllers.

{"updates": [{"source": "%sysname%","values":[ {"path":"%valname%","value": %value% }]}]} and in the device set as example "temperature" to "environment.inside.mainCabin.temperature" instead.


PATH must match something good in SignalK, avoid to create your own path if possible.

SIGNALK server:
In Signalk admin web page, make sure you ONE UDP receiver on same port as EspEasy.


Volia! ready! Big Grin


Leif
I have followed your instructions but cant get UDP from ESPEasy into SignalK to work
I have setup my ESP82666 controller exactly as yours with the JSON code in the Publish box
I have setup a signalK connection for 10.10.10.1 port 55557 but see no data in the SK dashboard
nc -lu 55557 on the Pi does show data on port 55557
I have setup a NodeRed flow to monitor UDP on port 55557 which shows data being sent by the ESP but it seems to show a string (see my screen grab)



Any suggestions ?
Thanks


Attached Files Image(s)
       
Reply
#44
If you send SignalK JSON the connection type should be Signal K, not NMEA0183 that is seen in the earlier picture. How is it configured?


Sent from my iPhone using Tapatalk
Reply
#45
affinite
(2020-01-13, 11:04 PM)leif Wrote: c -lu 55557 on the Pi does show data on port 55557
Hi, don't grab the udp package in Node-Red? UDP package will update and create an signalk path according to the you have sent in, just use that one with one with a signalk-on-delta/signalk-subscribe element in node red, if you need to adjust/react on it. Else you are all clear, you will have the value in Signalk to be used.

And, change the path name, try to to keep them to "SignalK standard":
"environment.inside.mainCabin.Wifi"  shall be "environment.inside.mainCabin.temperature".
You also have "environment.inside.mainCabin.relativeHumidity" as example of the syntax.

You also should have your temp value from EspEasy in Kelvin, you have -69 in your example, I hope not... since then you are -69 degress below the absolute zero value ;-), impossible.

See in this link: http://signalk.org/specification/1.3.0/doc/vesselsBranch.html , search for "inside":

Citat:
/vessels/<RegExp>/environment/inside/[A-Za-z0-9]+/temperature

Units: K (Kelvin)
Description: Temperature
End of citat.


You also have this one in "json-format": https://github.com/SignalK/specification...mas/groups
For example, when setting navigation.state, what value to use? Check in that file, and you will see the "possible" values.

Not on my home computer for the moment, so can't give exact examples.

/Leif
Reply
#46
Thanks for taking the time to reply guys
In answer to your questions ...

I'm trying to establish a link directly between the ESP8266 and SignalK using UDP without using NodeRed
(I only showed the NodeRed screen shot because I wanted to show what data appears to be present on port 55557.)
I know that I've used incorrect SignalK keys but I simply wanted to establish a data flow first and tidy-up later
Similarly, I'm just sending the ESP8266's WiFi signal strength as a proof-of-concept so Im not concerned about converting it to/from Kelvin  Smile
I will use the correct keys on any live system

I have defined the SignalK connection to port 5557 as input type "SignalK"

I've attached some screen grabs to show what ive setup in the hope that you will see where ive gone wrong.
(Actually when I enable the ESP8266 UDP controller the SignalK server seems to choke so Im obviously doing something VERY wrong)

You'll have gathered that I'm unfamiliar with JSON and UDP but by installing the SignalK-MQTT gateway I have managed to get the data into SignalK using MQTT so if I cant get UDP to work, I do have an alternative option.


Attached Files Image(s)
               
Reply
#47
(2020-04-16, 01:44 PM)affinite Wrote: I have defined the SignalK connection to port 5557 as input type "SignalK"

I'm no expert but I think you only need to send the data to 55557, SignallK is already listening so you do not need to define the port and it may be causing your problems.
Reply
#48
Hm, bad news... for the moment after update to OP2 my espeasy +udp is not working anymore, haven't had time to dig in why .... :-( ...

But, as a workaround, the SignalK<>MQTT plugin is working great, so I will probably let EspEasy use MQTT instead.

/Leif
Reply
#49
Leif,
Thanks for checking it.
I've decided that I don't really know what I'm doing with UDP and JSON code to format messages however MQTT works just fine and with processor utilization at only 1% I dont see a downside to using MQTT.
Reply
#50
(2020-04-21, 09:52 AM)affinite Wrote: Leif,
Thanks for checking it.
I've decided that I don't really know what I'm doing with UDP and JSON code to format messages however MQTT works just fine and with processor utilization at only 1% I dont see a downside to using MQTT.

I experienced the same problem with ESPEasy. Movedto sensESP. Works like a charm
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)