eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
222 stars 61 forks source link

Broadlink SC1 doesn't work with Power on #60

Closed beamzer closed 4 years ago

beamzer commented 4 years ago

Hi, I have a SC1, which is essential an SP2 but in a different enclosure. It gets detected by the software, but as Unknown. That might be the problem, because when i try to power-on, it gives me an error:

[2020-03-04 12:34:52,502] DEBUG Connected to 'Unknown' Broadlink device at '192.168.88.123' (MAC 34:ea:34:aa:bb:cc) and started listening for commands at MQTT topic having prefix 'broadlink/'
[2020-03-04 12:34:52,512] DEBUG Connected to MQTT broker, subscribing to topic broadlink/#
[2020-03-04 12:40:30,130] DEBUG Received MQTT message broadlink/power on
[2020-03-04 12:40:30,131] WARNING Unrecognized MQTT message on

This is what i send from my mac:

mosquitto_pub -d -h 192.168.88.254 -p 1883 -m "on" -t "broadlink/power"
Client mosqpub|55733-my-Mac sending CONNECT
Client mosqpub|55733-my-Mac received CONNACK (0)
Client mosqpub|55733-my-Mac sending PUBLISH (d0, q0, r0, m1, 'broadlink', ... (2 bytes))
Client mosqpub|55733-my-Mac sending DISCONNECT

So, am i correct, that being detected as Unkown also is the cause of why the power on doesn't work? Is there a way let the SC1 being detected as an SP2, or something else i can do to make this work?

thanks in advance, Ewald....

eschava commented 4 years ago

Have you checked the similar issue https://github.com/eschava/broadlink-mqtt/issues/34

beamzer commented 4 years ago

ah, missed that one. Thanks, it now works!

mosquitto_pub -d -h 192.168.88.254 -p 1883 -m "on" -t "broadlink/power"
Client mosqpub|97421-my-mac sending CONNECT
Client mosqpub|97421-my-mac received CONNACK (0)
Client mosqpub|97421-my-mac sending PUBLISH (d0, q0, r0, m1, 'broadlink/power', ... (2 bytes))
Client mosqpub|97421-my-mac sending DISCONNECT
[2020-03-04 16:13:25,405] DEBUG Received MQTT message broadlink/power on
[2020-03-04 16:13:25,406] DEBUG Setting power state to True
mosquitto_pub -d -h 192.168.88.254 -p 1883 -m "off" -t "broadlink/power"
Client mosqpub|97421-my-mac sending CONNECT
Client mosqpub|97421-my-mac received CONNACK (0)
Client mosqpub|97421-my-mac sending PUBLISH (d0, q0, r0, m1, 'broadlink/power', ... (3 bytes))
Client mosqpub|97421-my-mac sending DISCONNECT
[2020-03-04 16:13:39,528] DEBUG Received MQTT message broadlink/power off
[2020-03-04 16:13:39,529] DEBUG Setting power state to False
[2020-03-04 16:13:39,734] DEBUG Sending SP energy 0.01 to topic broadlink/energy
[2020-03-04 16:14:07,875] DEBUG Sending SP energy 0.01 to topic broadlink/energy
[2020-03-04 16:14:37,965] DEBUG Sending SP energy 0.01 to topic broadlink/energy
beamzer commented 4 years ago

& closed