That's what that flag was introduced for, some time ago, when not having another process connected & listening at the TCP port of the plugin.giorgino wrote: ↑13 Dec 2022, 23:32 hey something happend: it was "locked", with MQTT explorer muted, than I connect PUTTY to the telnet port.
data stars to flow on the monitor of Putty and at the same time mqtt explorer starts to reporte the flow !
Is this useful for your debug?
----------------the flag!!!!! connected client?????
ESP Easy Ser2net no message in MQTT (P020)
Moderators: grovkillen, Stuntteam, TD-er
Re: ESP Easy Ser2net no message in MQTT (P020)
/Ton (PayPal.me)
Re: ESP Easy Ser2net no message in MQTT (P020)
I've added a feature to the plugin to be able to replace spaces or newlines by a different character, updated .bin can be downloaded from here: https://github.com/letscontrolit/ESPEas ... 3698876078 (Binaries.zip)
Can you (also) test the P1 WiFi Gateway plugin (P044)? (when having an energy meter available that uses the P1 protocol)
Can you (also) test the P1 WiFi Gateway plugin (P044)? (when having an energy meter available that uses the P1 protocol)
/Ton (PayPal.me)
Re: ESP Easy Ser2net no message in MQTT (P020)
I download the files and I get an error in PlatformIO (Core 6.16 Home 3.4.4 and Visual Studio Code 1.78.2)
"Assembler messages:
Fatal error: can't create .pio\build\normal_ESP8266_4M1M\libb53\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library.cpp.o: No such file or directory
*** [.pio\build\normal_ESP8266_4M1M\libb53\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library.cpp.o] Error 1"
I have no problem with the latest ESPEasy 20230508
"Assembler messages:
Fatal error: can't create .pio\build\normal_ESP8266_4M1M\libb53\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library.cpp.o: No such file or directory
*** [.pio\build\normal_ESP8266_4M1M\libb53\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library\SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library.cpp.o] Error 1"
I have no problem with the latest ESPEasy 20230508
- Attachments
-
- ErrorPlatformIO.JPG (125.12 KiB) Viewed 7856 times
Re: ESP Easy Ser2net no message in MQTT (P020)
Recently there was some breaking change in PlatformIO 6.17, so I had to change a few things to make it work with the latest PlatformIO again.
So I wonder what you're trying to do here?
Why trying to compile older code, or using an older PlatformIO version?
How did you download the source? Check the libs are included in the download and if not please use the "Code" button on the main repo page: https://github.com/letscontrolit/ESPEasy
This allows you to download everything in the repo in a single ZIP file.
And also don't copy files of just any version over an existing folder with a previous download or else you may have some file duplicates when a file was moved or renamed.
So I wonder what you're trying to do here?
Why trying to compile older code, or using an older PlatformIO version?
How did you download the source? Check the libs are included in the download and if not please use the "Code" button on the main repo page: https://github.com/letscontrolit/ESPEasy
This allows you to download everything in the repo in a single ZIP file.
And also don't copy files of just any version over an existing folder with a previous download or else you may have some file duplicates when a file was moved or renamed.
Re: ESP Easy Ser2net no message in MQTT (P020)
I had problems/errors with 6.17 so I have downgrade PlatformIO to 6.16 (also needed for older projects)
(see https://letscontrolit.com/forum/viewtop ... mio#p64514)
I want to use MQTT with ser2net so I follow the link https://github.com/letscontrolit/ESPEas ... 3698876078
Source code (probably changed) https://github.com/tonhuisman/ESPEasy-1 ... out-client
Change log P020 (missing on new source P020 file?)
(see https://letscontrolit.com/forum/viewtop ... mio#p64514)
I want to use MQTT with ser2net so I follow the link https://github.com/letscontrolit/ESPEas ... 3698876078
Source code (probably changed) https://github.com/tonhuisman/ESPEasy-1 ... out-client
Change log P020 (missing on new source P020 file?)
- Attachments
-
- changeLog020.JPG (77.42 KiB) Viewed 7843 times
Re: ESP Easy Ser2net no message in MQTT (P020)
When you look at the commits for that pull request, you'll see the commits since 2023-03-25 were just 'merge mega' commits or in other words they are just to keep the PR in sync with other merges to the main branch.
So no changes since the 25th seem OK to me.
Downloading ZIP files is always a bit tricky as you never know whether you create issues by not deleting previous files which have been renamed.
The better way is to use any Git tool to checkout specific branches.
I myself am very pleased with GitKraken (can be used for free for personal/open source projects)
But there are many other Git tools available.
So no changes since the 25th seem OK to me.
Downloading ZIP files is always a bit tricky as you never know whether you create issues by not deleting previous files which have been renamed.
The better way is to use any Git tool to checkout specific branches.
I myself am very pleased with GitKraken (can be used for free for personal/open source projects)
But there are many other Git tools available.
Re: ESP Easy Ser2net no message in MQTT (P020)
I allays download and extract in a new directory.
Normally no problem
How can I test ser2net with MQTT?
I use ESP32 and ESP12
Normally no problem
How can I test ser2net with MQTT?
I use ESP32 and ESP12
Re: ESP Easy Ser2net no message in MQTT (P020)
I have never used this Ser2Net plugin myself, but it looks like it will send out an event per received line of text.
Such an event looks like it will be something like this:
For received code like "bla"
There seems to be an event like this per piece of text until there is a newline, or the buffer is full.
In rules this should be available as %eventpar%
See: https://espeasy.readthedocs.io/en/lates ... r-eventpar
N.B. this is what I take from reading the source code, never tried it myself.
Such an event looks like it will be something like this:
Code: Select all
!Serial#bla
There seems to be an event like this per piece of text until there is a newline, or the buffer is full.
In rules this should be available as %eventpar%
See: https://espeasy.readthedocs.io/en/lates ... r-eventpar
N.B. this is what I take from reading the source code, never tried it myself.
Re: ESP Easy Ser2net no message in MQTT (P020)
I am lost. (please look at the history of this topic)
This topic start by me, ser2net is not working with MQTT
There is a PR (#4097), but the source code (https://github.com/tonhuisman/ESPEasy-1 ... out-client) does not work ( building bin file with PlatformIO)
See (other message) https://letscontrolit.com/forum/viewtop ... lem#p63251
I want to test the "pull request"
This topic start by me, ser2net is not working with MQTT
There is a PR (#4097), but the source code (https://github.com/tonhuisman/ESPEasy-1 ... out-client) does not work ( building bin file with PlatformIO)
See (other message) https://letscontrolit.com/forum/viewtop ... lem#p63251
I want to test the "pull request"
- Attachments
-
- ser2net_mqtt.JPG (81.82 KiB) Viewed 7827 times
Re: ESP Easy Ser2net no message in MQTT (P020)
I've pulled the mega branch into the PR, so a new build is cooking. You can download it from this Actions run in a short while.fredduin wrote: ↑01 Jun 2023, 17:50 There is a PR (#4097), but the source code (https://github.com/tonhuisman/ESPEasy-1 ... out-client) does not work ( building bin file with PlatformIO)
See (other message) https://letscontrolit.com/forum/viewtop ... lem#p63251
I want to test the "pull request"
NB: I have added a chapter Get a pull request by someone else on your system in the PlatformIO / development documentation, some months ago, on how to pull a specific PR to your system if you would want to create a specific Custom build from that.
/Ton (PayPal.me)
Re: ESP Easy Ser2net no message in MQTT (P020)
Thanks so much for all the help in this thread.
I recently installed the 20240229 - Mega with the Communication - Serial Server to read data from my P1 port.
Domoticz has direct access to this communication serial server, but I also wanted a second controller (Homeassistant) to be able to see the data.
By putting the Communication - Serial Server Event Processing on 'Generic' and adding the rule:
All the data is now shown by my MQTT broker and Homeassistant is able to retrieve data from it.
has been recently added to Publish with Retain, however this seems not to work for !serial but does work for other mqtt messages that is publish.
To process it I only needed to create some interpretation rules.
https://github.com/sincze/Homeassistant ... nergy.yaml
I recently installed the 20240229 - Mega with the Communication - Serial Server to read data from my P1 port.
Domoticz has direct access to this communication serial server, but I also wanted a second controller (Homeassistant) to be able to see the data.
By putting the Communication - Serial Server Event Processing on 'Generic' and adding the rule:
Code: Select all
on !Serial* do // Include * to process string values
PublishR,ESP_Easy/%sysname%/P1,%eventvalue%
endon
Code: Select all
PublishR
To process it I only needed to create some interpretation rules.
https://github.com/sincze/Homeassistant ... nergy.yaml
Re: ESP Easy Ser2net no message in MQTT (P020)
Thanks for sharing your info and configuration, that'll be helpful to a lot of people.
But this remark is unclear to me:
You can of course add a line
to your event, to see what's actually sent in the logging.
But this remark is unclear to me:
I don't see the relation between the PublishR command and !serial, other than to publish data to the MQTT server. Why wouldn't it send out the message?
You can of course add a line
Code: Select all
logentry,'Sending to MQTT: %eventvalue%'
/Ton (PayPal.me)
Re: ESP Easy Ser2net no message in MQTT (P020)
Let me try to explain.Ath wrote: ↑04 Mar 2024, 21:04 Thanks for sharing your info and configuration, that'll be helpful to a lot of people.
But this remark is unclear to me:I don't see the relation between the PublishR command and !serial, other than to publish data to the MQTT server. Why wouldn't it send out the message?
You can of course add a lineto your event, to see what's actually sent in the logging.Code: Select all
logentry,'Sending to MQTT: %eventvalue%'
It publishes !serial message just fine
However retain flag is not set. I just dont see that with mqtt browser.
The other messages that i publish with same command publishr do set the Retain flag.
Re: ESP Easy Ser2net no message in MQTT (P020)
Hm, can this be a setting on HA side, not retaining messages larger then a specific size? As I've been unable to find something similar in ESPEasy, and as it was me that added the PublishR command, I'm pretty sure there's no special condition for the retain flag not being set for the PublishR command iow: PublishR always sends out the message with the retain flag set.
/Ton (PayPal.me)
Re: ESP Easy Ser2net no message in MQTT (P020)
Sir I am truly happy with your modification and can thank you enough.Ath wrote: ↑04 Mar 2024, 23:24 Hm, can this be a setting on HA side, not retaining messages larger then a specific size? As I've been unable to find something similar in ESPEasy, and as it was me that added the PublishR command, I'm pretty sure there's no special condition for the retain flag not being set for the PublishR command iow: PublishR always sends out the message with the retain flag set.
Please find attached the rules I used with PublishR and the monitored result in MQTT Browser. As you can see for FLOW it sets RETAINED flag the other for P1 it did not.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests