Giter Club home page Giter Club logo

Comments (18)

jimmyeao avatar jimmyeao commented on September 27, 2024 1

When I try and turn off from Hassio, it sends
setScreen = {'sleepMode': true}
image

But doesn't turn off the screen
On previous versions, this worked (I downgraded one to 2.3.2 to test)

Just to add, brightness control from HA doesnt seem to work either, it sends
setScreen = {'sleepMode': false, 'brightness': 156}

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024 1

I close this topic now. Feel free to reopen if the problem with the latest 2.5.0 release still appears.

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

to add, using HA to manually set the state, I can turn it off:
image

I dont have this issue with any other MQTT devices, they turn on and off as expected

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

rolled back to 2.3.2, fixes it for now

from pixelit.

gaetanars avatar gaetanars commented on September 27, 2024

Same issue here on D1 Mini

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024

I dont use HA. Are you firm with mqtt? I need the mqtt payload you send to turn on/off the leds. With node red the sleep mode works without problems..

from pixelit.

gaetanars avatar gaetanars commented on September 27, 2024

The MQTT Payload is available throught homeassistant discovery that is define here :

PixelIt/src/PixelIt.ino

Lines 2943 to 2984 in e6865d9

// LED Matrix on/off + brightness light
configPayloadTemplate = String(F(
"{"
"\"dev\":{"
"\"ids\":\"#DEVICEID#\","
"\"name\":\"#HOSTNAME#\","
"\"mdl\":\"PixelIt\","
"\"mf\":\"PixelIt\","
"\"sw\":\"#VERSION#\","
"\"cu\":\"#IP#\""
"},"
"\"avty_t\":\"#MASTERTOPIC#state\","
"\"pl_avail\":\"connected\","
"\"pl_not_avail\":\"disconnected\","
"\"uniq_id\":\"#DEVICEID##SENSORID#\","
"\"name\":\"#SENSORNAME#\","
"\"schema\":\"template\","
"\"stat_t\":\"#MASTERTOPIC##STATETOPIC#\","
"\"stat_tpl\":\"{{ \'on\' if value_json.sleepMode is false else \'off\' }}\","
"\"cmd_t\":\"#MASTERTOPIC##COMMANDTOPIC#\","
"\"cmd_on_tpl\":\"{\'sleepMode\': false {%- if brightness is defined -%}, \'brightness\': {{ brightness }}{%- endif -%}}\","
"\"cmd_off_tpl\":\"{\'sleepMode\': true}\","
"\"bri_tpl\":\"{{ value_json.currentMatrixBrightness }}\","
"\"icon\":\"mdi:#ICON#\""
"}"));
configPayloadTemplate.replace(F("#DEVICEID#"), deviceID);
configPayloadTemplate.replace(F("#HOSTNAME#"), hostname);
configPayloadTemplate.replace(F("#VERSION#"), VERSION);
configPayloadTemplate.replace(F("#MASTERTOPIC#"), mqttMasterTopic);
configPayloadTemplate.replace(F("#IP#"), ip_url);
topic = configTopicTemplate;
topic.replace(F("#COMPONENT#"), F("light"));
topic.replace(F("#SENSORID#"), F("LEDMatrixLight"));
payload = configPayloadTemplate;
payload.replace(F("#SENSORID#"), F("LEDMatrixLight"));
payload.replace(F("#SENSORNAME#"), F("LED Matrix"));
payload.replace(F("#STATETOPIC#"), F("matrixinfo"));
payload.replace(F("#COMMANDTOPIC#"), F("setScreen"));
payload.replace(F("#ICON#"), F("led-strip"));
client.publish(topic.c_str(), payload.c_str(), true);

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024

Hey guys, you all have Hassio running?

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

I do...

Hey guys, you all have Hassio running?

from pixelit.

gaetanars avatar gaetanars commented on September 27, 2024

The error in the pixels is :

[2023-11-05T18:52:32] MQTT_callback: JSON length mismatch! JSON Message to long :(
[2023-11-05T18:52:32] MQTT_callback: Incoming JSON (Topic: Haus/PixelIt/setScreen, Length: 19/18) 

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024

Please test the 2.4.6-beta release and give us feedback

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

The Beta fixes power on and off but not brightness

Please test the 2.4.6-beta release and give us feedback

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

Will there be a further fix for brightness?

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024

Ups, i closed the wrong issue. I will check the brightness issue soon.

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024

i see the problem. i optimized the code and sleep mode on/off cant combined with other options now. The brightness will be restored when sleep mode ended. To set a new brightness, you could send them alone. Do you need the option to send end sleepmode and set a new brightness?

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

i see the problem. i optimized the code and sleep mode on/off cant combined with other options now. The brightness will be restored when sleep mode ended. To set a new brightness, you could send them alone. Do you need the option to send end sleepmode and set a new brightness?

Yes, the way Hassio send the command (for some reason) is
setScreen = {'sleepMode': false, 'brightness': 201} regardless of the sleepmode, its sending them together

from pixelit.

foorschtbar avatar foorschtbar commented on September 27, 2024

Please test the 2.4.8-beta release and give us feedback.

from pixelit.

jimmyeao avatar jimmyeao commented on September 27, 2024

Please test the 2.4.8-beta release and give us feedback.

Will test this afternoon, thank you :)

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.