Trying to migrate a device from tasmota to Esphomelib

I just wanted to see how easy the migration process is and test the stability but it seems that I ran into a little issue. Creating the config, uploading and having the new switches in HA seemed to work quite well. Also got the log messages that told me that everything worked. Only issue was that there was no physical reaction. So my guess is that there is some kind of a mapping problem of the pins.

In tasmota was using this config:

image

Which I migrated to this yaml file (only switch/input config included):
esphomeyaml:
name: teufel
platform: ESP8266
board: nodemcuv2

binary_sensor:
  - platform: gpio
    pin: "GPIO01" #D1
    name: "Teufel Opto"
    id: teufel_opto

switch:
  - platform: gpio
    pin: "GPIO14" #D5
    name: "Teufel Relay"
    id: teufel_relay

Remove the double quotes from around the GPIO pin definitions.

switch:
  - platform: gpio
    pin: GPIO14 #D5
    name: "Teufel Relay"
    id: teufel_relay

You can also do it like this if you want to make other changes to the pin, invert, pullup/down etc…

switch:
  - platform: gpio
    pin:
      number: GPIO14 #D5
      mode: INPUT_PULLUP
    name: "Teufel Relay"
    id: teufel_relay

You can even use the D# numbering directly:

switch:
  - platform: gpio
    pin:
      number: D5 # GPIO14
      mode: INPUT_PULLUP
    name: "Teufel Relay"
    id: teufel_relay

Also did you define an MQTT component?

mqtt:
  discovery: true
  discovery_prefix: homeassistant
  broker: '10.1.1.100'
  username: !secret mqtt_usr
  password: !secret mqtt_pwd

Thank you for the replay - Issue was that I messed up the sensor and the switch (they are exactly the opposite of what I had in tasmota).

What advantage did you expect from switching?

The very first line of his first post:

Well that doesn’t explain why you would switch from something working just for shits and giggles hence asking what advantage there would be to switching…

So like me you favor the “if it works dont touch it”?

Esphomeyaml is a lot more configurable than Tasmota (for a nodemcu).

2 Likes

Not necessarily… I always run the betas for instance but changing to a different implementation of something… well I need a good reason to do that…

Good reason for me is that esphomelib seems to be more expandable (modular design from the start). This is probably not important to you if all your sensors are integrated in tasmota.

Also doing automations through rules in tasmota currently feels a bit hard to understand and manage.

2 Likes