MQTT Import
Moderators: grovkillen, Stuntteam, TD-er
Re: MQTT Import
i did not tried to compile mqtt-import,
(as there is also an import -channel on the "normal" mqtt in espeasy, dont know if it get more open for more functions),
but i had normal compile issues with Core 2.3 on my arduino 1.6.5 IDE.
it worked with core 2.2.
may give IDE 1.6.5 and Core 2.2 a try, if this is the issue?
(as there is also an import -channel on the "normal" mqtt in espeasy, dont know if it get more open for more functions),
but i had normal compile issues with Core 2.3 on my arduino 1.6.5 IDE.
it worked with core 2.2.
may give IDE 1.6.5 and Core 2.2 a try, if this is the issue?
-
- Normal user
- Posts: 25
- Joined: 29 Apr 2016, 06:54
Re: MQTT Import
I am having the same problem as ricotrotter. I am using 1.6.5 with board version 2.2.0.
Code: Select all
ESPEasy.ino:249:29: error: no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&)'
ESPEasy.ino:249:29: note: candidates are:
In file included from ESPEasy.ino:214:0:
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:47:4: note: PubSubClient::PubSubClient(String, uint16_t)
PubSubClient(String hostname, uint16_t port = 1883);
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:47:4: note: no known conversion for argument 1 from 'WiFiClient' to 'String'
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:46:4: note: PubSubClient::PubSubClient(IPAddress&, uint16_t)
PubSubClient(IPAddress &ip, uint16_t port = 1883);
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:46:4: note: no known conversion for argument 1 from 'WiFiClient' to 'IPAddress&'
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:43:4: note: PubSubClient::PubSubClient()
PubSubClient();
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:43:4: note: candidate expects 0 arguments, 1 provided
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:16:7: note: PubSubClient::PubSubClient(const PubSubClient&)
class PubSubClient {
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:16:7: note: no known conversion for argument 1 from 'WiFiClient' to 'const PubSubClient&'
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:16:7: note: PubSubClient::PubSubClient(PubSubClient&&)
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:16:7: note: no known conversion for argument 1 from 'WiFiClient' to 'PubSubClient&&'
Controller.ino: In function 'void MQTTConnect()':
Controller.ino:75:14: error: 'class PubSubClient' has no member named 'setServer'
Controller.ino:76:14: error: 'class PubSubClient' has no member named 'setCallback'
Controller.ino:98:168: error: no matching function for call to 'PubSubClient::connect(const char*, char [26], char [64], const char*, int, int, const char [16])'
Controller.ino:98:168: note: candidates are:
In file included from ESPEasy.ino:214:0:
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:62:9: note: bool PubSubClient::connect(String)
bool connect(String id);
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:62:9: note: candidate expects 1 argument, 7 provided
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:65:9: note: bool PubSubClient::connect(String, String, uint8_t, bool, String)
bool connect(String id, String willTopic, uint8_t willQos, bool willRetain, String willMessage);
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:65:9: note: candidate expects 5 arguments, 7 provided
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:101:9: note: bool PubSubClient::connect(MQTT::Connect&)
bool connect(MQTT::Connect &conn);
^
C:\Users\garrem03\Documents\Arduino\libraries\pubsubclient\src/PubSubClient.h:101:9: note: candidate expects 1 argument, 7 provided
_P103_Event.ino: In function 'void Plugin_103_Action(byte, byte, int, int, byte)':
_P103_Event.ino:522:33: error: invalid conversion from 'char*' to 'byte {aka unsigned char}' [-fpermissive]
_P103_Event.ino:522:33: error: too few arguments to function 'void ExecuteCommand(byte, const char*)'
Command.ino:4:6: note: declared here
_P205_FrameOLED.ino: In function 'boolean Plugin_205(byte, EventStruct*, String&)':
_P205_FrameOLED.ino:210:34: error: no matching function for call to 'SSD1306Wire::init(int&)'
_P205_FrameOLED.ino:210:34: note: candidate is:
In file included from C:\Users\garrem03\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/SSD1306Wire.h:31:0,
from C:\Users\garrem03\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/SSD1306.h:30,
from _P205_FrameOLED.ino:30:
C:\Users\garrem03\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/OLEDDisplay.h:114:10: note: bool OLEDDisplay::init()
bool init();
^
C:\Users\garrem03\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/OLEDDisplay.h:114:10: note: candidate expects 0 arguments, 1 provided
_P205_FrameOLED.ino: In function 'void display_scroll(String*, String*, int)':
_P205_FrameOLED.ino:569:21: error: 'Dialog_Plain_12' was not declared in this scope
no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&)'
Re: MQTT Import
i tried it with arduino 1.6.5, core 2.20 and pubsubclient 1.9 and pubsub 2.6
always with errors.
the developer of mqtt-import-plugin should have a look an update his sources, i guess...
always with errors.
the developer of mqtt-import-plugin should have a look an update his sources, i guess...
Re: MQTT Import
Alas namirda hasn't been seen here since April 2016. Does anyone have a forwarding address?
At what point should someone else step in and take over the code?
At what point should someone else step in and take over the code?
Re: MQTT Import
I don't know if it will help, but check the ESP releases thread and maybe try R114.
Martinus wrote
"Because the current R108, marked stable, still contains some bugs, it would be better to replace it with a newer version. R114 is available for evaluation. We moved to a newer MQTT client, it may improve connection issues. We also moved to Arduino core 2.3.0 because the 2.1.0 has issues with the servo library.
With this build, only core 2.3.0 is supported, so you need to upgrade the core package. I had some issues with the core upgrade, so i decided to download and configure a brand new portable setup using Arduino 1.6.9 with a fresh core 2.3.0 install.
R114 has been running for a week now in my environment. I successfully upgraded all my unit's using OTA. (NodeMCU 1.0 and ESP-01 black editions)
Changes since R108:
// Cleanup code, conditional core 2.0.0/2.1.0 support removed, changed to core 2.3.0
// Bugfix in rules processing with multiple value devices, only the first value would work as expected
// Bugfix for timezones other than whole hours offset. It is now set in +/- minutes
// Bugfix parsing rfid (SENSOR_TYPE_LONG) values in parseTemplate function
// Improved Serial Server plugin, reconnect handling
// Improved thingspeak and emoncms plugins (contributed by pm-cz)
// Fix HTU21d timing
// Moved to pubsubclient 2.6 library (source no longer compatible with 1.9 library, so use the 2.6 version!)"
Martinus wrote
"Because the current R108, marked stable, still contains some bugs, it would be better to replace it with a newer version. R114 is available for evaluation. We moved to a newer MQTT client, it may improve connection issues. We also moved to Arduino core 2.3.0 because the 2.1.0 has issues with the servo library.
With this build, only core 2.3.0 is supported, so you need to upgrade the core package. I had some issues with the core upgrade, so i decided to download and configure a brand new portable setup using Arduino 1.6.9 with a fresh core 2.3.0 install.
R114 has been running for a week now in my environment. I successfully upgraded all my unit's using OTA. (NodeMCU 1.0 and ESP-01 black editions)
Changes since R108:
// Cleanup code, conditional core 2.0.0/2.1.0 support removed, changed to core 2.3.0
// Bugfix in rules processing with multiple value devices, only the first value would work as expected
// Bugfix for timezones other than whole hours offset. It is now set in +/- minutes
// Bugfix parsing rfid (SENSOR_TYPE_LONG) values in parseTemplate function
// Improved Serial Server plugin, reconnect handling
// Improved thingspeak and emoncms plugins (contributed by pm-cz)
// Fix HTU21d timing
// Moved to pubsubclient 2.6 library (source no longer compatible with 1.9 library, so use the 2.6 version!)"
-
- New user
- Posts: 7
- Joined: 23 Jul 2016, 17:03
Re: MQTT Import
Thanks for reply.
Though, I get no issue compiling ESPEasy normally.
It's the MQTT plugin that is having issue.
I will investigate further!
Though, I get no issue compiling ESPEasy normally.
It's the MQTT plugin that is having issue.
I will investigate further!
Re: MQTT Import
You could send him a PM and he should get a regular mail to it's registered email address.jsilver wrote:Alas namirda hasn't been seen here since April 2016. Does anyone have a forwarding address?
We have no policy for this. But if there is no response on PM, i can have a look. But remember that he might be on holiday (and so will i as of today...)jsilver wrote:At what point should someone else step in and take over the code?
What need's to be done, is a migration to make it compliant to the new api that came with the newer pubsub library.
Re: MQTT Import
Hi All,
Sorry about the silence but I have been busy on other projects for a while and did not realise how quickly stuff gets out of date in the ESPEasy world!
I have put an updated version of MQTTImport into the playground which runs with ESPEasy118, Core 2.3 and PubSub 2.6 - hopefully there will not be such frequent changes to the toolchain going forward!
Neil
Sorry about the silence but I have been busy on other projects for a while and did not realise how quickly stuff gets out of date in the ESPEasy world!
I have put an updated version of MQTTImport into the playground which runs with ESPEasy118, Core 2.3 and PubSub 2.6 - hopefully there will not be such frequent changes to the toolchain going forward!
Neil
-
- New user
- Posts: 7
- Joined: 23 Jul 2016, 17:03
Re: MQTT Import
Hi namirda,
thanks for the update!
I confirm I could compile it.
Not tested yet!
One only issue: string2float is duplicated from the extra_utilities files - I had to remove it manually as I need extra_utilities for other plugins.
Cheers
Rico
thanks for the update!
I confirm I could compile it.
Not tested yet!
One only issue: string2float is duplicated from the extra_utilities files - I had to remove it manually as I need extra_utilities for other plugins.
Cheers
Rico
Re: MQTT Import
Thank you Neil! I'll go and try it...namirda wrote:I have put an updated version of MQTTImport into the playground which runs with ESPEasy118, Core 2.3 and PubSub 2.6
See, that's what happens when you write some really useful code and then get on with the rest of your life!
Re: MQTT Import
Thank you Neil! For me it works with ESPEasy118..
It is possiible to import a string or On/OFF with the mqtt-plugin?
I need it to write the state in my oled...
-----
mosquitto_sub -t /# -v
/ESP_03/window1/state open
/ESP_03/window2/state OFF
/Alarmsytem/state disarm
---
MQTT-plugin Name: Window1 -- Topic 1:/ESP_03/window1 -- Value Name 1: -- Formula Value1: string(open)
oled-plugin Line1: Floor: [Window1#Value1]
----->
Oled Line1:
Floor: open
or
System: disarm
It is possiible to import a string or On/OFF with the mqtt-plugin?
I need it to write the state in my oled...
-----
mosquitto_sub -t /# -v
/ESP_03/window1/state open
/ESP_03/window2/state OFF
/Alarmsytem/state disarm
---
MQTT-plugin Name: Window1 -- Topic 1:/ESP_03/window1 -- Value Name 1: -- Formula Value1: string(open)
oled-plugin Line1: Floor: [Window1#Value1]
----->
Oled Line1:
Floor: open
or
System: disarm
Re: MQTT Import
This would be really useful.timsson wrote:It is possiible to import a string or On/OFF with the mqtt-plugin?
Also, I'm up and running with R118, OLED Framed, and MQTT-import too. Thanks Neil!
Re: MQTT Import
Hello!
I get this error when trying to install the plugin: I have Extra_Utilities in the same catalog:
C:\Users\Macke.BLUEBERRY\Documents\Arduino\libraries\ESPEasy\_P210_MQTTImport.ino: In function 'float string2float(String)':
_P210_MQTTImport:450: error: redefinition of 'float string2float(String)'
float string2float(String myString) {
^
Extra_Utilities:130: error: 'float string2float(String)' previously defined here
float string2float(String myString) {
I get this error when trying to install the plugin: I have Extra_Utilities in the same catalog:
C:\Users\Macke.BLUEBERRY\Documents\Arduino\libraries\ESPEasy\_P210_MQTTImport.ino: In function 'float string2float(String)':
_P210_MQTTImport:450: error: redefinition of 'float string2float(String)'
float string2float(String myString) {
^
Extra_Utilities:130: error: 'float string2float(String)' previously defined here
float string2float(String myString) {
Re: MQTT Import
Hi,
You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.
You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.
Re: MQTT Import
Thanks Now it´s working!namirda wrote:Hi,
You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.
This plugin was excatly what I was looking for. Great work
Re: MQTT Import
Hello,
Unfortunately I still have my problem.
Could someone help me to send a text with mqtt to the display?
Thanks
Unfortunately I still have my problem.
Could someone help me to send a text with mqtt to the display?
Thanks
Re: MQTT Import
I tried and had this issue. Tried the fix of deleting >string2float< but it throws out other errors that I don't understand.-macke- wrote:Thanks Now it´s working!namirda wrote:Hi,
You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.
This plugin was excatly what I was looking for. Great work
I am not sure of what exactly I should be deleting. just the string2float, the entire section of such. I have tried many combinations and read many pages but still have not found a fix.
I am using arduino ide latest version and tried with 1.6.5 as suggesting in a post.
deleted ide and all data files and used fresh install
used latest versions of easyesp and test versions. had no luck with the mqttimport
any help appreciated.
FWIW none of the links in the forum posts don't seem work.
tia
Code: Select all
Arduino: 1.6.13 Hourly Build 2016/09/30 06:12 (Mac OS X), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, 115200, 4M (3M SPIFFS)"
/Users/jpe/Documents/Arduino/ESPEasy/ESPEasy.ino: In function 'void setup()':
ESPEasy:547: error: 'PluginInit' was not declared in this scope
PluginInit();
^
ESPEasy:548: error: 'CPluginInit' was not declared in this scope
CPluginInit();
^
/Users/jpe/Documents/Arduino/ESPEasy/ESPEasy.ino: In function 'void loop()':
ESPEasy:657: error: 'PluginCall' was not declared in this scope
if (!PluginCall(PLUGIN_SERIAL_IN, 0, dummyString))
^
/Users/jpe/Documents/Arduino/ESPEasy/ESPEasy.ino: In function 'void run10TimesPerSecond()':
ESPEasy:686: error: 'PluginCall' was not declared in this scope
PluginCall(PLUGIN_TEN_PER_SECOND, 0, dummyString);
^
/Users/jpe/Documents/Arduino/ESPEasy/ESPEasy.ino: In function 'void runOncePerSecond()':
ESPEasy:734: error: 'PluginCall' was not declared in this scope
PluginCall(PLUGIN_ONCE_A_SECOND, 0, dummyString);
^
/Users/jpe/Documents/Arduino/ESPEasy/ESPEasy.ino: In function 'void SensorSendTask(byte)':
ESPEasy:872: error: 'PluginCall' was not declared in this scope
success = PluginCall(PLUGIN_READ, &TempEvent, dummyString);
^
/Users/jpe/Documents/Arduino/ESPEasy/ESPEasy.ino: In function 'boolean checkSystemTimers()':
ESPEasy:978: error: 'PluginCall' was not declared in this scope
if (!PluginCall(PLUGIN_WRITE, &TempEvent, systemCMDTimers[x].action))
^
/Users/jpe/Documents/Arduino/ESPEasy/Controller.ino: In function 'boolean sendData(EventStruct*)':
Controller:38: error: 'PluginCall' was not declared in this scope
PluginCall(PLUGIN_EVENT_OUT, event, dummyString);
^
/Users/jpe/Documents/Arduino/ESPEasy/Extra_Utilities.ino: At global scope:
Extra_Utilities:130: error: expected ')' before 'myString'
float (String myString) {
^
Multiple libraries were found for "Servo.h"
Used: /Users/jpe/Library/Arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Servo
Not used: /Applications/Arduino.app/Contents/Java/libraries/Servo
exit status 1
'PluginInit' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Re: MQTT Import
Hi Bassmint - Sorry, I don't come by this forum very often any more.
You must be doing something wrong here.
Just to be sure that there have been no breaking changes for MQTTImport in the last few months, I downloaded ESPEasy R147 from GitHub and added the version of MQTTImport from the playground into the sketch directory.
It compiled and ran without problems first time. There should be no need to delete anything. I was using Arduino 1.6.11
Good Luck
n
You must be doing something wrong here.
Just to be sure that there have been no breaking changes for MQTTImport in the last few months, I downloaded ESPEasy R147 from GitHub and added the version of MQTTImport from the playground into the sketch directory.
It compiled and ran without problems first time. There should be no need to delete anything. I was using Arduino 1.6.11
Good Luck
n
Re: MQTT Import
thanks
will try again
tried again and found the issue is with Arduino IDE on MacOS Sierra. Needed v 1.6.12.
went in ok.
thanks again
will try again
tried again and found the issue is with Arduino IDE on MacOS Sierra. Needed v 1.6.12.
went in ok.
thanks again
Re: MQTT Import
Thanks.
It work, i understand the operation.
On the other hand of the MQTT plugin with idx = "1", i have this error on domoticz,
To solve this problem, I create a fake switch "text" with idx = 1 (open database and change the idx)
It work, i understand the operation.
On the other hand of the MQTT plugin with idx = "1", i have this error on domoticz,
Code: Select all
2017-01-15 13:51:13.517 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"1"}
2017-01-15 13:51:13.517 Error: MQTT: unknown idx received!
Code: Select all
2017-01-15 14:01:32.042 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"1"}
2017-01-15 14:02:02.069 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"1"}
2017-01-15 14:02:32.098 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"1"}
2017-01-15 14:03:02.132 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"1"}
Re: MQTT Import
this plugin would be just what I need, unfortunately I cannot compile. searching the forum showed, that other users have the same problem but revealed no real solution.
I tried
arduino ide 1.8.1 / esp8266 package 2.3.0
arduino ide 1.6.5 / esp8266 package 2.0.0
as portable or installer version
on ESPEasy R120 / Wemos D1 4M (1M SPIFFS)
I need help -what else can I try?
edit Feb.24: - seems to work see:
viewtopic.php?f=4&t=1149&start=70#p13728
I tried
arduino ide 1.8.1 / esp8266 package 2.3.0
arduino ide 1.6.5 / esp8266 package 2.0.0
as portable or installer version
on ESPEasy R120 / Wemos D1 4M (1M SPIFFS)
I need help -what else can I try?
edit Feb.24: - seems to work see:
viewtopic.php?f=4&t=1149&start=70#p13728
Who is online
Users browsing this forum: Bing [Bot] and 10 guests