OLED Scrolling Display

Moderators: grovkillen, Stuntteam, TD-er

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

OLED Scrolling Display

#1 Post by namirda » 02 Apr 2016, 02:53

I have another plugin which some people may find useful.

The plugin is a modified version of the OLED SSD1306 which allows for larger fonts and scrolling frames

The original version of the OLED plugin allowed for 8 lines of text to be displayed at once – but the small size of the display meant that the font was very small. This plugin allows lines to be displayed at a larger font by scrolling through the lines in groups or ‘frames’.

The plugin allows for 12 lines of text to be displayed in ‘frames’ of either 1, 2 or 4 lines. So for example, if you select 2 lines per frame then lines 1&2 will be displayed together followed by 3&4 followed by 5&6 etc. If you choose 4 lines per frame then 1&2&3&4 will be displayed together followed by 5&6&7&8 etc. The font size is automatically made larger when fewer lines are displayed in a frame.

The image (sorry about the poor photo! )below shows the first frame with 2 lines per frame selected:

Image

The image below shows the configuration for the display shown above:

Image

The standard configuration parameter 'Delay' specifies the time interval between frame changes - between 5 and 10 seconds works well.

If you would like to try this plugin then download the files _P205_FrameOLED.ino and Extra_Utilities.ino from the ESPEasyPlayground which you can find at :

https://github.com/ESP8266nu/ESPEasyPluginPlayground

and add them to your project. You will also need to download the library esp8266-oled-ssd1306.zip which you can also find in the playground – the library should be unzipped and added to your local libraries folder. The library was written by ‘Squix78’ and you can find his original library on Github at :

https://github.com/squix78/esp8266-oled-ssd1306

I have had to make one small alteration to his library in order for it to work with this plugin and so please use the modified version from the ESPEasyPluginPlayground.

Be aware that there is one possible complication! Due to the larger fonts, extra library and large webserver configuration, this plugin uses more SRAM than most other plugins and you may crash the stack due to a SRAM shortage when you try to configure it. If that happens or if the webserver configuration misbehaves then please try inserting one line into Webserver.ino as follows:

Immediately after the line

String reply=””;

which you will find at about line number 768 (varies a bit with release), insert the following line

reply.reserve(12000);

That should hopefully fix the problem!

Please let me know if you have more problems.

N
Last edited by namirda on 03 Apr 2016, 12:14, edited 2 times in total.

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: OLED Scrolling Display

#2 Post by msev » 02 Apr 2016, 11:24

This is also a really cool plugin, if you'll be willing to make me those mqtt plugin bin's I'll maybe ask you also for these ones :D

morle
Normal user
Posts: 17
Joined: 30 Jan 2016, 08:50
Location: Germany

Re: OLED Scrolling Display

#3 Post by morle » 02 Apr 2016, 11:26

That's what i was looking for.
After some trouble in compiling and flshing it's working great.
Thanks.

Hubert

fluppie
Normal user
Posts: 89
Joined: 09 Oct 2015, 13:23

Re: OLED Scrolling Display

#4 Post by fluppie » 02 Apr 2016, 15:32

Def. going to look into this. A web configurable MQTT display is so cool :). Great work!

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: OLED Scrolling Display

#5 Post by grz3 » 03 Apr 2016, 11:37

hm, i got these errors when try to compile under ide 1.6.5 and esp2.1.0 core:
added esp8266-oled-ssd1306 to local libs...

_P205_FrameOLED.ino: In function 'boolean Plugin_205(byte, EventStruct*, String&)':
_P205_FrameOLED.ino:375:46: error: 'string2Integer' was not declared in this scope
_P205_FrameOLED.ino:379:69: error: 'getValueNameIndex' was not declared in this scope
_P205_FrameOLED.ino:419:50: error: 'CheckParam' was not declared in this scope
'string2Integer' was not declared in this scope

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

Re: OLED Scrolling Display

#6 Post by namirda » 03 Apr 2016, 12:07

Hi,

Sorry. You need to include the file 'Extra_Utilities.ino' in your sketch - It is available in the playground. It is required for both my plugins.

N

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: OLED Scrolling Display

#7 Post by grz3 » 03 Apr 2016, 15:15

super. working now great...

fluppie
Normal user
Posts: 89
Joined: 09 Oct 2015, 13:23

Re: OLED Scrolling Display

#8 Post by fluppie » 03 Apr 2016, 15:45

I have it working 8-) . Now I'm looking for a way to use a existing input (pir sensor) as display button. So when someone walks by, the OLED turns on.

morle
Normal user
Posts: 17
Joined: 30 Jan 2016, 08:50
Location: Germany

Re: OLED Scrolling Display

#9 Post by morle » 04 Apr 2016, 07:49

Hi,
I am able to control the Display with these commands:

Code: Select all

http://<ESP IP address>/control?cmd=oledcmd,on
http://<ESP IP address>/control?cmd=oledcmd,off
But displaying some text seems different. With this command for example:

Code: Select all

http://<ESP IP address>/control?cmd=oled,4,1,Test
When using 4 lines i see the word "Test" in the third row in the floating part which is shown right now.
If i use row 6 it is the same.

Code: Select all

http://<ESP IP address>/control?cmd=oled,1,1,Test
When using 4 lines i see the word "Test" in the first row in the floating part which is shown right now.

Is there a way to control not only the row and colum but also the screen number which is shown.
Regards
Hubert

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

Re: OLED Scrolling Display

#10 Post by namirda » 09 Apr 2016, 10:14

I have uploaded a new version of the Scrolling OLED plugin to the playground.

The only change is the addition of a small Wifi Strength Indicator graphic in the top right corner - I saw this had been requested by somebody and it was easy to do. The number of bars is calculated as (RSSI+100)/8 - perhaps a bit simplistic but it roughly matches what my PC shows.

If you want to try the new release, please re-download the OLED library from the playground again because there are related changes there too.

N

MiKa1975
Normal user
Posts: 17
Joined: 03 Dec 2015, 13:37

Re: OLED Scrolling Display

#11 Post by MiKa1975 » 09 Apr 2016, 15:35

Hi,
not possible to compile...
////////////////////////////////////////////////////////////////////////
_P205_FrameOLED:372: error: 'PLUGIN_COMMAND' was not declared in this scope

case PLUGIN_COMMAND:

^

exit status 1
invalid conversion from 'char*' to 'byte {aka unsigned char}' [-fpermissive]
///////////////////////////////////////////////////////////////////////

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

Re: OLED Scrolling Display

#12 Post by timsson » 09 Apr 2016, 16:45

mayby
#define PLUGIN_COMMAND 999

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

Re: OLED Scrolling Display

#13 Post by namirda » 09 Apr 2016, 22:21

Sorry - fixed now. That's the second time I have made that mistake!!!

N

User avatar
hilo90mhz
Normal user
Posts: 11
Joined: 29 Mar 2016, 21:21
Location: Hilo, Hawaii
Contact:

Re: OLED Scrolling Display

#14 Post by hilo90mhz » 10 Apr 2016, 01:53

This is great! Will be using it on my future projects with ESPEasy :) Thanks!

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: OLED Scrolling Display

#15 Post by msev » 10 Apr 2016, 10:34

So namrida how fast does the values scrool from one value to another? I see that "Rotation" parameter is that the scrolling rate, and how much do the different values differ?

pppp33
Normal user
Posts: 71
Joined: 25 Oct 2015, 17:53

Re: OLED Scrolling Display

#16 Post by pppp33 » 10 Apr 2016, 10:52

Hi namirda,
I made the plugin run, but i can't get an uptime longer than 10-15 min (4 pages: temp, humi, free mem, uptime).
After some minutes the esp reboots....
It's only my esp's issue ?
regards
paolo

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

Re: OLED Scrolling Display

#17 Post by namirda » 10 Apr 2016, 11:56

@ppp33 I can't really help you - it seems to run well for me. I have two units which have been running without problems for several days.

This plugin uses 3 different fonts, some simple graphics and some scrolling and so it is more resource hungry than most other plugins. However, so far I have not had problems with it. Does your display show plenty of memory?

N

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

Re: OLED Scrolling Display

#18 Post by namirda » 10 Apr 2016, 11:59

@msev

On my units, it takes about 2 seconds to scroll from one frame to the other. The time between frame changes is determined by the Delay parameter.

N

msev
Normal user
Posts: 33
Joined: 13 Feb 2016, 18:24

Re: OLED Scrolling Display

#19 Post by msev » 10 Apr 2016, 14:50

Lol I missed that delay setting :), I'm so funny :), need to look better next time to avoid asking stupid questions hehe.

pppp33
Normal user
Posts: 71
Joined: 25 Oct 2015, 17:53

Re: OLED Scrolling Display

#20 Post by pppp33 » 10 Apr 2016, 21:53

@namirda
it says about 25-26 Kbytes free....
I'm going to ide 1.6.8 and recompile, to see if it goes better....
regards
paolo

pppp33
Normal user
Posts: 71
Joined: 25 Oct 2015, 17:53

Re: OLED Scrolling Display

#21 Post by pppp33 » 11 Apr 2016, 00:41

recompiled, added reserve command, and just got 78 min without reboot !
regards...
paolo

vmfs1968
Normal user
Posts: 42
Joined: 18 Oct 2015, 23:51

Re: OLED Scrolling Display

#22 Post by vmfs1968 » 11 Apr 2016, 13:31

Hello
this is working but has a problem
continues to reset itself
and does more to navigate the menus

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

Re: OLED Scrolling Display

#23 Post by namirda » 11 Apr 2016, 23:52

I have made some changes to this plugin to match the changes in ESPEasy R99. New version V0.3 is available in the playground.

N

machnetz
New user
Posts: 2
Joined: 24 Apr 2016, 11:50

Re: OLED Scrolling Display

#24 Post by machnetz » 24 Apr 2016, 12:23

Hi,

cool work - thank you! That is what i'm looking for. But after spending some days to compile it - can you tell me which constellation of software / versions (Arduino IDE,Libs ...) you are using?
I'm using Linux / Mac OSX and only able to compile ESPEasy R78 under Linux/OSX with Arduino IDE 1.6.5 and ESP8266 Community version 2.0.0.

Can you describe in short words what i have to install (yes, you've described i above), but what do i have to copy where to and configure it correctly?
Or - can you share me a compiled binary? :-)

Kind regard, machnetz

machnetz
New user
Posts: 2
Joined: 24 Apr 2016, 11:50

Re: OLED Scrolling Display

#25 Post by machnetz » 24 Apr 2016, 13:25

Got it!

I'm using Arduino IDE 1.6.5 and ESP8266 Community v2.1.0 on OSX and Linux, but *renaming* the old oled-file to _P023_OLED.ino.bak. After compiling and uploading it's up and running now !

Regards, machnetz

Allycat1972
Normal user
Posts: 25
Joined: 19 Apr 2016, 11:12

Re: OLED Scrolling Display

#26 Post by Allycat1972 » 30 Apr 2016, 10:13

morle wrote:Hi,
I am able to control the Display with these commands:

Code: Select all

http://<ESP IP address>/control?cmd=oledcmd,on
http://<ESP IP address>/control?cmd=oledcmd,off
But displaying some text seems different. With this command for example:

Code: Select all

http://<ESP IP address>/control?cmd=oled,4,1,Test
When using 4 lines i see the word "Test" in the third row in the floating part which is shown right now.
If i use row 6 it is the same.

Code: Select all

http://<ESP IP address>/control?cmd=oled,1,1,Test
When using 4 lines i see the word "Test" in the first row in the floating part which is shown right now.

Is there a way to control not only the row and colum but also the screen number which is shown.
Regards
Hubert
Hello everyone. I love this plug-in and I would also like to know if you can post a value to a particular row. I have a heating control which scrolls between Current Temperature and Humidity (local DHT11) but would like to send the Heating Setpoint value (Temp) to another scrolling screen. So it would scroll: Temp (20C), Humidity (40%), Setpoint (21). Is it possible to post a http command which populates a variable which could be substituted in one of the rows? Like %IP% does, etc. Many thanks for your hard work. Andy

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: OLED Scrolling Display

#27 Post by tozett » 22 May 2016, 11:16

hi,
i played with my oled on the espeasy.
little boring to be limited to text-lines...but someone experienced this and expanded the plugin. cool!

now i found this lib:

https://vimeo.com/152737421
https://github.com/squix78/esp8266-oled-ssd1306


may an experienced dev can use it to expand the plugin "more"..
:D :D :D

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

Re: OLED Scrolling Display

#28 Post by jsilver » 26 May 2016, 00:05

Allycat1972 wrote:
morle wrote:Hello everyone. I love this plug-in and I would also like to know if you can post a value to a particular row. I have a heating control which scrolls between Current Temperature and Humidity (local DHT11) but would like to send the Heating Setpoint value (Temp) to another scrolling screen. So it would scroll: Temp (20C), Humidity (40%), Setpoint (21). Is it possible to post a http command which populates a variable which could be substituted in one of the rows? Like %IP% does, etc. Many thanks for your hard work. Andy
Me too. This plugin will be so useful if only we can change the text dynamically by sending HTTP or MQTT messages. Is this currently supported or planned functionality?

Thanks for your brilliant work! :)

Allycat1972
Normal user
Posts: 25
Joined: 19 Apr 2016, 11:12

Re: OLED Scrolling Display

#29 Post by Allycat1972 » 02 Jun 2016, 11:23

jsilver wrote:
Allycat1972 wrote:
morle wrote:Hello everyone. I love this plug-in and I would also like to know if you can post a value to a particular row. I have a heating control which scrolls between Current Temperature and Humidity (local DHT11) but would like to send the Heating Setpoint value (Temp) to another scrolling screen. So it would scroll: Temp (20C), Humidity (40%), Setpoint (21). Is it possible to post a http command which populates a variable which could be substituted in one of the rows? Like %IP% does, etc. Many thanks for your hard work. Andy
Me too. This plugin will be so useful if only we can change the text dynamically by sending HTTP or MQTT messages. Is this currently supported or planned functionality?

Thanks for your brilliant work! :)
FYI. If you use the MQTT import function in the ESP Playground you can subscribe to MQTT topics and use the values in the OLED display. I have it working showing a Temperature Setpoint from OpenHAB.

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

Re: OLED Scrolling Display

#30 Post by jsilver » 09 Jun 2016, 19:53

Allycat1972 wrote:FYI. If you use the MQTT import function in the ESP Playground you can subscribe to MQTT topics and use the values in the OLED display. I have it working showing a Temperature Setpoint from OpenHAB.
Do you mean you're displaying the values in the original ESPEasy OLED tiny-font multi-line plugin, or this wonderful big-font multi-page scrolling one?

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

Re: OLED Scrolling Display

#31 Post by jsilver » 13 Jun 2016, 09:09

jsilver wrote:Do you mean you're displaying the values in the original ESPEasy OLED tiny-font multi-line plugin, or this wonderful big-font multi-page scrolling one?
Ok to answer myself, I've now explored further and found I can display variables from onboard sensors or even other ESP8266 units in the framed OLED plugin, which is amazing! But it only works with numbers.

But I was also hoping to send strings via mqtt for the unit to display on its OLED. If I get around to it I might try implementing this myself. It'd be interesting to have a room message board which can display useful room data as well as messages.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: OLED Scrolling Display

#32 Post by tozett » 13 Jun 2016, 20:34

+1
:mrgreen:

QcVictor
Normal user
Posts: 46
Joined: 23 Feb 2016, 00:47

Re: OLED Scrolling Display

#33 Post by QcVictor » 03 Jul 2016, 20:47

I have some trouble to compile
_P103_Event.ino: In function 'void Plugin_103_Action(byte, byte, int, int, byte)':
_P103_Event:522: error: invalid conversion from 'char*' to 'byte {aka unsigned char}' [-fpermissive]
_P103_Event:522: error: too few arguments to function 'void ExecuteCommand(byte, const char*)'
Command.ino:2:6: note: declared here
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: len=-149
at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:528)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:499)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1142)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1121)
at org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:304)
at org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)
at org.fife.ui.rsyntaxtextarea.SyntaxView.updateMetrics(SyntaxView.java:892)
at org.fife.ui.rsyntaxtextarea.SyntaxView.setSize(SyntaxView.java:802)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1722)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:912)
at javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(BasicTextAreaUI.java:120)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.JTextArea.getPreferredSize(JTextArea.java:619)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:791)
at java.awt.Container.layout(Container.java:1508)
at java.awt.Container.doLayout(Container.java:1497)
at java.awt.Container.validateTree(Container.java:1693)
at java.awt.Container.validate(Container.java:1628)
at javax.swing.RepaintManager$3.run(RepaintManager.java:704)
at javax.swing.RepaintManager$3.run(RepaintManager.java:702)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:701)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1719)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "Thread-29" java.lang.IndexOutOfBoundsException: len=-149
at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:501)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidthUpTo(TokenImpl.java:528)
at org.fife.ui.rsyntaxtextarea.TokenImpl.getWidth(TokenImpl.java:499)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1142)
at org.fife.ui.rsyntaxtextarea.RSyntaxUtilities.getTokenListWidth(RSyntaxUtilities.java:1121)
at org.fife.ui.rsyntaxtextarea.SyntaxView.getLineWidth(SyntaxView.java:304)
at org.fife.ui.rsyntaxtextarea.SyntaxView.calculateLongestLine(SyntaxView.java:110)
at org.fife.ui.rsyntaxtextarea.SyntaxView.updateMetrics(SyntaxView.java:892)
at org.fife.ui.rsyntaxtextarea.SyntaxView.setSize(SyntaxView.java:802)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1722)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:912)
at javax.swing.plaf.basic.BasicTextAreaUI.getPreferredSize(BasicTextAreaUI.java:120)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.JTextArea.getPreferredSize(JTextArea.java:619)
at javax.swing.JViewport.getViewSize(JViewport.java:999)
at javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:278)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1033)
at javax.swing.JViewport.fireStateChanged(JViewport.java:1369)
at javax.swing.JViewport.setView(JViewport.java:969)
at javax.swing.JScrollPane.setViewportView(JScrollPane.java:1007)
at org.fife.ui.rtextarea.RTextScrollPane.setViewportView(RTextScrollPane.java:253)
at processing.app.Editor.setCode(Editor.java:1766)
at processing.app.Sketch.setCurrentCode(Sketch.java:1000)
at processing.app.Sketch.setCurrentCode(Sketch.java:980)
at processing.app.Editor.statusError(Editor.java:2670)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2396)
at java.lang.Thread.run(Thread.java:745)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: OLED Scrolling Display

#34 Post by tozett » 04 Jul 2016, 05:27

what is your environment?
arduino ide version, plattform version? ...
maybe check working versions here: http://www.esp8266.nu/forum/viewtopic.php?p=7763#p7763

Shantarius
New user
Posts: 3
Joined: 25 Jul 2016, 12:19

Re: OLED Scrolling Display

#35 Post by Shantarius » 25 Jul 2016, 12:23

Hi,

i have Problems to compile your mod.

Arduino IDE 1.6.9
ESP8266 Library 2.3.0
OLED Library 2.0.0 (Your Library from Github)

Code: Select all

/Users/Chris/Documents/Arduino/Projects/ESPEasy/ESPEasy/_P205_FrameOLED.ino: In function 'boolean Plugin_205(byte, EventStruct*, String&)':
_P205_FrameOLED:386: error: 'string2Integer' was not declared in this scope
         int intPayload=string2Integer(Payload);
                                              ^
_P205_FrameOLED:390: error: 'getValueNameIndex' was not declared in this scope
         int ValueNameIndex=getValueNameIndex(event->TaskIndex,string);
                                                                     ^
_P205_FrameOLED:430: error: 'CheckParam' was not declared in this scope
           if (! CheckParam("Line Number",Line,1,8)) {
                                                  ^
exit status 1
'string2Integer' was not declared in this scope

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

Re: OLED Scrolling Display

#36 Post by namirda » 05 Aug 2016, 06:41

Hi,

There an update to OLED Scrolling Display plugin in the Playground which should hopefully play nicely with ESPEasy 114+, Core 2.3 - it still needs the same OLED library from the Playground as before.

There is one new input parameter which allows you to change the scroll speed - from very slow (about 1.5s) to almost instant. The scrolling routine blocks the main Arduino loop and it could be that sometimes the longer slower scrolls will cause some timing problems - this issue can be reduced by using faster scrolls.

N

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

Re: OLED Scrolling Display

#37 Post by jsilver » 08 Aug 2016, 14:04

namirda wrote:There an update to OLED Scrolling Display plugin in the Playground which should hopefully play nicely with ESPEasy 114+, Core 2.3
R118 has compiled here fine. Thanks Neil!

Is there any chance of being able to send the OLED string values to display?

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

Re: OLED Scrolling Display

#38 Post by timsson » 08 Aug 2016, 18:01

Is there any chance of being able to send the OLED string values to display?
yes:
http://www.esp8266.nu/index.php/OLEDDisplay
--> oled,1,1,test
but we need a change on _P210_MQTTImport.ino ;)

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

Re: OLED Scrolling Display

#39 Post by namirda » 09 Aug 2016, 03:54

@jsilver,

OK - I have just uploaded yet another new version of the scrolling display to the playground which includes a write option.

The command syntax is either:

a) tskname,Line,String - where tskname is the name you have given to the scrolling oled task,
Line is the line number which must be an integer between 1 and 12,
String is the string to be displayed.

b) taskname,on or taskname,off To switch the display on or off

You can send the command using either http or mqtt or even via the webserver. To use mqtt, you should publish to the normal subscription topic of your esp followed by /cmd - e.g. /ESP01/cmd.

---------------------------------------
@timsson,

I think the above should satisfy all requirements - what is it exactly that you want?

Let me know how you get on....

N

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

Re: OLED Scrolling Display

#40 Post by jsilver » 09 Aug 2016, 09:28

namirda wrote:OK - I have just uploaded yet another new version of the scrolling display to the playground which includes a write option.
That sounds incredibly useful, Neil... and very comprehensive functionality which should give everyone everything they need. I shall give it a go hopefully today.

A LITTLE LATER ON THAT DAY...

Well, everything seems to be working really well, except for one thing. I got MQTT commands working, but when I send a string with a space, only the first word is displayed. Is that a limitation of the Command module rather than your Framed OLED module?

LATER STILL...

Not sure if there's a better way to send commands with spaces, but I tried using the Unicode non-breaking space or hard-space character U+00A0 instead of space, and it worked, displaying fine on my OLED as a normal space. To get this character from your keyboard, hold down Alt and type 0160 on the numeric keypad.

Also there's an odd artefact in the serial log... this message, over and over again, after sending just one command to a newly booted device... the command is something like Disp,1,Hello!
  • OLED : Syntax Error in OLED command - Disp
This error message persists even after a reboot!

Jon

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

Re: OLED Scrolling Display

#41 Post by timsson » 09 Aug 2016, 20:20

@timsson,I think the above should satisfy all requirements - what is it exactly that you want?
I would like import/send mqtt messages to the oled, but it is a mqt-plugin "problem"...
like this:
Oled:
Floor: open/closed
(MQTT-plugin Name: Window1 -- Topic 1:/ESP_03/window1 -- Value Name 1: -- Formula Value1: string(open/closed)
-> still only dezimal..
Thanks

Shantarius
New user
Posts: 3
Joined: 25 Jul 2016, 12:19

Re: OLED Scrolling Display

#42 Post by Shantarius » 09 Aug 2016, 23:28

R119 has compiled here fine. Thank You!

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

Re: OLED Scrolling Display

#43 Post by namirda » 10 Aug 2016, 04:43

@JSilver

Yes indeed! The routine I used for splitting the command into component parts was an ESPEasy routine from misc.ino and I had not noticed that it used both comma and space as delimiter - hence your problem when trying to display strings with spaces. Now fixed in the playground.

The problem with the recurring syntax errors is partly due to you talking to yourself Jon!

I rather suspect that you have set your mqtt subscribe topic in such a way that your ESP listens to its own output - recursive confirmation bias! MQTT pubsub gets very confusing if you do this - even 'living fossils' should try to avoid the practise! The scrolling oled plugin by default outputs the status of the display and if you are not careful with your subscriptions, this output will subsequently be read as a command which could possibly cause a recurring syntax error as you have noted. I have made a small change in the software which should reduce this problem but it is even better to avoid it completely by modifying your pub and sub strings.

I use the following pub/sub strings to avoid the 'feedback' problem:

subscribe /%sysname%-IN/#
publish /%sysname%/%tskname%/%valname%

I really hope it works for you now.

N
Last edited by namirda on 10 Aug 2016, 07:30, edited 4 times in total.

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

Re: OLED Scrolling Display

#44 Post by namirda » 10 Aug 2016, 05:04

@timsson

Sorry but I still don't think I understand your problem.

However, I think you are asking for MQTTImport to import strings and not only floating point values?? If that is the case then I don't think it is possible without major overhaul of ESPEasy - the whole framework is designed around sensors which output numerical values.

MQTTImport works in just the same way as all other sensors except that it reads it's numerical data from the MQTT broker rather than a locally attached device.

If you want to display an Open/Closed string on the OLED then this is not something MQTTImport can help you with.Instead you will simply have to send the strings directly to the Scrolling OLED plugin.

You might want to take a look at MQTTWARN which is a little python utility which is excellent at modifying and retransmitting MQTT messages - I think it could probably help you here.

Hope this helps

N

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

Re: OLED Scrolling Display

#45 Post by jsilver » 10 Aug 2016, 10:42

namirda wrote:Now fixed in the playground.

Trying it now!
namirda wrote:The problem with the recurring syntax errors is partly due to you talking to yourself Jon!
Damn. The madness is getting to me.
MQTT pubsub gets very confusing if you do this - even 'living fossils' should try to avoid the practise!
Oi! Leave us elderly folks alone! :D
I see you found the in-joke my colleague left on our web site! :lol:
subscribe /%sysname%-IN/#
publish /%sysname%/%tskname%/%valname%
Good tip!
I really hope it works for you now.
I'll let you know shortly...

A LITTLE LATER ON...

Yes. All seems perfect. And since my ESP sensors were all publishing to sensors/%sysname%...etc, I've just changed the root of the MQTT topic for subscribing, which makes a lot more sense anyway. Thanks again Neil! :D

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: OLED Scrolling Display

#46 Post by Drum » 12 Aug 2016, 13:52

Okay, I am trying this on the "adafruit Oled feather" and it works better than the standard plug in. It is 128 x 32 so with the Header and footer you can only get 1 line in and be able to read it. It has 3 buttons on the board, I tested "C" which goes to GPIO2 and it works perfect. On this display the header is wasted, you can't read it at all. If i could figure out a way to remove the header and footer I would check to see if 2 lines would fit, and maybe insert the header info as a scrolling divider between the frames but drop the footer altogether.

One other interesting difference, everything is upside down... On the adafruit site they show the buttons on the left, but with this plugin, they are on the right. Not a problem just different.

Now to see if I can get the 8 channel PWM controller for it to work as well.

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

Re: OLED Scrolling Display

#47 Post by timsson » 15 Aug 2016, 14:17

namirda wrote:@timsson
...Instead you will simply have to send the strings directly to the display
Hope this helps
N
Ok, now i use openhab and send this via http - it works :D
- rename displayname: 03_oled and send:
http://ip/tools?cmd=03_oled%2C1%2CWindows+open%3A
http://ip/tools?cmd=03_oled%2C2%2C4
Delay:6
Thanks!

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

Re: OLED Scrolling Display

#48 Post by timsson » 17 Aug 2016, 17:26

Hi,
is it possible that somebody integrate an other driver?
I have several 1.3oled with SH1106.. who can help me
http://www.esp8266.nu/forum/viewtopic.p ... 8650#p8650

happytm
Normal user
Posts: 107
Joined: 15 Aug 2016, 17:53

Re: OLED Scrolling Display

#49 Post by happytm » 19 Aug 2016, 03:49

Hi Namirda,

Thank you for your work on all these plugins. I am going to use all of them for my project.I would like to request a useful feature to this plugin which i am missing in my project.I would like to control some 4 dimmers with rotary encoder locally which will show target pwm set on oled screen for few seconds and then start doing the scrolling routine.some people uses menu system to do it. I have seen few example of this here :

https://www.youtube.com/watch?v=iHOKVtHnfko
https://www.youtube.com/watch?v=MzO__HCKP8I (using menu)

I do not have experience and capacity to do it myself and I do not know how difficult this will be to implement but it will sure be nice addition to scrolling display plugin.

Thanks

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

Re: OLED Scrolling Display

#50 Post by jsilver » 23 Aug 2016, 11:34

Neil, a weird problem has arisen... and I'm not sure who to direct this at...

On recent builds, with OLED Framed included, I get "Low memory available, stability problems may occur" when compiling.
Whenever I go into the Devices page and do anything to do with OLED Framed, the device crashes.
I've tried your fix to webserver.ino, but to no avail.

Any ideas?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests