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
#51
Doubt I shall ever back to the arduino ide after spending some time on micropython/thonny on esp 32's. Cool
Reply
#52
(2020-05-26, 01:02 PM)PaddyB Wrote: Doubt I shall ever back to the arduino ide after spending some time on micropython/thonny on esp 32's. Cool

Paddy, can you share some more details about that setting?

Bart
Reply
#53
(2020-05-26, 01:19 PM)BartStevens Wrote:
(2020-05-26, 01:02 PM)PaddyB Wrote: Doubt I shall ever back to the arduino ide after spending some time on micropython/thonny on esp 32's. Cool

Paddy, can you share some more details about that setting?

Bart

Fair bit of work to do yet but this works. Though haven't checked th rpm sensor yet. 
https://github.com/boatybits/boatymonpy
Thonny is the ide, it will load micropython onto the esp as well
Reply
#54
Hi guys,

Pretty new to all this OpenPlotter and SignalK stuff but very eager to learn. Basically, I'm trying to get ESP Easy (with DS18B20 sensor hooked up) to communicate with SignalK.

I know the DS18B20 is working : temperatures are displayed in the ESP Easy log tool!

On the other hand, I can't, for the life of me, get it to communicate with the Raspberry Pi/SignalK. Tried UDP : doesn't work (but as I read in a previous reply in this thread this seems to be a problem with OP 2.0). However as leif_klasson wrote MQTT should work but I don't know how to set it up.

Would someone help me figure out the steps/settings to put both in SignalK and Easy ESP to make this work?

I'm using :
- Raspberry Pi 3
- OpenPlotter 2 (March 24, 2020 version)
- Installed signalk-mqtt-gw app in SignalK
- ESP Easy Mega (Build 20106 downloaded in May 2020)

Thanks!
Reply
#55
(2020-06-04, 02:49 AM)denderah Wrote: Hi guys,

Pretty new to all this OpenPlotter and SignalK stuff but very eager to learn. Basically, I'm trying to get ESP Easy (with DS18B20 sensor hooked up) to communicate with SignalK.

I know the DS18B20 is working : temperatures are displayed in the ESP Easy log tool!

On the other hand, I can't, for the life of me, get it to communicate with the Raspberry Pi/SignalK. Tried UDP : doesn't work (but as I read in a previous reply in this thread this seems to be a problem with OP 2.0). However as leif_klasson wrote MQTT should work but I don't know how to set it up.

Would someone help me figure out the steps/settings to put both in SignalK and Easy ESP to make this work?

I'm using :
- Raspberry Pi 3
- OpenPlotter 2 (March 24, 2020 version)
- Installed signalk-mqtt-gw app in SignalK
- ESP Easy Mega (Build 20106 downloaded in May 2020)

Thanks!

I know that the Dev Team are still working on IOT for OpenPlotter but it is still possible to hook up ESP8266 into OP2 using MQTT
(I have 5 ESP's connected including one carrying 3 x DS18B20's which measure engine temperatures)
I don't know if its the "right" way but I bring the MQTT data from the ESP's into Node-Red and then send out to my Node-Red dashboard and the SK server

Just a few quick pointers which may help ...

Tick "Run local broker" in MQTT gateway plugin config in SignalK
(Your ESP then has an MQTT broker to subscribe to)
Install Node Red Plugin in SignalK
(You can then configure an MQTT input node to see the data coming from the ESP)
In ESPEasy set controller protocol to OpenHab MQTT
Connect a SK "signalk-send-pathvalue" node to send the MQTT out to SK

   
Reply
#56
Hi, I changed my EspEasy now from UDP to MQTT for the moment. My OP/SK2 seems to freeze when using UDP?

See images for values/examples.

Very simple, how to do it:
1. Setup OP and SK as always
2. Add Sk/MQTT addon
3. In EspEasy, add a openhab MQTT controller:
4. Add connection to OP server
5. Set topic to vessels/self/%valname%, this set correct topic according to signalk spec, if the device has correct valuename
6. Add Last Will =LW info if you like, don,t needed, but good for debug issues.
7. Add a device:
NB! Temperature is in Kelvin, therefore tempvalue + 273.15
8. Connect the device to correct controller, nr 1 in my example.
9. Take a look in SignalK server and enjoy!!

Now you can just add more devices, with correct SignalK path, then all will work directly!

In EspEasy, you can go to Tools: Log to see what and when devices are used. Also, go to Tool:System Variables, to check what variable names you can use.

Start using both an ESP32 with own code and EspEasy to my OP/SK server.
Good luck!
/Leif


Attached Files Image(s)
                   
Reply
#57
(2020-06-04, 12:35 PM)leif_klasson@hotmail.com Wrote: Hi, I changed my EspEasy now from UDP to MQTT for the moment. My OP/SK2 seems to freeze when using UDP?

See images for values/examples.

Very simple, how to do it:
1. Setup OP and SK as always
2. Add Sk/MQTT addon
3. In EspEasy, add a openhab MQTT controller:
4. Add connection to OP server
5. Set topic to vessels/self/%valname%, this set correct topic according to signalk spec, if the device has correct valuename
6. Add Last Will =LW info if you like, don,t needed, but good for debug issues.
7. Add a device:
NB! Temperature is in Kelvin, therefore tempvalue + 273.15
8. Connect the device to correct controller, nr 1 in my example.
9. Take a look in SignalK server and enjoy!!

Now you can just add more devices, with correct SignalK path, then all will work directly!

In EspEasy, you can go to Tools: Log to see what and when devices are used. Also, go to Tool:System Variables, to check what variable names you can use.

Start using both an ESP32 with own code and EspEasy to my OP/SK server.
Good luck!
/Leif
Leif
Thanks - thats helped me too.
My setup was overcomplicated - now much simpler
Reply
#58
Hi,

So tonight I setup ESP Easy as per Leif's values/exemple : typed in exactly the same stuff as per the various pictures, to the letter!

In SignalK's Plugin config, I setup "Signal K - MQTT Gateway" :
- Checked "Active"
- Checked "Run local server (publish...)"
- Put 1883 as Local server port

Nothing shows up in SignalK server/Data Browser. When I look in ESP Easy's log tool, I get a temperature reading and the following message :

1700005: DS   : Temperature: 23.00 (28-81-34-f0-1b-19-1-a2)
1700059: MQTT : Intentional reconnect
1701119: MQTT : Broker C005 connection failed (1440/0)

Obviously the ESP isn't connecting to the Pi. Any ideas why? Aside the 3 things I did to configure the "SignalK-MQTT Gateway" plugin, do I need to do something else in SignalK or ESP Easy?

Thanks!
Reply
#59
(2020-06-05, 03:05 AM)denderah Wrote: Hi,

So tonight I setup ESP Easy as per Leif's values/exemple : typed in exactly the same stuff as per the various pictures, to the letter!

In SignalK's Plugin config, I setup "Signal K - MQTT Gateway" :
- Checked "Active"
- Checked "Run local server (publish...)"
- Put 1883 as Local server port

Nothing shows up in SignalK server/Data Browser. When I look in ESP Easy's log tool, I get a temperature reading and the following message :

1700005: DS   : Temperature: 23.00 (28-81-34-f0-1b-19-1-a2)
1700059: MQTT : Intentional reconnect
1701119: MQTT : Broker C005 connection failed (1440/0)

Obviously the ESP isn't connecting to the Pi. Any ideas why? Aside the 3 things I did to configure the "SignalK-MQTT Gateway" plugin, do I need to do something else in SignalK or ESP Easy?

Thanks!
Im not an expert but my ESP- SK does work so just a few thoughts.
(Someone may have some better ideas)

Your ESP is logged onto the same network right?
Mine logon to the OP Access point at 10.10.10.1
You are using OpenHab as the Controller Protocol on 10.10.10.1:1883 ? and it is enabled ?

Does the SK server log show your client has having connected ?
My log shows 
Jun 05 11:11:41 client connected ESPClient_60:01:94:41:29:25
When the ESP connects

Might be worth trying another MQTT client to verify the OP/SK broker is running OK
I use the Chrome App "MQTT Lens" on my laptop (subscribe to # to see all traffic) to debug MQTT traffic
Reply
#60
(2020-06-05, 03:05 AM)denderah Wrote: Hi,

So tonight I setup ESP Easy as per Leif's values/exemple : typed in exactly the same stuff as per the various pictures, to the letter!

In SignalK's Plugin config, I setup "Signal K - MQTT Gateway" :
- Checked "Active"
- Checked "Run local server (publish...)"...............
Hi, as previous post noted, check mqtt connection in signalk log. Also, if you install MQTT Publisher/Subscriber, you can easily see what is coming in.
In EspEasy, the device and controller are enabled? And, the device need to be "connected" to the correct controller?

Try this one in your raspberry:
mosquitto_sub -v -h localhost -t "#"

First you need to install the mosquitto_sub, ( https://appcodelabs.com/introduction-to-...spberry-pi).
-v means you will see the path and value.
-t "#" is wildcard for any topic.
Should give something ike this:

vessels/self/environment.inside.main.relativeHumidity 36

vessels/self/environment.inside.mainCabin.temperature 295

you can of course also publish to MQTT to test the signalk/MQTT function

Are you using any any MQTT user/pwd? I guess not.
In Espeasy log you should see:
12125489: DHT : Temperature: 21.00
12125489: DHT : Humidity: 35.00
12125495: EVENT: DHT11#environment.inside.mainCabin.temperature=294.15
12125501: EVENT: DHT11#environment.inside.main.relativeHumidity=35.00
The first two rows "DHT" is from the sensor itself, the last one are the actual EVENT that are sent to MQTT.
/Leif
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)