Page 4 of 5

Re: ESP Easy Mega / Unknown or restricted command with OLED

Posted: 13 May 2017, 08:23
by starfish
While the OLED Framed device works with R148 it does not accept http-commands with v. 2.0.0-dev8 when sending http://<ESP IP>/control?cmd=device,1,text
I get the reply "Unknown or restricted command" . Did the command syntax change or is it simply not functional yet? (sketch uploaded using platformio and all bin files using flasher).

Re: ESP Easy Mega

Posted: 13 May 2017, 09:40
by krikk
did not test it, but the command should be:

Code: Select all

http://<ESP IP address>/control?cmd=OLEDFRAMEDCMD,<row>,<col>,<text>

Re: ESP Easy Mega

Posted: 13 May 2017, 09:42
by krikk
wrong...

only this will work:

Code: Select all

http://<ESP IP address>/control?cmd=OLEDFRAMEDCMD,on

http://<ESP IP address>/control?cmd=OLEDFRAMEDCMD,off

Re: ESP Easy Mega

Posted: 13 May 2017, 11:05
by the cosmic gate
Is there someboy who can help me, i'am trying to compile the newest github version using serveral Arduino IDE's , but everytime the same compile error :

Code: Select all

Sd2PinMap.h:510:2: error: #error Architecture or board not supported. term

Re: ESP Easy Mega / Unknown or restricted command with OLED

Posted: 13 May 2017, 11:31
by Martinus
starfish wrote: 13 May 2017, 08:23 While the OLED Framed device works with R148 it does not accept http-commands with v. 2.0.0-dev8 when sending http://<ESP IP>/control?cmd=device,1,text
I get the reply "Unknown or restricted command" . Did the command syntax change or is it simply not functional yet? (sketch uploaded using platformio and all bin files using flasher).
That feature was removed after migrating the playground version to the default branch, as it updates flash memory on every command that's being send. If this command would be run from some automated controller script, it would kill your ESP flash chip in a very short period of time. This part of the code is something that needs to be avoided in a plugin write command:

Code: Select all

LoadCustomTaskSettings(event->TaskIndex, (byte*)&deviceTemplate, sizeof(deviceTemplate));
strncpy(deviceTemplate[Line - 1], Parts[2].c_str(), sizeof(deviceTemplate[Line - 1]));
SaveCustomTaskSettings(event->TaskIndex, (byte*)&deviceTemplate, sizeof(deviceTemplate));
The original OLED plugin writes the messages directly to the OLED device and does not update the display template, but it's not possible to implement this in a similar way for the framed version. We would need a large frame buffer in RAM to accommodate such a feature. And RAM is quite limited on ESP8266...

Re: ESP Easy Mega / Unknown or restricted command with OLED

Posted: 13 May 2017, 14:37
by starfish
Martinus wrote: 13 May 2017, 11:31
starfish wrote: 13 May 2017, 08:23 While the OLED Framed device works with R148 it does not accept http-commands with v. 2.0.0-dev8 when sending http://<ESP IP>/control?cmd=device,1,text
I get the reply "Unknown or restricted command" .
That feature was removed after migrating the playground version to the default branch, as it updates flash memory on every command that's being send. If this command would be run from some automated controller script, it would kill your ESP flash chip in a very short period of time.
hi Martinus, sounds reasonable - but do you think an automated script updating every 30 Minutes would considerably reduce flash lifetime? Isn´t Squix doing something similar with his weatherstation ? And shouldnt the framed OLED be completely removed from 2.0.0-devx in that case?

Re: ESP Easy Mega

Posted: 13 May 2017, 23:29
by psy0rz
we should just re-add that feature, but never save to flash. thats not necessary for most applications that use the oled i think?

Re: ESP Easy Mega / Unknown or restricted command with OLED

Posted: 13 May 2017, 23:35
by Shardan
starfish wrote: 13 May 2017, 14:37 hi Martinus, sounds reasonable - but do you think an automated script updating every 30 Minutes would considerably reduce flash lifetime?
Do not mix up the flash you know from SD-cards or such with the flash inside a ESP-xx.
I've just done a quick calculation. With writing the same storage cells every 30 minutes
the cells would be worn out after less then 100 days.....
"very quick" is a relative term. Compared to the possible life time of an ESP i think this is a short period.

Regards
Shardan

Re: ESP Easy Mega

Posted: 14 May 2017, 12:01
by starfish
@Shardan thanks for calculating - I didn´t take a deeper look into it but good you made it. No I really dont intend to replace the ESP 3 times a year ;)
@psy0rz how can this be achieved? its a really good plugin and I´d not like to do without it.

Re: ESP Easy Mega

Posted: 14 May 2017, 12:04
by psy0rz
starfish, can you make a feature request for this on github?

Re: ESP Easy Mega

Posted: 14 May 2017, 14:46
by starfish
psy0rz wrote: 13 May 2017, 23:29 we should just re-add that feature, but never save to flash. thats not necessary for most applications that use the oled i think?
not sure if I understand what you mean - my application is sending changing data to the device by mqtt or html every 30 min or so - thus still needing memory to write to (not necessarily flash ;) )

Re: ESP Easy Mega

Posted: 16 May 2017, 09:38
by the cosmic gate
the cosmic gate wrote: 13 May 2017, 11:05 Is there someboy who can help me, i'am trying to compile the newest github version using serveral Arduino IDE's , but everytime the same compile error :

Code: Select all

Sd2PinMap.h:510:2: error: #error Architecture or board not supported. term
Nobody who can help me with this ? I want to test the latest build on on of the Sonoff's etc

Re: ESP Easy Mega

Posted: 16 May 2017, 11:04
by Shardan
the cosmic gate wrote: 16 May 2017, 09:38
the cosmic gate wrote: 13 May 2017, 11:05 Is there someboy who can help me, i'am trying to compile the newest github version using serveral Arduino IDE's , but everytime the same compile error :

Code: Select all

Sd2PinMap.h:510:2: error: #error Architecture or board not supported. term
Nobody who can help me with this ? I want to test the latest build on on of the Sonoff's etc
Can't test the source on Arduino-IDE at the moment as i'm @Job.
Looks like a library or the ESP-Core are missing or wrong Version.

Did you download the full .zip file from github?
All libraries copied to the IDE, ESP core installed etc?
IDE is set up according to the wiki ? ( https://www.letscontrolit.com/wiki/inde ... are_Upload )

Due to my experiences some tings may lead into issues, for example same Arduino IDE
used for Arduino and ESP in parallel (might work with taking care of dividing libraries etc)

Please follow the howto in the wiki closely.

Regards
Shardan

Re: ESP Easy Mega

Posted: 16 May 2017, 18:57
by Shardan
Hello again,

i've just tested with a fresh, clean install of the arduino IDE and it compiles without errors.

Regards
Shardan

Re: ESP Easy Mega

Posted: 17 May 2017, 11:29
by starfish
Shardan wrote: 16 May 2017, 18:57 Hello again,

i've just tested with a fresh, clean install of the arduino IDE and it compiles without errors.

Regards
Shardan
I can confirm that. Its essential to do portable install - the above mentioned tutorial is perfect. In addition I´d like to point out, that it is good to delete ALL remainings from previous non-portable installations (e.g. in windows user directory) - Arduino IDE found and even used a forgotten library there.

I also made a backup copy of that clean portable install. And for every new sketch I am creating a new portable install by copying this backup to another differently named directory. (ah and something obvious: dont make a windows file suffix association between arduino.exe and .ino endings - arduino.exe should not start when clicking on a .ino - file. Always start arduino.exe first from inside the clean install and select the .ino file from file menu).

Re: ESP Easy Mega

Posted: 17 May 2017, 11:45
by Shardan
starfish wrote: 17 May 2017, 11:29 I can confirm that. Its essential to do portable install - the above mentioned tutorial is perfect. In addition I´d like to point out, that it is good to delete ALL remainings from previous non-portable installations (e.g. in windows user directory) - Arduino IDE found and even used a forgotten library there.

I also made a backup copy of that clean portable install. And for every new sketch I am creating a new portable install by copying this backup to another differently named directory. (ah and something obvious: dont make a windows file suffix association between arduino.exe and .ino endings - arduino.exe should not start when clicking on a .ino - file. Always start arduino.exe first from inside the clean install and select the .ino file from file menu).
A backup of the portable install is a good idea.

One point should be mentioned with the Arduino IDE installing tutorial:

Download the .zip-File, not the .exe!
Just unpack it and follow the tutorial.

Regards
Shardan

Re: ESP Easy Mega

Posted: 17 May 2017, 15:38
by starfish
Shardan wrote: 17 May 2017, 11:45
One point should be mentioned with the Arduino IDE installing tutorial:

Download the .zip-File, not the .exe!
Just unpack it and follow the tutorial.
actually they call it ZIP-file for non admin install ....

Re: ESP Easy Mega

Posted: 28 May 2017, 15:44
by starfish
psy0rz wrote: 14 May 2017, 12:04 starfish, can you make a feature request for this on github?
I did it some weeks ago - maybe at the wrong place?

Re: ESP Easy Mega

Posted: 28 May 2017, 16:56
by Barb232
i just updated to dev 9 with OTA, it worked.
but: i used #systime# in my LCD1602 display to view the time, now it shows the online time of the controller.
does some variables changed?

Re: ESP Easy Mega

Posted: 28 May 2017, 17:24
by vader
Updated today to DEV9, and DHT22 shows 'nan' now in device list. Reverted to DEV8 and all is ok again. :( Hope we don't have to wait over a month for the next update to fix that....

Re: ESP Easy Mega

Posted: 28 May 2017, 20:23
by Shardan
Barb232 wrote: 28 May 2017, 16:56 i just updated to dev 9 with OTA, it worked.
but: i used #systime# in my LCD1602 display to view the time, now it shows the online time of the controller.
does some variables changed?
just did a quickcheck on a breadboard with a nodemcu and a LCD2004 - time works fine with that.
Did you activate NTP?

The only thing i noticed is that showing seconds with a time display refreshing every minute gives not too much sense.

Regards
Shardan

Re: ESP Easy Mega

Posted: 28 May 2017, 20:43
by vader
@Shardan I think, this was the wrong reply to. :mrgreen: Your answer fits to one post earlier....

Re: ESP Easy Mega

Posted: 28 May 2017, 20:44
by Shardan
oooops - sorry
i'll correct that

Regards
Shardan

Re: ESP Easy Mega

Posted: 29 May 2017, 00:36
by psy0rz
i'll update my own dht22 tomorrow to see whats going on.

i hope that in the future we can prevent regressions like these with The Rig: https://www.letscontrolit.com/forum/vie ... =18&t=3141

Re: ESP Easy Mega

Posted: 29 May 2017, 10:45
by vader
@psy0rz I see now that krikk was fiddling at DHT in DEV9. Maybe he broke it....

krikk (13):
....
addHelpButton Function and a new Help Button for the Rules and Hardware Page (#282)
DHT plugin fix 'NaN' issue (#285)
i don't like hidden features, added a json button to the tools menu, next to the advanced button (#292)
....

Re: ESP Easy Mega

Posted: 29 May 2017, 11:45
by psy0rz
i asked krikk if he could take a look at it.

Re: ESP Easy Mega

Posted: 29 May 2017, 12:13
by starfish
mqtt update in framed oled still not working ... but found a video tutorial elsewhere showing the use of MQTT-import device together with framed oled. Is this recommended?

Re: ESP Easy Mega

Posted: 29 May 2017, 22:44
by psy0rz
the DHT issue is reverted. i'll release dev10 now.

Re: ESP Easy Mega

Posted: 30 May 2017, 09:35
by vader
Thanks for the fast solution. It seems to work again for now. But I have one wish: In the main view table please change the build number notation from 20000 to 2.0.0-10. With my up to 20 Sonoffs in use this would be helpful to see what module is up to date and which one not. ;)

Re: ESP Easy Mega

Posted: 30 May 2017, 09:51
by psy0rz
i would love to..but that number is only 16 bits. so it can be 65535 max. maybe its better if we change it to the builddate instead of version. we cant just make it more bits since that is part of the protocol. (wouldnt be backwards compatible)

Re: ESP Easy Mega

Posted: 30 May 2017, 11:27
by vader
Ok.... Must it be numeric? And when you make it alphanumeric? So it is a text variable....

Re: ESP Easy Mega

Posted: 30 May 2017, 15:27
by sasso
Hi guys

I have a "little" request....

is there a possibility to implement a password (root vs user) switch between full control of the Espeasy ( all settings ) and lets say just main settings. I have installed for a couple of my friends the wemos d1 and BME280 sensors around their houses and some of them are poking around the settings and messing with configuration, so I would like to limit them to only be able to set some setting ( SSID, SSID password, etc because some are not really found of giving me their wifi passwords ).

Thanks...

BR

Re: ESP Easy Mega

Posted: 30 May 2017, 15:43
by psy0rz
vader wrote: 30 May 2017, 11:27 Ok.... Must it be numeric? And when you make it alphanumeric? So it is a text variable....
If we change it, the older nodes wouldn't be able to display it correctly.

Re: ESP Easy Mega

Posted: 30 May 2017, 17:44
by vader
Ok, another idea: And when we add a new variable for a small 'sub-build' number up to 255? The output could be like build+'-'+sub_build (20000-10). So it would be compatible to the older nodes, because the orig. build number is not touched.

Or, the easiest way, we take the last 2 digits from the actual build number as dev version (e.g. 20010). The variable could stay numeric and the new builds convert it to alphanumeric (e.g. 2.0.0-dev10). Looks not so bad, I mean.... ;-)

Re: ESP Easy Mega

Posted: 30 May 2017, 20:06
by Martinus
The build number is internally used to do a numeric compare so it would be inconvenient to have this as a string.
It was designed that the build number is increased with every individual commit to the source repository so that we can distinguish between each minor changed version.
So having the same '20000' build number for different commits was not planned.

(the mechanism originates from the time when we were using SVN where the Rxxx number is automatically increased by the repository on each commit)

Re: ESP Easy Mega

Posted: 30 May 2017, 21:12
by vader
As I wrote in a previous post, it would be nice to see different dev-version numbers in the main view table. It make it much easier to see what ESP is not up to date. This is since Mega version. Your versions increased this number with each release and I miss this now.... :-(

Re: ESP Easy Mega

Posted: 31 May 2017, 08:44
by Shardan
Hello all,

easy way for numbering:
For this a 5 digit number can be used: 200 for version 2.0.0,
the two digits at the end 00-99 could be used for development stages.
This keeps compatibility with old devices, disadvantage is the limited release versions numbering range.

A more difficult but more flexible way:
Use two variables. Keep the "20000" for compatibility with older devices
and a bigger numbering range for subversions.
Add a second variable for the dev-stage number.
The disatvantage: Old devices can't show the dev-stage number...
well, i could live with that.

Regards
Shardan

Re: ESP Easy Mega

Posted: 31 May 2017, 10:22
by vader
@Shardan: That is nearly the same what I posted in #184...

Re: ESP Easy Mega

Posted: 31 May 2017, 12:18
by psy0rz
perhals we should do that. when we're finally at 20900 (v2.0.9) or something, it might be ok to break compatibilty and fix it properly. by that time everyone should be running version 2.

Re: ESP Easy Mega

Posted: 05 Jun 2017, 21:38
by Jotoc
Hello all,

i miss the Checkbox "Send to Controller" for the Device Ina219.
Is this planned?

Greetings
Jotoc

Re: ESP Easy Mega

Posted: 05 Jun 2017, 21:48
by grovkillen
Jotoc wrote: 05 Jun 2017, 21:38 Hello all,

i miss the Checkbox "Send to Controller" for the Device Ina219.
Is this planned?

Greetings
Jotoc
It's been reported.

https://github.com/letscontrolit/ESPEasy/issues/321

Re: ESP Easy Mega

Posted: 05 Jun 2017, 22:20
by Jotoc
Thank you

I will waiting.

Jotoc

Re: ESP Easy Mega

Posted: 06 Jun 2017, 13:44
by psy0rz
Jotoc wrote: 05 Jun 2017, 21:38 Hello all,

i miss the Checkbox "Send to Controller" for the Device Ina219.
Is this planned?

Greetings
Jotoc
we know: https://github.com/letscontrolit/ESPEasy/issues/321

it might be fixed already, try compiling the current github sources. if its fixed i can release dev11.

Re: ESP Easy Mega

Posted: 08 Jun 2017, 18:01
by vuhams
maluko wrote: 27 Nov 2016, 23:21 hi
it is possible to add more task on devices?

Because the MCP23017 have 16 Output so only have 12 on espeasy.

thanks
MCP23017 is too slow in mega

Re: ESP Easy Mega

Posted: 09 Jun 2017, 20:44
by Dylantje
did flash this software on my Sonoff dual.
Looks great, only cannot get the switches find, what gpio are they use.

I try all the gpio pins...
Switch them with a dummy sensor in Domoticz. [ like my other esp, with Espaeasy ]
Only no switching relay...

Is there something else i need to do?

And what are the other pins i can use for a DHT?


Like to hear

Thanks already

Re: ESP Easy Mega

Posted: 15 Jun 2017, 19:11
by papperone
Hi, after a while I decided to start experiment with ESPEasy mega or 2.0.x.x.
First thingh I did it is to download dev10 package, flash an ESP8266-12 with the dev-4096 BIN file and all was ok, I tested it with different sensors, experiment the new features, no big issues...
Then due to the fact I realize _P038 Neopixel plugin is broken in the DEV I setup ArduinoIDE to compile ESPEasyMega in order to play with the other NeoPixel plugins (_117 and _121), I succesfully compiled and uploaded to the same ESP8266 but it reboots as plain new, I've lost all settings I've saved in previous days (no wifi ID/PW, no rules, no devices, nothing!!).
I compiled it as 4M(3M SPIFF) as I've always compiled V148 so I woudl like to know where I'm doing wrong.
As a further test I relfahsed the dev-4096 BIN and again, all settings losts! So definitely I'm doing somethign wrong in the way I compile the source from my Arduino IDE.
Any clues??

Re: ESP Easy Mega

Posted: 15 Jun 2017, 19:23
by Shardan
Dylantje wrote: 09 Jun 2017, 20:44 did flash this software on my Sonoff dual.
Looks great, only cannot get the switches find, what gpio are they use.

I try all the gpio pins...
Switch them with a dummy sensor in Domoticz. [ like my other esp, with Espaeasy ]
Only no switching relay...

Is there something else i need to do?

And what are the other pins i can use for a DHT?


Like to hear

Thanks already
Hello Dylantje

Sorry to say, but the sonoff dual does not work this way.
The GPIO's are not connected to the relays in a direct way.
They use a little chip to control the relays, the chip is driven by a serial data protocol from the ESP.
As far as i know the "dual" is actually not supported by ESPEasy.

Regards
Shardan

Re: ESP Easy Mega

Posted: 15 Jun 2017, 19:33
by AndrewJ
Hi papparone,
See this page in the Wiki: https://www.letscontrolit.com/wiki/inde ... are_Upload

"For 4M boards: Select 1M SPIFF"

(I have to say I don't fully understand why this is. My first thought, like you, was to use 3M SPIFFS. But I used the recommendation above and it worked.)

HTH
Andrew

Re: ESP Easy Mega

Posted: 15 Jun 2017, 19:38
by papperone
AndrewJ wrote: 15 Jun 2017, 19:33 Hi papparone,
See this page in the Wiki: https://www.letscontrolit.com/wiki/inde ... are_Upload

"For 4M boards: Select 1M SPIFF"

(I have to say I don't fully understand why this is. My first thought, like you, was to use 3M SPIFFS. But I used the recommendation above and it worked.)

HTH
Andrew
Thanks Andrew, honestly I did not look the wiki, just compiled as I used to do in R148 and before :)

G.

Re: ESP Easy Mega

Posted: 17 Jun 2017, 09:10
by the cosmic gate
Shardan wrote: 15 Jun 2017, 19:23
Dylantje wrote: 09 Jun 2017, 20:44 did flash this software on my Sonoff dual.
Looks great, only cannot get the switches find, what gpio are they use.

I try all the gpio pins...
Switch them with a dummy sensor in Domoticz. [ like my other esp, with Espaeasy ]
Only no switching relay...

Is there something else i need to do?

And what are the other pins i can use for a DHT?


Like to hear

Thanks already
Hello Dylantje

Sorry to say, but the sonoff dual does not work this way.
The GPIO's are not connected to the relays in a direct way.
They use a little chip to control the relays, the chip is driven by a serial data protocol from the ESP.
As far as i know the "dual" is actually not supported by ESPEasy.

Regards
Shardan
I have the same issue here, so I tried some other firmware (Espruna) and with this firmware the dual is functioning perfect . So hopefully somebody can use this Espruna sketch to build a pluggin for espeasy. This also because of that I don't want to change everything to MQTT just for using the sonoff dual