MQTT Import

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: MQTT Import

#41 Post by timsson » 06 Aug 2016, 12:46

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

User avatar
jsilver
Normal user
Posts: 23
Joined: 24 May 2016, 14:45
Location: Lewes, UK
Contact:

Re: MQTT Import

#42 Post by jsilver » 08 Aug 2016, 13:59

timsson wrote:It is possiible to import a string or On/OFF with the mqtt-plugin?
This would be really useful.

Also, I'm up and running with R118, OLED Framed, and MQTT-import too. Thanks Neil!

-macke-
Normal user
Posts: 20
Joined: 03 Sep 2016, 21:53

Re: MQTT Import

#43 Post by -macke- » 09 Sep 2016, 16:40

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) {

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: MQTT Import

#44 Post by namirda » 10 Sep 2016, 11:57

Hi,

You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.

-macke-
Normal user
Posts: 20
Joined: 03 Sep 2016, 21:53

Re: MQTT Import

#45 Post by -macke- » 12 Sep 2016, 08:18

namirda wrote:Hi,

You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.
Thanks :) Now it´s working!

This plugin was excatly what I was looking for. Great work :)

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: MQTT Import

#46 Post by timsson » 15 Nov 2016, 21:26

Hello,
Unfortunately I still have my problem.
Could someone help me to send a text with mqtt to the display?
Thanks

bassmint
New user
Posts: 9
Joined: 26 Nov 2015, 20:12

Re: MQTT Import

#47 Post by bassmint » 25 Nov 2016, 06:31

-macke- wrote:
namirda wrote:Hi,

You can delete string2float from extra_utilities - the function is duplicated in MQTT Import.
Thanks :) Now it´s working!

This plugin was excatly what I was looking for. Great work :)
I tried and had this issue. Tried the fix of deleting >string2float< but it throws out other errors that I don't understand.
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.

namirda
Normal user
Posts: 53
Joined: 22 Jan 2016, 17:09

Re: MQTT Import

#48 Post by namirda » 08 Dec 2016, 10:16

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

bassmint
New user
Posts: 9
Joined: 26 Nov 2015, 20:12

Re: MQTT Import

#49 Post by bassmint » 09 Dec 2016, 07:48

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

Jeff
Normal user
Posts: 26
Joined: 18 Nov 2016, 18:35

Re: MQTT Import

#50 Post by Jeff » 15 Jan 2017, 13:54

Thanks.

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!
To solve this problem, I create a fake switch "text" with idx = 1 (open database and change the idx)

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"}
:D

starfish
Normal user
Posts: 38
Joined: 16 Feb 2017, 23:46

Re: MQTT Import

#51 Post by starfish » 19 Feb 2017, 02:07

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 102 guests