TOP
SSV Software Systems Register  Register
Log in to check your private messages  Log in to check your private messages
Startseite FAQ Search Mitglieder Profile  Log in 
SSV Support-Forum
Node.js …

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> eSOM/3517
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 07.06.2013, 09:55    Post subject: Node.js … Reply with quote

Hallo Forum.

Für das Linux des eSOM/3517 wird eine Node.js-Portierung (v.0.10.9) entwickelt. Die Testphase ist bereits angelaufen. Falls sich jemand an den Tests beteiligen möchte, bitte melden.

Gruß

KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 13.10.2015, 21:55    Post subject: Node-RED … Reply with quote

Hallo Forum.

In die Node.js-Implementierung lässt sich auch Node-RED (A visual tool for wiring the Internet of Things - siehe http://nodered.org/) einbauen. Damit lassen sich sehr einfach Daten- und Protokollkonverter erstellen.

Gruß KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 21.12.2015, 22:35    Post subject: MQTT-Verbindungsunterbrechung … Reply with quote

Hallo Forum.

In den Log-Daten eines eSOM/3517 mit der neuen Cloud-Gateway-Firmware (Node.js, Node-Red, RTDC-API usw.) findet man Hinweise darauf, dass die Internet-Verbindung zu einem RTDC-MQTT-Broker immer wieder unterbrochen wird. Siehe zum Beispiel die folgenden Zeilen:

Code:
21 Dec 03:46:37 - ... connection lost to broker tcp://mqtt.ssv-connect.de:80
21 Dec 03:46:52 - ... connected to broker tcp://mqtt.ssv-connect.de:80


Dieses Verhalten ist normal. Der MQTT-Client eines eSOM/3517 hält eine dauerhafte TCP-Socketverbindung zum Broker. Wenn nun der Router alle paar Stunden (min. 1x alle 24 Stunden) eine Zwangstrennung zum Internet mit anschließendem Neuverbindungsbau durchführt, wird auch die MQTT-Socketverbindung unterbrochen. Der eSOM/3517-MQTT-Client bemerkt dies allerdings und erzeugt sofort eine neue Verbindung.

Gruß KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 08.01.2016, 07:34    Post subject: Modbus-Anwendungen … Reply with quote

Hallo Forum.

Modbus-Anwendungen lassen sich für den eSOM/3517 auch mit Hilfe von Node-Red entwickeln. Siehe

https://ssv-embedded.de/doks/manuals/Modbus2Cloud_Intro.pdf

und

https://ssv-embedded.de/doks/manuals/MQTT4Sensors_Intro.pdf

Die Texte wurden zwar für ein IGW/935 geschrieben, gelten aber auch uneingeschränkt für einen eSOM/3517 mit Node.js und Node-RED-Laufzeitumgebung, da diese Baugruppe im IGW/935 zum Einsatz kommt.

Gruß KDW


Last edited by kdw on 11.02.2016, 06:37; edited 2 times in total
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 31.01.2016, 08:24    Post subject: Zurück in die Python-Welt … Reply with quote

Hallo Forum.

Mittels Node-Red lassen sich sehr einfach Verbindungen zwischen einem SSV-Gateway und einer Cloud herstellen. Was aber ist zu tun, wenn man die Daten aus einer Cloud in der Python-Laufzeitumgebung eines Gateways weiter bearbeiten möchte? Muss in den Python-Code ebenfalls der gesamte Code für das Cloud-Interface eingebaut werden?

Nein. Mit Hilfe eines TCP Socket Output Node lässt sich zum Beispiel eine „Brücke“ aus der Node-Red-Umgebung zur Python-Laufzeitumgebung eines SSV-Gateway schaffen.



Wir müssen lediglich einen einfachen TCP- Socket-Client in Python schreiben, der sich über 127.0.0.1:1234 (localhost) mit dem TCP Socket Output Node verbindet:

Code:
import socket
import sys

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 1234))
data = s.recv(1024)
while len(data):
  sys.stdout.write(data)
  data = s.recv(1024)
s.close()


Dieser TCP-Socket-Client muss per Kommandozeile zur Ausführung gebracht werden. Dafür können wir per Webbrowser den Shell-in-a-Box-Service öffnen:



Bitte beachten: Der Shell-in-a-Box-Service muss auf einem SSV-Gateway über die WebConfig-Oberfläche eingeschaltet werden. Siehe Services => General. Im Auslieferzustand ist dieser Service deaktiviert.

Gruß KDW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> eSOM/3517 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV Software Systems GmbH

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2023 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015