Arduino Easy 2560

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Forum rules
You have entered the experimental forum, beware!!!
Message
Author
frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#31 Post by frank » 10 Mar 2017, 18:18

Domoke wrote: 09 Mar 2017, 21:57 Hi,

I was looking for a EspEasy sollution with cable, now its finally there :D
But I cannot connect to an ip adres, Can someone please explain me how this works.
I tried cross cable, connect with static ip to the 192.168.4.1, DHCP, flashed both versions but I cannot get ip address. (flashing successful)
The Arduino Mega and the ethernet shield W5100 is working because I have a sketch with both and that is working fine.

So if someone has this working can you help me? Thank you.
Did you put an sd card in the network board. It will not work with out that

Domoke
New user
Posts: 3
Joined: 09 Mar 2017, 21:46

Re: Arduino Easy 2560

#32 Post by Domoke » 10 Mar 2017, 20:52

frank wrote: 10 Mar 2017, 18:18 Did you put an sd card in the network board. It will not work with out that
Hi Frank, thank you for the quick reply,

Yes I also tried with an micro sd card (I only had 16gb) I formated and partitioned it with FAT and 4gb. No luck.
Do I have to flash the firmware with the sd card already inside, did not tried that.

Is it a static ip adres or DHCP?

Domoke
New user
Posts: 3
Joined: 09 Mar 2017, 21:46

Re: Arduino Easy 2560

#33 Post by Domoke » 10 Mar 2017, 21:38

Tried with a different old microsd card 2gb and it works now, instant Ip received - DHCP.

Frank, wonderful, thank you.Now I can start trying to make some switch inputs.

One more small question, the Arduino Mega has a lot more ports, I can control 10 of them now with this great interface, I would like some more (total of 35, yes i know :D ),
just inputs to read the status of a switch and forward this to domoticz.
I tried and searched the internet to find a solution with cable, this is the best option so far for a user that has difficulties to get it all programmed. Is the current amount (10) a memory limit?

annakin
New user
Posts: 4
Joined: 21 Apr 2017, 13:41

Re: Arduino Easy 2560

#34 Post by annakin » 06 May 2017, 16:26

Hi i have some problem.
I download on gidhub source and uploading on Mega 2560+W5100
ArduinoEasy start all good, but have 1 bug, then i try to add new Device in menu Devices i can`t.
I'm trying to select a switch for example, but when I select it, nothing happens.

UPD:
I found out that not on one page of ArduinoEasy you can not choose anything, it just is not saved.
But if I download the firmware from here: https://www.letscontrolit.com/wiki/inde ... ak_preview
And upload it into Mega 2560 then everything works.
Who can answer what the problem is.

annakin
New user
Posts: 4
Joined: 21 Apr 2017, 13:41

Re: Arduino Easy 2560

#35 Post by annakin » 09 May 2017, 21:27

I checked all the code, but I can not find the error.

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#36 Post by frank » 13 May 2017, 15:05

for me it is working fine
i hope some one will make the i2c work so i can connect sensors

annakin
New user
Posts: 4
Joined: 21 Apr 2017, 13:41

Re: Arduino Easy 2560

#37 Post by annakin » 14 May 2017, 20:32

mb problem its on my libraries..
Can u make ZIP lib, ArduinoEasy and share ?
Or say what Version lib u use.
And what version IDE u use ?

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#38 Post by frank » 18 May 2017, 19:59

i just used the original file with uploader

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#39 Post by frank » 25 Jun 2017, 16:10

Martinus is that you are back on this forum en that is great. Is it possible that you do some development on this side project???

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#40 Post by LisaM » 04 Aug 2017, 21:54

The ArduinoEasy source code is here: https://github.com/letscontrolit/ArduinoEasy

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#41 Post by LisaM » 06 Aug 2017, 12:25

LisaM wrote: 05 Aug 2017, 13:16 I have the same problem with ArduinoEasy with fixed ethernet, encj2860 ethernet shield , no wifi. Ping works, webserver no response...
Running all night without devices without problems.
Adding one device: webserver gone within 5 minutes.
Ping still working.
It's almost as if the webserver is looping at the device and therefor never get's to answer the incoming call.
I used the image, lets see if the source are better...

Martinus

Re: Arduino Easy 2560

#42 Post by Martinus » 07 Aug 2017, 18:35

Are you running the encj2860?
Doesn't this have a much larger memory footprint?

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#43 Post by frank » 07 Aug 2017, 20:30

is it possible to ad i2c to the system for DHT12 sensors?

Martinus

Re: Arduino Easy 2560

#44 Post by Martinus » 07 Aug 2017, 20:42

Afaik I2C should be active in this firmware.
But plugins should be copied from the main ESP repository and may need some patching...

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#45 Post by frank » 07 Aug 2017, 20:56

it is active i can see the sensor when i check in the advanced tab. But i dont have the knowledge to patch it in

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#46 Post by LisaM » 07 Aug 2017, 21:28

If i compile and upload the arduinoeasy source code mentioned earlier, compiled the image is only 115KB, it works. However changes to config or devices are ignored, submit brings back the original webform page, while changes to advanced are saved. Reboot works however.

If i use the image supplied, i can save config/devices/advanced changes (but rules cannot be saved!). However a reboot means the arduino is no longer responding to the browser calls, direct cmd calls don't work either. A cleaned (files removed) sd-card is needed to bring it back to life. If i make a device, it also fails (webserver no response). However direct cmd commands (gpio,3,1) does work (attached two leds to relay for both channels), when no device is created.

:shock:

Hw:
- Mega 2560 R3 Mega2560 REV3 (ATmega2560-16AU CH340G) Board
- Ethernet W5100 Network Expansion Board SD Card Expansion
- 5V 2-Channel Relay Module Shield (connected to D3/D4)

Info:

Unit: 8
Uptime: 0 days 21 hours 17 minutes
Load: 1% (LC=5479)
Free Mem: 2778
IP: 192.168.178.118
GW: 192.168.178.1
Build: 147
Devices: 4

(but no devices defined!)

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#47 Post by LisaM » 08 Aug 2017, 23:38

I'm beginning to suspect the SD card write method, a reboot is working but a reset is screwing up ArduinoEasy. I think a reset is aborting the sd config files, so ArduinoEasy cannot startup due to corrupted config files... I think the config files are left open on a SD card, a reset is then not closing the file meaning it's corrupted...

Martinus

Re: Arduino Easy 2560

#48 Post by Martinus » 09 Aug 2017, 08:20

Beware that this was experimental stage firmware, sort of PoC only. Main work was done to get it running at all and prevent instant crashes.
I've noticed that my local source was newer than the repository so i synced it to github. I'm currently unable to verify this firmware.

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#49 Post by frank » 09 Aug 2017, 11:19

can you upload it here so that we can test it? i want to use this to control my heating system seperate in every room

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#50 Post by LisaM » 09 Aug 2017, 13:39

Martinus wrote: 09 Aug 2017, 08:20 Beware that this was experimental stage firmware, sort of PoC only. Main work was done to get it running at all and prevent instant crashes.
I've noticed that my local source was newer than the repository so i synced it to github. I'm currently unable to verify this firmware.
It was exactly what i was looking for: An ESPEasy that is using Ethernet instead of WiFi, it's supposed to be used as a gate control which doesn't have WiFi but it does have an ethernet cable. ;)

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#51 Post by LisaM » 09 Aug 2017, 13:40

frank wrote: 09 Aug 2017, 11:19 can you upload it here so that we can test it? i want to use this to control my heating system seperate in every room
Link to sources and to image are in this topic....

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#52 Post by frank » 09 Aug 2017, 15:34

LisaM wrote: 09 Aug 2017, 13:40
frank wrote: 09 Aug 2017, 11:19 can you upload it here so that we can test it? i want to use this to control my heating system seperate in every room
Link to sources and to image are in this topic....
i found the new version (i was looking and reading with my eyes shut :oops: ) and i will test it.

The dht plug in gives errors when i put it in.

Arduino: 1.6.12 (Windows 10), Board:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

xxxxxxxx \ArduinoEasy-master (2)\ArduinoEasy-master\ArduinoEasy\_P005_DHT.ino: In function 'boolean Plugin_005(byte, EventStruct*, String&)':

_P005_DHT:79: error: 'class EthernetServer' has no member named 'arg'

String plugin1 = WebServer.arg(F("plugin_005_dhttype"));

^

exit status 1
'class EthernetServer' has no member named 'arg'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


so if you can help me with this i will be a step ferther

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#53 Post by LisaM » 09 Aug 2017, 16:54

frank wrote: 09 Aug 2017, 15:34 i found the new version (i was looking and reading with my eyes shut :oops: ) and i will test it.

The dht plug in gives errors when i put it in.

Arduino: 1.6.12 (Windows 10), Board:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

xxxxxxxx \ArduinoEasy-master (2)\ArduinoEasy-master\ArduinoEasy\_P005_DHT.ino: In function 'boolean Plugin_005(byte, EventStruct*, String&)':

_P005_DHT:79: error: 'class EthernetServer' has no member named 'arg'

String plugin1 = WebServer.arg(F("plugin_005_dhttype"));

^

exit status 1
'class EthernetServer' has no member named 'arg'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


so if you can help me with this i will be a step ferther
You cannot simply copy a ESP8266 plugin to an Arduino plugin, they are fundamentally different! The ESP8266 uses the WifiServer class, while ArduinoEasy is using the EthernetServer class...

For example: The ESP is using the

Code: Select all

WebServer.arg("plugin_001_type")
call, while the Arduino is using the

Code: Select all

WebServerarg(F("plugin_001_type"))
call. You might change the DHT code using this example to see if it works, but no guarantee...

Martinus has shrunk and altered the code a LOT, to make it fit in 256KB. That means that a lot of code has been removed to make it fit in this small thingy called Arduino... ;)

Martinus

Re: Arduino Easy 2560

#54 Post by Martinus » 09 Aug 2017, 17:09

I've added the DHT plugin on github that compiles without error but can't verify that it actually works...

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#55 Post by frank » 09 Aug 2017, 17:12

Martinus wrote: 09 Aug 2017, 17:09 I've added the DHT plugin on github that compiles without error but can't verify that it actually works...
you are the best i will test it

Martinus

Re: Arduino Easy 2560

#56 Post by Martinus » 09 Aug 2017, 17:18

LisaM wrote: 09 Aug 2017, 16:54 You cannot simply copy a ESP8266 plugin to an Arduino plugin, they are fundamentally different! The ESP8266 uses the WifiServer class, while ArduinoEasy is using the EthernetServer class...
Funny thing is that the plugin mechanism and many early plugins were initially ported from Arduino AVR to ESP8266. So now we are sort of porting them back...
LisaM wrote: 09 Aug 2017, 16:54 Martinus has shrunk and altered the code a LOT, to make it fit in 256KB. That means that a lot of code has been removed to make it fit in this small thingy called Arduino... ;)
Well most of the challenge was (and will be) to keep RAM usage within 8k... (where ESP8266 has 80k...)

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#57 Post by LisaM » 09 Aug 2017, 17:32

Martinus wrote: 09 Aug 2017, 17:18
LisaM wrote: 09 Aug 2017, 16:54 You cannot simply copy a ESP8266 plugin to an Arduino plugin, they are fundamentally different! The ESP8266 uses the WifiServer class, while ArduinoEasy is using the EthernetServer class...
Funny thing is that the plugin mechanism and many early plugins were initially ported from Arduino AVR to ESP8266. So now we are sort of porting them back...
LisaM wrote: 09 Aug 2017, 16:54 Martinus has shrunk and altered the code a LOT, to make it fit in 256KB. That means that a lot of code has been removed to make it fit in this small thingy called Arduino... ;)
Well most of the challenge was (and will be) to keep RAM usage within 8k... (where ESP8266 has 80k...)
You have been busy on the arduino/webserver classes, i'll reload and look on the serial port what exactly is happening when rebooting regarding the config files. Would be nice if i can reboot without crashing the config files.

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#58 Post by frank » 09 Aug 2017, 18:02

i have tested the dht plug in. The 12c scan does see the dht 12. but in the devices tab there is no reading. The log says dht no reading.

Martinus

Re: Arduino Easy 2560

#59 Post by Martinus » 09 Aug 2017, 18:10

This P005 plugin is build for DHT one-wire sensors only (DHT11/DHT22).
Maybe P034 will do the job, this one seems to compile without modifications (taken from the R147 ESP Easy source)

Martinus

Re: Arduino Easy 2560

#60 Post by Martinus » 09 Aug 2017, 18:11

I'm actually on holiday right now and while my wife is reading a book, i'm browsing the ESP forum...
Using a netbook now to remotely control my Windows 10 (XBMC-Kodi) PC stick that's still powered on at home.

Arduino compiles a bit slow there (Atom Z3735 cpu), but still fun to be able to use the Home Cinema TV Stick as a remote emergency development platform...
I could finish some loose ends on ESP Mega development as well.

But no Arduino Mega is active on the Home network right now and even if it was, they have no OTA capability...

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#61 Post by frank » 09 Aug 2017, 18:52

i am on a holliday also. And running like crazy to test the setup :D
The p034 did the trick i don´t get it in my domoticz but that is settings i think

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#62 Post by frank » 09 Aug 2017, 19:55

is it possible that communication with domoticz doesn't work ?

this is wat the log tels me

Welcome to Arduino Easy: Mer Ruimte

0:00:00 : HTTP : connecting to 192.168.1.167 using port 8090
0:00:00 : /json.htm?type=command¶m=udevice&idx=249&svalue=22.50;41.70;0
0:00:00 : HTTP/1.1 401 Unauthorized
0:00:00 : Content-Length: 91
0:00:00 : Content-Type: text/html
0:00:00 : Set-Cookie: SID=none; HttpOnly; path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT
0:00:00 :
0:00:00 :
401 Unauthorized

0:00:00 : HTTP : closing connection
Log
Powered by www.letscontrolit.com

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Arduino Easy 2560

#63 Post by Shardan » 09 Aug 2017, 19:58

Maybe wrong access credentials?
HTTP401 says username and/or password is wrong.
Regards
Shardan

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#64 Post by frank » 09 Aug 2017, 20:08

i am using the same login and password as my other esp units

Martinus

Re: Arduino Easy 2560

#65 Post by Martinus » 09 Aug 2017, 20:12

Just checked the source, authentication is not implemented yet...

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#66 Post by frank » 09 Aug 2017, 20:14

Martinus wrote: 09 Aug 2017, 20:12 Just checked the source, authentication is not implemented yet...
that explains a lot :D

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#67 Post by frank » 09 Aug 2017, 20:23

Martinus wrote: 09 Aug 2017, 20:12 Just checked the source, authentication is not implemented yet...
if possible could you look at that? :D :D :D

an otherthing is that i have tried 2 dht 12 on the unit and than it doesn't work any more
no readings then

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#68 Post by LisaM » 09 Aug 2017, 21:07

It crashes after a reboot because it hangs at the portUDP.endpacket call in the syslog function...
Disabling the endpacket (and other portudp calls) means it runs again after a reboot!
Another call at sendSysInfoUDP is also causing problem, at endpacket, disabling it.

*Happy Girl* :D
Last edited by LisaM on 09 Aug 2017, 21:12, edited 1 time in total.

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#69 Post by frank » 09 Aug 2017, 21:10

LisaM wrote: 09 Aug 2017, 21:07 It crashes after a reboot because it hangs at the portUDP.endpacket call in the syslog function...
Disabling the endpacket (and other portudp calls) means it runs again after a reboot!

*Happy Girl* :D
great is that a software fix or settings?

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#70 Post by LisaM » 09 Aug 2017, 21:12

frank wrote: 09 Aug 2017, 21:10
LisaM wrote: 09 Aug 2017, 21:07 It crashes after a reboot because it hangs at the portUDP.endpacket call in the syslog function...
Disabling the endpacket (and other portudp calls) means it runs again after a reboot!

*Happy Girl* :D
great is that a software fix or settings?
Software Fix...
Setting: Don't use syslog logging, ntp or SendUDP cmd! It will kill espeasy after reboot...
Last edited by LisaM on 09 Aug 2017, 21:19, edited 1 time in total.

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#71 Post by frank » 09 Aug 2017, 21:16

okay
there is a lot to fix in this one. But that is to be expected with a test version

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#72 Post by LisaM » 09 Aug 2017, 21:23

So, don't use:
- Syslog
- NTP
- SendUDP message

Not until i've figured out why endpacket is crashing... ;)

Martinus

Re: Arduino Easy 2560

#73 Post by Martinus » 09 Aug 2017, 21:53

Authentication is now added in github, although not tested in any way. It compiles...
Don't forget to add the base64 library to arduino libraries folder

Martinus

Re: Arduino Easy 2560

#74 Post by Martinus » 09 Aug 2017, 22:02

LisaM wrote: 09 Aug 2017, 21:23 So, don't use:
- Syslog
- NTP
- SendUDP message

Not until i've figured out why endpacket is crashing... ;)
I remember to have a unit joining the ESP node list using the UDP system messaging so at a certain point during development UDP should have worked.
But i can't remember if NTP or syslog was tested.

The W5100 only has 4 networksockets so it could be challenging to run multiple protocols. We could end in some concurrency issues that we did not encounter on the ESP that has a lot more resources. The W5100 can also be a bit picky when sockets have to change from TCP <-> UDP.

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#75 Post by LisaM » 09 Aug 2017, 22:16

Martinus wrote: 09 Aug 2017, 22:02 I remember to have a unit joining the ESP node list using the UDP system messaging so at a certain point during development UDP should have worked.
But i can't remember if NTP or syslog was tested.

The W5100 only has 4 networksockets so it could be challenging to run multiple protocols. We could end in some concurrency issues that we did not encounter on the ESP that has a lot more resources. The W5100 can also be a bit picky when sockets have to change from TCP <-> UDP.
I've figured out why it still wasn't working, while serial monitor showed clear signs of life. It turns out that AFTER a reboot the DNS name is changed to

Code: Select all

WIZnetEFFE08
AND that the mac address changed from

Code: Select all

DE:AD:BE:EF:FE:00
to

Code: Select all

DE:AD:BE:EF:FE:08
causing my DHCP server to handout a NEW ip address so the old one didn't work anymore despite static dhcp ip address settings.
On the new address the ArduinoEasy is working just fine...

I can set NTP to on AND reboot without any problems, so only the syslog is causing problems. I'm using the Synology Syslog, maybe that might be the problem also.

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#76 Post by frank » 09 Aug 2017, 22:30

it works like a charm now great :D :D :D :D

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#77 Post by frank » 09 Aug 2017, 23:09

after a few minutes the 2560 stops working so it is not verry stable

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Arduino Easy 2560

#78 Post by LisaM » 10 Aug 2017, 00:11

frank wrote: 09 Aug 2017, 23:09 after a few minutes the 2560 stops working so it is not verry stable
Serial log?

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#79 Post by frank » 10 Aug 2017, 08:42

i wil test ferther today to see where it stops. First thing i saw was that the sd card was not clean so i formated it and did a clean install. know waiting what happens :D

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: Arduino Easy 2560

#80 Post by frank » 10 Aug 2017, 08:51

this are the last entry in the log before crash

0:00:00 : HTTP : closing connection
0:00:00 : DHT12: Temperature: 21.50
0:00:00 : DHT12: Humidity: 61.10
0:00:00 : HTTP : connecting to 192.168.1.167 using port 8090
0:00:00 : /json.htm?type=command&param=udevice&idx=249&svalue=21.50;61.10;0

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests