Giter Club home page Giter Club logo

Comments (15)

foorschtbar avatar foorschtbar commented on August 22, 2024

Did you only notice the error message or is there also a problem?

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

Did you only notice the error message or is there also a problem?

There is a message in the LOG and PixelIT does not execute the command.

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

In firmware 2.3.2 in LOG i have MQTT_callback: Incomming JSON (Length: 1405), but in firmware 2.4.3 i have
MQTT_callback: JSON length mismatch! JSON Message to long
MQTT_callback: Incoming JSON (Topic: Dom/PixelIt/setScreen, Length: 1641/1405)

from pixelit.

foorschtbar avatar foorschtbar commented on August 22, 2024

How do you send the message?
Could you share here the message you send?

Background: In 2.4x, when the input payload and parsed json lenght mismatch, normally the json was to big or is malformed.

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

I send message from Home Assistant via MQTT.
For example I tested this message:

{
    "text": {
        "textString": "Pixel it 😀",
        "scrollText": "auto",
        "bigFont": false,
        "centerText": false,
        "scrollTextDelay": 40,
        "hexColor": "#FFFFFF",
        "position": {
            "x": 0,
            "y": 1
        }
    }
}

image

from pixelit.

foorschtbar avatar foorschtbar commented on August 22, 2024

I need the raw mqtt message. Maybe you could try MQTT.fx or similar, connect to your broker and subscribe to Dom/PixelIt/setScreen and capture the message.

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

I only have MQTT explorer

image

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

In MQTT explorer I also put string and not working.

image

from pixelit.

foorschtbar avatar foorschtbar commented on August 22, 2024

Thank u. I try to reproduce it in the next days.

from pixelit.

smerschjohann avatar smerschjohann commented on August 22, 2024

I get the same error. The error happens because of the check on the json length (length != json.measureLength()), which I don't really understand. Why is this even checked?

This means that every mqtt json must be minified before sending, otherwise this will never match.

After parsing the JSON file, it does not have to be the same length as the received json. The parser will happily ignore spaces etc.

You can verify this by e.g.

{
  "text": {
    "textString": "Test It :D",
    "bigFont": true,
    "scrollText": "auto",
    "scrollTextDelay": 20,
    "centerText": false,
    "position": {
      "x": 8,
      "y": 1
    },
    "color": {
      "r": 255,
      "g": 255,
      "b": 255
    },
    "hexColor": "#FFFFFF"
  }
}

vs.

{"text":{"textString":"Test It :D","bigFont":true,"scrollText":"auto","scrollTextDelay":20,"centerText":false,"position":{"x":8,"y":1},"color":{"r":255,"g":255,"b":255},"hexColor":"#FFFFFF"}}

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

@smerschjohann I checked, it actually works after proper formatting of the payload, but it is very awkward to write.

@foorschtbar Will this be fixed in the firmware or should I correct formating of all automations?

from pixelit.

foorschtbar avatar foorschtbar commented on August 22, 2024

Please test the 2.4.6-beta release and give us feedback

from pixelit.

sp7dpt avatar sp7dpt commented on August 22, 2024

Please test the 2.4.6-beta release and give us feedback

I tested the firmware 2.4.6-beta and everything works fine

from pixelit.

foorschtbar avatar foorschtbar commented on August 22, 2024

thank u. I close this issue and hope #323 and #218 will also be fixed with this.

@smerschjohann fell free to reopen you not working for you

from pixelit.

smerschjohann avatar smerschjohann commented on August 22, 2024

@foorschtbar thanks a lot, it works for me as well :)

from pixelit.

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.