<div dir="ltr">Hi Christian,<br><div class="gmail_extra"><br><div class="gmail_quote">2016-05-13 18:00 GMT+02:00 Christian Schnellrieder <span dir="ltr"><<a href="mailto:schnellrieder.cs@gmail.com" target="_blank">schnellrieder.cs@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Nicht eingetragen. Brauch ich den?</div></blockquote><div><br></div><div>Das Frontend spricht WAMP- ein spezielles Protokoll das websockets nutzt. Schau Dir <a href="https://github.com/volkszaehler/volkszaehler.org/blob/master/htdocs/frontend/javascripts/init.js#L132">https://github.com/volkszaehler/volkszaehler.org/blob/master/htdocs/frontend/javascripts/init.js#L132</a> an: das Frontend versucht es <br><br></div><div>1)  auf der Adresse wo auch das Frontend gehostet wird, aber unter /ws als Pfad. Wenn konfiguriert könnte da die Apache Weiterleitung greifen<br></div><div>2) oder- wenn das nicht funktionier- direkt auf dem Port der für WAMP konfiguriert ist<br></div><div><br></div><div>Damit Beides mit als auch ohne weitere Apachekonfiguration funktioniert lauscht der Pushserver via WAMP auf / und /ws am konfigurierten Port. Der muss entweder extern zugreifbar sein oder via Apache weiter geleitet.<br></div><div><br>Im Gegensatz dazu kann Node-red nur "nackte/plain" websockets ohne weitere Module. Dafür bietet es sich an _nicht_ /ws oder / zu nehmen weil Du dann damit das Frontend abhängst. Daher der Vorschlag /socket dafür zu konfigurieren.<br><br></div><div>Sollte eigentlich so aus dem Diagramm hervor gehen :O<br></div><div><br></div><div>Viele Grüße,<br></div><div>Andreas<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5"><br><div class="gmail_quote"><div dir="ltr">Andreas Götz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Fr., 13. Mai 2016 um 17:57 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>Was hast Du mit dem Config Eintrag für WAMP gemacht???</div></div><div dir="auto"><div><br>Am 13.05.2016 um 16:43 schrieb Christian Schnellrieder <<a href="mailto:schnellrieder.cs@gmail.com" target="_blank">schnellrieder.cs@gmail.com</a>>:<br><br></div></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr">Hallo Andreas,<div><br></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div>an der Baustelle bin ich noch dran. Aktuell kann ich einstellen was ich will... es zeigt nur eine Veränderung ins negative.. (keine Verbindung mehr Möglich)</div><div><br></div><div>Aktuell habe ich folgende Settings:</div><div>/var/www/<a href="http://volkszaehler.org/etc/volkszaehler.conf.php" target="_blank">volkszaehler.org/etc/volkszaehler.conf.php</a><br></div><div><div>$config['push']['enabled'] = true;              // set to true to enable push updates</div><div>$config['push']['server'] = 5582;               // vzlogger will push to this ports (binds on 0.0.0.0)</div><div>$config['push']['broadcast'] = 8082;    // frontend will subscribe on this port (binds on 0.0.0.0)</div><div>$config['push']['routes']['websocket'] = array('/');</div></div><div><br></div><div><br></div><div>In der Apache Config:</div><div><span style="line-height:1.5">LoadModule proxy_module modules/mod_proxy.so</span><br></div><div><div>LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so</div><div><br></div><div><Location "/ws"></div><div>    ProxyPass ws://localhost:8082</div><div></Location></div></div><div><br></div><div><br></div><div>Mit /socket mag es nicht so recht.</div><div><br></div><div><div style="font-family:"helvetica neue",helvetica,arial,sans-serif">/var/www/<a href="http://volkszaehler.org/etc/volkszaehler.conf.php" target="_blank">volkszaehler.org/etc/volkszaehler.conf.php</a><br></div><div style="font-family:"helvetica neue",helvetica,arial,sans-serif"><div>$config['push']['enabled'] = true;              // set to true to enable push updates</div><div>$config['push']['server'] = 5582;               // vzlogger will push to this ports (binds on 0.0.0.0)</div><div>$config['push']['broadcast'] = 8082;    // frontend will subscribe on this port (binds on 0.0.0.0)</div><div>$config['push']['routes']['websocket'] = array('/socket');</div><div><br></div><div>Node-Red gibt dann einen Verbindungs Fehler aus.</div><div>In der Debug Console vom Volkszähler sieht man folgende Ausgabe:</div><div><br></div></div></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><Clipboard02.jpg><div><br></div><div>Grüße</div><div><br></div><br><div class="gmail_quote"></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Fr., 13. Mai 2016 um 16:25 Uhr:<br></div></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Servus,<br><br></div>wenn ich Dein Bild richtig deute dann connectest Du Dich auf /ws. Das sieht aus als hättest Du dafür WAMP abgeschaltet und nus websockets in der vz Config aktiviert?<br><br></div>Wäre nicht falsch bedeutet aber dass das VZ Frontend keine Updates mehr bekäme wenn Du das nicht auch umkonfiguriert hast. Im Zweifelsfall ist der Vorschlagswert /socket vielleicht geeigneter.<br><br></div>Viele Grüße,<br></div>Andreas</div></blockquote></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div class="gmail_extra"><div class="gmail_quote">2016-05-13 15:35 GMT+02:00 Christian Schnellrieder <span dir="ltr"><<a href="mailto:schnellrieder.cs@gmail.com" target="_blank">schnellrieder.cs@gmail.com</a>></span>:<br></div></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hallo.</div><div><br></div><div>Es lebt :)</div><div>Nach zwei Tagen habe ich heute einen "neustart" gemacht und war rel schnell am Ziel.</div><div><br></div><div><br></div></div></blockquote></div></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><ws_vz.jpg><div>Grüße</div><div><div><br><br><br><div class="gmail_quote"><span><div dir="ltr">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Mi., 11. Mai 2016 um 11:59 Uhr:<br></div></span><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Christian,<br><div class="gmail_extra"><br><div class="gmail_quote"></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-05-11 10:58 GMT+02:00 Christian Schnellrieder <span dir="ltr"><<a href="mailto:schnellrieder.cs@gmail.com" target="_blank">schnellrieder.cs@gmail.com</a>></span>:<br></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hallo Andreas,<div><br></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>erster Punkt ist erledigt. Auf meinem Live System läuft nun eine Version die dem Pullrequest 430 entspricht.</div><div><span style="line-height:1.5">Ich hab jetzt mal </span><a href="https://github.com/andig/volkszaehler.org/blob/push-sockets/misc/tools/push-server.md" style="line-height:1.5;font-family:"helvetica neue",helvetica,arial,sans-serif" target="_blank">https://github.com/andig/volkszaehler.org/blob/push-sockets/misc/tools/push-server.md</a><span style="line-height:1.5"> studiert....</span><br></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Die Architecture beschreibt folgenden flow:</span></div><div><span style="line-height:1.5">vzlogger ==http ==> push server == webSockets ==> node red</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Also richtige ich jetzt einfach im vzlogger einen push server ein. </span></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"></div></blockquote><div><br></div><div>Jaein. Im vzlogger richtest Du ein das er alle(!) Daten irgendwohin "pusht". Der Gag ist dass dabei aggtime etc. umgangen werden, also wirklich _jeder_ Meßwert weiter gereicht wird den man vielleicht auch nicht in der MW speichern will (wer will schon sekundengenauen Stromverbraucht, Stichwort Speichermenge und Performance).<br> <br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span style="line-height:1.5">Nur was hat das ganze jetzt nun mit dem front end zu tun?</span></div></div></blockquote><div> <br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Es gibt im Diagramm zwei Wege:<br><br><span style="line-height:1.5"><br></span><span style="line-height:1.5">1. vzlogger ==http ==> push server == WAMP ==> frontend</span><br><span style="line-height:1.5">2. vzlogger ==http ==> push server == webSockets ==> node red<br><br></span></div><div><span style="line-height:1.5">Der erste Weg existiert heute schon- damit bekommt das Frontend die Echtzeitupdates wenn eingeschaltet.<br></span></div><div><span style="line-height:1.5">Der zweite Weg (von Dir oben angegeben) ist neu- und hat insofern mit dem Frontend also nix zu tun außer dass die gleichen Komponenten verwendet werden.<br><br></span></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span style="line-height:1.5"><br></span></div>Verstehe ich das richtig... das in der volkszaehler.conf.php  eine "Umleitung" eingestellt wird <br>$config['push']['routes']['websocket']: /socket</div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Nicht wirklich eine Umleitung. Das bedeutet dass der pushserver auf /socket auf WebSocket Verbindungen wartet die er dann mit Daten versorgt- darauf muss ich Dein node-red also verbinden (= Weg 2).<br> <br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div><br></div><div>Somit kann man dann über das Frontend... den "pushserver" abfragen?</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Wieder jaein. Der Push-server versorgt das Frontend wenn sich dieses via WAMP auf einem konfigurierten Pfad verbindet (=Weg 1):<br><br><span><span><span>$config</span>[<span><span>'</span>push<span>'</span></span>][<span><span>'</span>routes<span>'</span></span>][<span><span>'</span>wamp<span>'</span></span>] <span>=</span> <span>array</span>(<span><span>'</span>/<span>'</span></span>, <span><span>'</span>/ws<span>'</span></span>);          <br><br></span></span></div><div><span><span>In init.js ist codiert dass wir das auf /ws oder direkt auf / versuchen.<br></span></span></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div><br></div><div>Grüße<br></div></div></blockquote><div><br></div><div>Viele Grüße,<br></div><div>Andreas<br><br></div><div>PS.: Hast Du nicht Lust zum VZ Treffen zu kommen? Dann könnten wir das auch live zusammenbasteln ;)<br> <br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div><div><br></div><div> <span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;line-height:21.76px;background-color:rgba(0,0,0,0.04)"><br></span></div><div><span style="line-height:1.5"><br></span></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div><div><br><div class="gmail_quote"><div dir="ltr">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Do., 5. Mai 2016 um 11:31 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Moin Christian,<br><br></div>schau mal hier: <a href="https://github.com/volkszaehler/volkszaehler.org/pull/430" target="_blank">https://github.com/volkszaehler/volkszaehler.org/pull/430</a><br><br></div>insbesondere lege ich Dir <a href="https://github.com/andig/volkszaehler.org/blob/push-sockets/misc/tools/push-server.md" target="_blank">https://github.com/andig/volkszaehler.org/blob/push-sockets/misc/tools/push-server.md</a> ans Herz, da hab ich mal die Logik zusmammen geschrieben.<br><br></div>Viele Grüße,<br></div>Andreas<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-05 10:45 GMT+02:00 Christian Schnellrieder <span dir="ltr"><<a href="mailto:schnellrieder.cs@gmail.com" target="_blank">schnellrieder.cs@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hallo Andreas,<span><div><br></div><div><div>>Wenn Du ein Update auf mein Repo nicht scheust und den node-red Teil selber basteln willst sag Bescheid.</div></div><div><br></div></span><div>Ja würde ich gerne testen.</div><div>o Unter welchen Link bzw. welchen branch liegen die Änderungen?</div><div><br></div><div>Grüße</div><div><br></div><div><br></div></div><div><div><br><div class="gmail_quote"><div dir="ltr">Andreas Götz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Di., 3. Mai 2016 um 19:42 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>Hallo Christian,</div></div><div dir="auto"><div><br>Am 29.04.2016 um 10:14 schrieb Christian Schnellrieder <<a href="mailto:schnellrieder.cs@gmail.com" target="_blank">schnellrieder.cs@gmail.com</a>>:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hallo.<div><br></div><div>Spät aber doch. Ich hab mir node-red angesehen und bin begeistert. Also von meiner Seite her... ja der Bedarf wäre da.</div></div></div></blockquote><div><br></div></div><div dir="auto">Ich hab mittlerweile was zusammengehackt das gut genug für einen ersten Test sein sollte. Erweiterung des push-servers mit zusätzlichem WebSocket Support. Wenn mans elegant mach dann Http/ Wamp/ Websocket über einen einzigen externen Port.<div><br></div><div>Wenn Du ein Update auf mein Repo nicht scheust und den node-red Teil selber basteln willst sag Bescheid.</div><div><br></div><div>Viele Grüße, Andreas </div></div><div dir="auto"><div><br><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div><br></div><div>Grüße und noch ein schönes Wochenende,</div><div>Christian</div></div><br><div class="gmail_quote"><div dir="ltr">Andreas Goetz <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>> schrieb am Mo., 14. März 2016 um 17:27 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hallo Zusammen,<br><br></div>einige von Euch kennen vielleicht node-red, eine drag-und-drop Entwicklungsumgebung und Runtime auf Basis von nodejs um IoT Applikationen mit wirklich wenig Aufwand zusammenzustöpseln.<br><br></div>Damit lässt sich natürlich auch die Vz Middleware ansprechen oder Daten daraus weiter verarbeiten (@Patrick: hatte auch an Dich gedacht ;).<br><br></div>Gibt es Bedarf dafür, vorgefertige Nodes für node-red zur Verfügung zu stellen? Ich dahte an sowas wie:<br><br></div>- read channel<br></div>- write channel<br></div>- get channel details<br><br></div>und evtl. auch unsere Echtzeitupdates.<br><br></div>Wäre auch ein interessantes Thema für unser Entwicklertreffen...<br><br></div>Viele Grüße,<br></div>Andreas<br><br></div>
</blockquote></div>
</div></blockquote></div></div></div></blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div></div></div></blockquote></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div></blockquote></div>
</div></div></blockquote></div><br></div></div>