Sonoff mit Tasmota über MQTT an FHEM

Begonnen von freak4all, 18 Januar 2018, 11:57:10

Vorheriges Thema - Nächstes Thema

freak4all

Da es hier um Anfängerfragen geht denke ich bin ich hier richtig.
Ich habe mir zwei sonoff s20 zugelegt und möchte damit die LEDs zweier Schränke im Flur nach Sonnenaufgang und Sonnenuntergang schalten, das die Kinder in der Nacht ein bisschen Licht haben.
Ich habe mich schon ein bisschen eingelesen und habe folgendes realisiert:
Einen Pi3b gekauft, den mqtt Broker mosquitto installiert und fhem installiert. Einen sonoff zur Probe über WLAN Also sonota auf tasmota geflasht.

Nun bekomme ich es aber einfach nicht hin den sonoff in fhem einzubinden. Hab schon zig Anleitungen durch und den sonoff als mqtt Device erstellt, nur lässt er sich nicht schalten.

Ich steh in diesem Thema echt noch ganz am Anfang und brauche eine Schritt für Schritt Anleitung um mein Vorhaben zu realisieren.

Ich danke euch schonmal und hoffe ich finde hier Hilfe. Bin immer bereit neues zu lernen.

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

Gasmast3r

Hy danach suche ich auch, aber die anleitungen die ich alle gefunden habe klappten auch nie.
Habe es über espeasy am laufen, ist zum reinen schalten einfacher umzusetzen.
Entschuldige das ich DOOF FRAGE aber ich habe Psychische Probleme und Leide an ADHS mit Kognitiver-Hyperaktivität.

freak4all

Was ich so gelesen habe ist das espeasy etwas zu voll also überladen sein soll für die kleinen sonoffs. Allerdings braucht man dann keinen Broker oder? Ich werde mal abwarten, denke ich bin da nicht allein mit dem Problem. Ichbhiffe einfach das sich jemand meldet der mit sagen kann wie es funktioniert.

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

Gasmast3r

Hy finde ich nicht.
Und es bedarf keiner zusatz Installation.
Entschuldige das ich DOOF FRAGE aber ich habe Psychische Probleme und Leide an ADHS mit Kognitiver-Hyperaktivität.

freak4all

Hast du denn da eine Anleitung für? Kann ich denn espeasy auch über WLAN flashen auf ein tasmota sonoff? Hab leider keinen USB Programmer.

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

Gasmast3r

Entschuldige das ich DOOF FRAGE aber ich habe Psychische Probleme und Leide an ADHS mit Kognitiver-Hyperaktivität.

freak4all

Okay danke dir! Der Thread is ja noch frisch, vielleicht meldet sich ja noch jemand in Bezug auf tasmota.

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

Amenophis86

Habt ihr mal ins Wiki geschaut? Da steht genau drin was man machen muss. https://wiki.fhem.de/wiki/Sonoff
Aktuell dabei unser neues Haus mit KNX am einrichten. Im nächsten Schritt dann KNX mit FHEM verbinden. Allein zwei Dinge sind dabei selten: Zeit und Geld...

Gasmast3r

Entschuldige das ich DOOF FRAGE aber ich habe Psychische Probleme und Leide an ADHS mit Kognitiver-Hyperaktivität.

gloob

#9
Flashen der Sonoff

Software:
https://github.com/nodemcu/nodemcu-flasher

Firmware:
https://github.com/arendst/Sonoff-Tasmota/releases

Einstellungen:

Baudrate: 230400
Flash size: 1 MByte
Flash speed: 40MHz
SPI Mode: DOUT






Einbinden in FHEM - alles auf einem Raspberry Pi 3 mit Raspbian Stretch

Mosquitto installieren:
sudo apt-get install mosquitto mosquitto-clients python-mosquitto libmodule-pluggable-perl


Codes zum Testen ob Mosquitto läuft/starten/stoppen:
sudo service mosquitto restart
sudo service mosquitto stop
sudo service mosquitto start
sudo service mosquitto status


MQTT Device:
defmod mqtt MQTT 127.0.0.1:1883
attr mqtt room Gateways,MQTT


Sonoff Device:
defmod sonoff5 MQTT_DEVICE
attr sonoff5 userattr room_map structexclude
attr sonoff5 IODev mqtt
attr sonoff5 alias Flaschen
attr sonoff5 devStateIcon ON:on:OFF Off:off:ON
attr sonoff5 group Lampen
attr sonoff5 publishSet ON OFF cmnd/sonoff5/power
attr sonoff5 qos at-most-once
attr sonoff5 retain 1
attr sonoff5 room MQTT,Wohnzimmer
attr sonoff5 stateFormat state
attr sonoff5 subscribeReading_state stat/sonoff5/POWER


Keine Probleme.
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

freak4all

Super danke, Auf solch eine Antwort hab ich gewartet. Wenn ich heut Abend noch Zeit finde probieren ich das aus.

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

SamNitro

Für die Faulen Leute wie mich, habe ich ein cmdalias geschrieben um Geräte hinzuzufügen.
define c_tasmota cmdalias tasmota .* AS define $EVENT MQTT_DEVICE;; attr $EVENT autoSubscribeReadings +/$EVENT/+;; attr $EVENT eventMap on:ON off:OFF;; attr $EVENT stateFormat POWER;; attr $EVENT publishSet ON OFF cmnd/$EVENT/power;; attr $EVENT publishSet_update 1 cmnd/$EVENT/upgrade;; attr $EVENT event-on-change-reading .*;; attr $EVENT webCmd ON:OFF;;attr $EVENT room SONOFF;;\

Aufruf:
tasmota <topic>
(Intel-Nuc Proxmox) (Homematic) (EnOcean) (CUL868) (CUL433) (Zigbee2MQTT) (ESP8266) (Echo) (DUOFERN)

freak4all

So es hat funktioniert! Ich danke euch sehr, hätte nicht gedacht so schnell Hilfe zu bekommen. Ganz toll wäre noch wenn mir jemand erklärt wie das mit Sonnenauf-und Untergang schalten funktioniert.

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....

gloob

Das heißt meine ,,Anleitung" war hilfreich und verständlich?
Nur damit ich weiß, dass ich es beim nächsten mal wieder so postem kann.
Raspberry Pi 3 | miniCUL 433MHz | nanoCUL 868 MHz | nanoCUL 433 MHz | MySensors WLAN Gateway | LaCrosse WLAN Gateway | SignalESP 433 MHz | SignalESP 868 MHz | HM-MOD-UART WLAN Gateway | IR - 360 Grad WLAN Gateway

freak4all

Ja deine Anleitung hat's gebracht! Musste halt nur die Bezeichnungen auf mich anpassen. Vielen Dank nochmal!

Gesendet von meinem HTC U11 mit Tapatalk

PI3B FHEM 5.8, 2xSonoff mit Tasmota, Xiaomi Vacuum Roborock S50, Alexa (Echo Plus), VU+ Ultimo 4K, VU+ Zero, Karatelight, 7580, 7490, Easymouse V2, Qnap TS-212....