NSPManager / NSPanelManager

Sonoff NSPanel custom firmware for responsive and intuitive use
https://discord.gg/RwXvAH56fE
195 stars 14 forks source link

Switches do not turn on when trying to do this over the NSPanel #178

Closed Xtiger123X closed 2 months ago

Xtiger123X commented 2 months ago

Describe the bug All my devices (switches) do not turn on over the NSPanel. When I use HomeAssistant they work without problems. Also my dimmable lights (like Nanoleafs,WLED,Zigbee Bulb) work without problems.

To Reproduce Steps to reproduce the behavior:

  1. Have a device that's not dimmable (like Shelly, zigbee plug, zigbee switch)
  2. Add it to the Manager

Expected behavior Normally the device should turn on.

Screenshots I will add some later.

Environment info (please complete the following information):

Additional context None (yet)

tpanajott commented 2 months ago

@Xtiger123X, a user commented here and linked to a "fix". DO NOT DOWNLOAD IT. That user is not a member of the project, I have reported the account to GitHub and they have taken action against it. You probably already knew this, but you can never be too sure. Thanks for reporting the issue. I'll get to it as soon as I can.

tpanajott commented 2 months ago

I tested this just now and it does work for me. Can you turn on trace logging in the settings and then try to turn the light on. After that, can you send over the last ~50 lines or so from the MQTTManager log (it's available for download in the "Logging" section under "Settings" in the manager).

Xtiger123X commented 2 months ago

Sorry for not answering, didn’t get the time to look into it. I guess i found the part that is not working in the log:

2024-09-07 02:35:18.657] [trace] [light.cpp:114] [510] Requested light 6::Decken Licht to be brightness 1. [2024-09-07 02:35:18.657] [trace] [light.cpp:94] [510] Requested light 6::Decken Licht be turned on. [2024-09-07 02:35:18.657] [trace] [home_assistant_manager.cpp:152] [510] [HA WS] Sending data: {"domain":"switch","id":3,"service":"switch_on","target":{"entity_id":"switch.schalter_badezimmer_right"},"type":"call_service"} [2024-09-07 02:35:18.660] [error] [home_assistant_manager.cpp:107] [517] [HA WS] Command failed. Data: {"id":3,"type":"result","success":false,"error":{"code":"not_found","message":"Service switch.switch_on not found.","translation_key":"service_not_found","translation_placeholders":{"domain":"switch","service":"switch_on"},"translation_domain":"homeassistant"}}

[2024-09-07 02:35:19.559] [trace] [light.cpp:114] [510] Requested light 7::Spiegel Licht to be brightness 1. [2024-09-07 02:35:19.559] [trace] [light.cpp:94] [510] Requested light 7::Spiegel Licht be turned on. [2024-09-07 02:35:19.559] [trace] [home_assistant_manager.cpp:152] [510] [HA WS] Sending data: {"domain":"switch","id":4,"service":"switch_on","target":{"entity_id":"switch.schalter_badezimmer_left"},"type":"call_service"} [2024-09-07 02:35:19.561] [error] [home_assistant_manager.cpp:107] [517] [HA WS] Command failed. Data: {"id":4,"type":"result","success":false,"error":{"code":"not_found","message":"Service switch.switch_on not found.","translation_key":"service_not_found","translation_placeholders":{"domain":"switch","service":"switch_on"},"translation_domain":"homeassistant"}}

The service "switch.switch_on" doesn’t exist , I guess it shloud be "switch.turn_on".

tpanajott commented 2 months ago

Yhea, i guess so. What home Assistant version are you running?

Xtiger123X commented 2 months ago

Core 2024.9.1

Supervisor 2024.08.0

Operating System 13.1

Frontend 20240906.0

tpanajott commented 2 months ago

Thanks. I'll try and take a second look tonight.

tpanajott commented 2 months ago

There was indeed an issue. Will push out a new beta and stable to fix this bug.