Code Monkey home page Code Monkey logo

Comments (2)

lanwin avatar lanwin commented on September 13, 2024

Hi @betaphi, yes your are right. The entire communication of NASA is based on messages. All units receive that messages and the ones with the desired destination address reacts to that massage. There are some generic addresses like Broadcast etc. Also that entire protocol is pretty generic. Its basically there to interchange variables (MessageNumber its Value).

Currently I have impl a very simple way of sending the messages. I put them in a queue and send them on the receiving thread when there is no more data available. This should reduce collections but costs some time (when there are a lot data available).

Inside the S-NET code there is a way of handling this. Each message have a packetNumber. That is basically and Integer witch is incremented for each messages that is getting sent.
In example when you change the target temperature you the a message of DataType::Request. Then other side generates a message of data type DataType::Response with the same packetNumber. So basically it should be possible to send a request, wait and check if the reponse comes and if not, resend the request.

I saw code inside the S-NET code but I did not tried it myself yet. I dont now if every request gets a response etc.

Also I noticed that between the messages there are something like filler bytes. The S-NET code calls them permeable, but I have no clue why they are there.

from esphome_samsung_ac.

betaphi avatar betaphi commented on September 13, 2024

Hello @lanwin, thank you for your response.

The interesting thing about the EHS ASHP is that while I (and others) have recorded the NASA-Stream, it never sends messages with other destinations than just broadcast. I find that pretty notable. Maybe you see different results with the air conditioners.

The preamble you mentioned (and I have noticed also) could in fact be a measure in order to combat collisions given that there is no clear master - slave pattern with NASA.

from esphome_samsung_ac.

Related Issues (20)

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.