Hallo User Gemeinde,
Ich hänge grad irgendwie an einer Stelle. Ich hab mir einen Wifi Switch von Sonoff angeschafft und mit der Tosmata Firmware geflashed. Hab den Mosquito Server auf der selben Maschine wie SmarthomeNG am laufen, hier mal wie es aktuell aussieht:
Ein Item hab ich angelegt (noch im alten conf Format):
[Sonoff]
[[Weihnachten]]
[[[Status]]]
name = weihnachten_in
type = foo
mqtt_topic_in = 'stat/sonoff/POWER'
plugin.yaml:
mqtt:
class_name: Mqtt
class_path: plugins.mqtt
Smarthome.log:
2017-12-07 12:32:42 INFO Main MQTT: Connecting to broker. Starting mqtt client 'Henfri'
2017-12-07 12:32:44 INFO Main MQTT: parsing item: Sonoff.Weihnachten.Status
2017-12-07 12:32:45 INFO Thread-6 MQTT: Connection returned result 'Connection Accepted.'
2017-12-07 12:32:45 WARNING Thread-6 MQTT: Connected to broker 'mosquitto version 1.4.14' at address 127.0.0.1:1883
Ich kann auch den Status live abfrage funktioniert auch:
mosquitto_sub -t stat/sonoff/POWER
ON
ON
OFF
Hier mal aus dem Log vom Sonoff Switch:
12:47:43 MQT: stat/sonoff/ERGEBNIS = {"POWER":"ON"}
12:47:43 MQT: stat/sonoff/POWER = ON
12:47:44 MQT: stat/sonoff/ERGEBNIS = {"POWER":"OFF"}
12:47:44 MQT: stat/sonoff/POWER = OFF
Auszug aus dem mosquito.log:
1512647606: Sending PINGRESP to DVES_8AEEFF
1512647621: Received PINGREQ from DVES_8AEEFF
1512647621: Sending PINGRESP to DVES_8AEEFF
1512647626: Received PINGREQ from Henfri
1512647626: Sending PINGRESP to Henfri
1512647636: Received PINGREQ from DVES_8AEEFF
1512647636: Sending PINGRESP to DVES_8AEEFF
1512647651: Received PINGREQ from DVES_8AEEFF
1512647651: Sending PINGRESP to DVES_8AEEFF
1512647666: Received PINGREQ from DVES_8AEEFF
Soweit schaut alles gut aus aber irgendwie seh ich im SmarthomeNG Backend nicht das sich das Value des Items ändert. Hat wer ne Idee?
Grüße,
nano
Ich hänge grad irgendwie an einer Stelle. Ich hab mir einen Wifi Switch von Sonoff angeschafft und mit der Tosmata Firmware geflashed. Hab den Mosquito Server auf der selben Maschine wie SmarthomeNG am laufen, hier mal wie es aktuell aussieht:
Ein Item hab ich angelegt (noch im alten conf Format):
[Sonoff]
[[Weihnachten]]
[[[Status]]]
name = weihnachten_in
type = foo
mqtt_topic_in = 'stat/sonoff/POWER'
plugin.yaml:
mqtt:
class_name: Mqtt
class_path: plugins.mqtt
Smarthome.log:
2017-12-07 12:32:42 INFO Main MQTT: Connecting to broker. Starting mqtt client 'Henfri'
2017-12-07 12:32:44 INFO Main MQTT: parsing item: Sonoff.Weihnachten.Status
2017-12-07 12:32:45 INFO Thread-6 MQTT: Connection returned result 'Connection Accepted.'
2017-12-07 12:32:45 WARNING Thread-6 MQTT: Connected to broker 'mosquitto version 1.4.14' at address 127.0.0.1:1883
Ich kann auch den Status live abfrage funktioniert auch:
mosquitto_sub -t stat/sonoff/POWER
ON
ON
OFF
Hier mal aus dem Log vom Sonoff Switch:
12:47:43 MQT: stat/sonoff/ERGEBNIS = {"POWER":"ON"}
12:47:43 MQT: stat/sonoff/POWER = ON
12:47:44 MQT: stat/sonoff/ERGEBNIS = {"POWER":"OFF"}
12:47:44 MQT: stat/sonoff/POWER = OFF
Auszug aus dem mosquito.log:
1512647606: Sending PINGRESP to DVES_8AEEFF
1512647621: Received PINGREQ from DVES_8AEEFF
1512647621: Sending PINGRESP to DVES_8AEEFF
1512647626: Received PINGREQ from Henfri
1512647626: Sending PINGRESP to Henfri
1512647636: Received PINGREQ from DVES_8AEEFF
1512647636: Sending PINGRESP to DVES_8AEEFF
1512647651: Received PINGREQ from DVES_8AEEFF
1512647651: Sending PINGRESP to DVES_8AEEFF
1512647666: Received PINGREQ from DVES_8AEEFF
Soweit schaut alles gut aus aber irgendwie seh ich im SmarthomeNG Backend nicht das sich das Value des Items ändert. Hat wer ne Idee?
Grüße,
nano
Kommentar