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
#31
(2020-01-07, 03:12 PM)abarrow Wrote: You can probably eliminate MQTT and NodeRed by using the Generic UDP option on ESPEasy. It would need some testing, but I think you could probably just create a template that is a properly formatted SignalK JSON message, insert the variables (temperature, for example) and have your SignalK server listen on that UDP port.

Abarrow,

As I'm a newbie, formatting a JSON message is (still) bit to difficult ...

;(

Bart
Reply
#32
Photo 
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


Attached Files Image(s)
               
Reply
#33
Leif,

How cool! Thanks.

But as you know by now, I'm a newbie (eager to learn), so here is questions:

I do not know where to do the JSON trick. Which application do I use, or is it in SignalK?

You also talk about a better way to setup PATH in the device, do you mean the ESP?

Then you write:
... {"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.

What do you mean (or where can I read about PATH?

One more: which regards to the UDP port where SignalK is listening. How many ESP can you link to that port? Or is it one port per ESP?

Was there a specific reason why you didn't want to use NodeRed and MQTT?

Hope you can help me.

Best Bart
Reply
#34
(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Cool

 ESP8266 , LCD display like one of these >
https://www.ebay.co.uk/sch/i.html?_nkw=4...noapp=true

And you have a  display costing a couple of beers to carry around! Just needs an enclosure. 

Esp is running easyEsp so simple to set up. Data is feed from Node-red in openplotter. This is just dummy data to see if it works.

 It does!  

Not sure about powering, there must be some 18650 charger chips on ebay for pennies, or a usb power pack maybe..

[Image: yoQflcf.png]

Found it Paddy! This was the one - you were right! :-D
Reply
#35
(2020-01-16, 04:55 PM)Ranur Wrote:
(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Cool

 ESP8266 , LCD display like one of these >
https://www.ebay.co.uk/sch/i.html?_nkw=4...noapp=true

And you have a  display costing a couple of beers to carry around! Just needs an enclosure. 

Esp is running easyEsp so simple to set up. Data is feed from Node-red in openplotter. This is just dummy data to see if it works.

 It does!  

Not sure about powering, there must be some 18650 charger chips on ebay for pennies, or a usb power pack maybe..

[Image: yoQflcf.png]

Found it Paddy! This was the one - you were right! :-D

Guys, I need help ... once I create a link between ESP and SignalK, how do I get the link to Node Red? Do I need to code?

Pls help.

Bart
Reply
#36
(2020-01-16, 04:57 PM)BartStevens Wrote:
(2020-01-16, 04:55 PM)Ranur Wrote:
(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Cool

 ESP8266 , LCD display like one of these >
https://www.ebay.co.uk/sch/i.html?_nkw=4...noapp=true

And you have a  display costing a couple of beers to carry around! Just needs an enclosure. 

Esp is running easyEsp so simple to set up. Data is feed from Node-red in openplotter. This is just dummy data to see if it works.

 It does!  

Not sure about powering, there must be some 18650 charger chips on ebay for pennies, or a usb power pack maybe..

[Image: yoQflcf.png]

Found it Paddy! This was the one - you were right! :-D

Guys, I need help ... once I create a link between ESP and SignalK, how do I get the link to Node Red? Do I need to code?

Pls help.

Bart

That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. 

[Image: acttj25.png]
Reply
#37
(2020-01-16, 06:01 PM)PaddyB Wrote:
(2020-01-16, 04:57 PM)BartStevens Wrote:
(2020-01-16, 04:55 PM)Ranur Wrote:
(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Cool

 ESP8266 , LCD display like one of these >
https://www.ebay.co.uk/sch/i.html?_nkw=4...noapp=true

And you have a  display costing a couple of beers to carry around! Just needs an enclosure. 

Esp is running easyEsp so simple to set up. Data is feed from Node-red in openplotter. This is just dummy data to see if it works.

 It does!  

Not sure about powering, there must be some 18650 charger chips on ebay for pennies, or a usb power pack maybe..

[Image: yoQflcf.png]

Found it Paddy! This was the one - you were right! :-D

Guys, I need help ... once I create a link between ESP and SignalK, how do I get the link to Node Red? Do I need to code?

Pls help.

Bart

That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. 

[Image: acttj25.png]

Will look for the "Signalk -Subscribe", do not see it yet

Pls have a look at what I have now. I do not see anything coming in from Signalk ...
Reply
#38
(2020-01-16, 06:06 PM)BartStevens Wrote: That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. 

[Image: acttj25.png]

Will look for the "Signalk -Subscribe", do not see it yet

Pls have a look at what I have now. I do not see anything coming in from Signalk ...

Are you using the node-red signalk app? 
[Image: DEU2xhI.png]
Reply
#39
(2020-01-16, 06:13 PM)PaddyB Wrote:
(2020-01-16, 06:06 PM)BartStevens Wrote: That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. 

[Image: acttj25.png]

Will look for the "Signalk -Subscribe", do not see it yet

Pls have a look at what I have now. I do not see anything coming in from Signalk ...

Are you using the node-red signalk app? 
[Image: DEU2xhI.png]

Yeap ...

See what I'm looking at right now


Attached Files Image(s)
   
Reply
#40
(2020-01-16, 06:14 PM)BartStevens Wrote: Yeap ...

SigK nodes should be in there already...

[Image: K3OMemZ.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)