Zwei Serielle Schnittstellen parallel

Begonnen von Bennemannc, 16 Dezember 2016, 08:14:09

Vorheriges Thema - Nächstes Thema

Bennemannc

Hallo,

kann man eigentlich eine Transparent Bridge mit zwei seriellen Schnittstellen bauen? Dann könnte man einen 433 und einen 868 mit einem ESP anbinden.
Ich bin noch relativ neu bei der ESP Sache - wo gibt es gute Infos zur Programmierung? Was wird genutzt ? Die Arduion IDE ?

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

digiart

Man kann eine zweite serielle Schnittstelle per Software realisieren (--> SoftSerial).

Welche Programmierumgebung man nutzt, hängt von den Vorlieben des Benutzers ab. Für Einsteiger finde ich die Arduino IDE einfacher, da Vieles schon vorbereitet ist und es viele fertige Libraries gibt. Der Nachteil der IDE ist (angeblich), dass sie langsameren Code erzeugt.
Ich habe bisher auch nur mit der IDE gearbeitet.
Anfragen ausserhalb der Threads (PN, Mail o.ä.) werden ignoriert!

immi

Zitat von: Bennemannc am 16 Dezember 2016, 08:14:09
Hallo,
kann man eigentlich eine Transparent Bridge mit zwei seriellen Schnittstellen bauen? Dann könnte man einen 433 und einen 868 mit einem ESP anbinden.
Ich bin noch relativ neu bei der ESP Sache - wo gibt es gute Infos zur Programmierung? Was wird genutzt ? Die Arduion IDE ?
Gruß Christoph
Yes.
I am using 1 esp8266 for 2 serial ports since half a year: one for the normal ENBW-powermeeter (port 1234) and one for the ENBW-heatpump-powermeeter (port4321)
One is the normal serial2net, one is a softserial2net.
I connect both to the FHEM 47_OBIS.pm with wlan.
http://www.letscontrolit.com/forum/viewtopic.php?f=6&t=1087#p5915
In the meanwhile I updated the plug-in, if I remember this weekend I can send you the last version.

immi

Bennemannc

Hello,

yes of corse, that would be fine - thanks

Regards Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

immi

Hi Christoph
anbei findest du mein plugin für espeasy und softwareserial2net
1) get espeasy working
2) add the file to the working directory
3) compile
4) flash
5) set the speed (the pin numbers are hardcoded in the plugin, sorry)
6) reboot the esp8266

p.s. I am using very low speed 9600; therefore I added a further sensor to measure humidity and temp in my basement. The avarage load of my esp8266 is about 10%. The module has tons of potential for optimization.
immi

Bennemannc

Hallo,

also könnte man diese Plugin auch noch einmal umschreiben und noch eine weitere (also 3) serielle Schnittstellen erzeugen ? Wie werden diese denn dann auf Fhem Seite auseinader gehalten ? Über Ports oder wie geht das ?

Gruß Christoph
Cubietruck, Fhem 5.8
CC-RT-DN|LC-SW2-FM|RC-12|RC-19|LC-SW4-BA-PCB|LCp-SW1-BA-PCB|ES-PMSw1-Pl|LC-Bl1PBU-FM|PBI-4-FM|CC-VD|CC-TC|SEC-SC(2)|RC-KEY3-B|LC-Sw1PBU-FM|PB-2-FM|WDS100-C6-O|WDC7000|LC-Bl1-FM
Module: Dewpoint,FB_Callmonitor,HCS,Panstamp,at,notify,THRESHOLD,average,DOIF

immi

Zitat von: Bennemannc am 18 Dezember 2016, 19:53:32
also könnte man diese Plugin auch noch einmal umschreiben und noch eine weitere (also 3) serielle Schnittstellen erzeugen ?
I am not so optimistic, you have to try

Wie werden diese denn dann auf Fhem Seite auseinader gehalten ? Über Ports oder wie geht das ?

with the port
e.g. esp8622 has a ip 10.0.x.y
1234 (hardware serial) and 4321 (software serial)
define PowerMeter OBIS 10.0.x.y:1234
define PowerMeterDouble OBIS 10.0.x.y:4321