GithubHelp home page GithubHelp logo

slimline33 / openepaperlink-iobroker-javascript Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 50 KB

A Script for receiving the websocket from the open e-paper link project.

License: GNU General Public License v3.0

openepaperlink-iobroker-javascript's Introduction

OpenEPaperLink JavaScript for IOBROKER

Unfortunately, the original adapter for the iobroker is no longer being developed. I have therefore written a script that retrieves the data. It can't do more than retrieve, but it reacts to the buttons accordingly.

Simply create a new JavaScript with the content of the script. Change the IP address to that of an access point and off you go.

The script creates the folder Open-E-Paper-Link under 0_userdata and in it the displays integrated into the MAC address.

image

Especially the displays (tags) with buttons change the value of “wakeupreason” to 4 or 5 depending on the button pressed. This must then be integrated accordingly in further scripts or blockly and reacted to.

image

Benefits:

  1. WebSocket Connection: Connects to the server using WebSockets and handles events such as open, message receive, close, and error.

  2. Ping/Pong Heartbeat: The script sends a ping every 10 seconds to keep the connection active and receives pong messages.

  3. Data Processing: Parses incoming data and processes it accordingly.

  4. Data Point Creation: For each relevant value in the incoming data stream, a corresponding data point is created in ioBroker.

  5. Non-writable States: All created states are set as "non-writable" (write: false) to prevent them from being modified by the user interface or other scripts.

  6. Dynamic Retrieval and Setting of Additional Data: 6.1 Fetching device dimensions (height and width) based on the hwType. 6.2 Converting the hwType into an uppercase hexadecimal string for the filename. 6.3 Storing additional data such as name, colors, and colortable from an external JSON file based on the hwType.

  7. Error Handling: Extensive error handling throughout the data processing, including logging errors for HTTP requests or data parsing.

openepaperlink-iobroker-javascript's People

Contributors

slimline33 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

openepaperlink-iobroker-javascript's Issues

Ändern des "Zielortes" ?

Das ist jetzt "meckern" auf hohem Niveau.

Du hast im Skript dieses Ziel fest eingetragen.

0_userdata.0.OpenEPaperLink

Ich habe drei APs Jeweils Erd- Ober- und Dachgeschoss.

Entsprechend habe ich die Ziele 0_userdata.0.Tag_Buttons.Erdgeschoss usw.

Macht es viel Arbeit, das der Zielort der Datenpunkte genauso eingestellt werden kann wie die IP-Adresse des APs?

Also vor dem Satz: /// AB HIER NICHTS MEHR ÄNDERN!

Grüße
Manfred

Eine Fehlermeldung erscheint bei der Erstellung der Datenpunkte

Alles funktioniert soweit. Wirklich tolle Arbeit.

Danke

Der Fehler der Erscheint hattes Du ja schon gepostet.

javascript.0 (1401318) script.js.EPS.Websocket2_Test: Object "0_userdata.0.OpenEPaperLink.4467090B10421125" can't be copied: {}

Grüße
Manfred

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.