Hello i want to buy a shelly uni, is it possible to Flash Esphome on it?
Thanks for your answer
Hello i want to buy a shelly uni, is it possible to Flash Esphome on it?
Thanks for your answer
Not sure If you can flash it, but the shelly uni works fine with HA as it is.
I had probably expressed myself unclearly, I said if I want flashing esphome, I have to specify a device which I want to flash, unfortunately I can’t see it at the moment, but I don’t think the shelly uni is on the list right?
According to my understanding, Esphome must know which device is in front of it so that the inputs etc. are configured correctly, right?
esphome doesn’t know what GPIOs each device has. You have to know that and specify it.
Luckily many devices are documented for tasmota, and equally luckily it is easy to glean the esphome config from the tasmota config.
Okay, thanks for the clarification, I thought the Esphome in the background still somehow has a link to the pins how much is actually available.
It was clear to me that you explicitly program which pin you have connected, but it was not clear to me that after flashing, Esphome does not even know which pins are available.
Since Shelly Uni has an “unusual” pin equipment, that was the question.
Well, then I’ll probably flash Tasmota first, thank you very much for your help
Not sure why you would do that, but go for gold.
I would really like to start esphome right away, that’s not what I meant, just the first steps with this “custom device” are not entirely clear to me.
So then from the beginning: I connect it to my HA installation, then I would select other esp8266 according to my understanding, if that was the whole magic then I understood it
In fact you specifically can’t recreate the yaml configuration from the firmware. That is why you should back it up
So I have now flashed a Shelly Uni with esphome, I have connected a 4-20mA pressure sensor to the Adc. My multimeter shows pretty much the correct voltage (7.8 V) = 7.1 bar.
In Esphome you can see that the sensor is displayed at a maximum of 0.6 V. Unfortunately, no integration is possible in this way. Actually, the Shelly Uni is well suited for pressure measurement because of the greater voltage possibilities.
Does anyone have any idea what could be changed in the yaml so that it works properly?
I’m not brot123 but I was looking for a Shelly Uni yaml file myself as well. I successfully created my own:
esphome:
name: uni
friendly_name: Uni
esp8266:
board: esp01_1m
logger:
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
binary_sensor:
- platform: gpio
name: "Input1"
pin: GPIO12
- platform: gpio
name: "Input2"
pin: GPIO13
switch:
- platform: gpio
pin: GPIO15
name: "relay1"
id: relay1
- platform: gpio
pin: GPIO4
name: "relay2"
id: relay2
sensor:
- platform: dht
pin: GPIO05
model: AM2302
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 60s
I know this is an old comment but this is entirely expected behaviour for ESP8266’s, the onboard ADC is 0-1V and I guess there’s probably an onboard resistor limiting max to 0.6v, to work around this you need an external voltage divider resistor network to scale the input correctly for 0-1v
.
Shelly UNI has declared ADC input 0-12V or 0-30V, i believe that it’s selectable with GPIO17, at least that’s what i found on THIS page for tasmota, so re-calculaton is needed for correct output.
What i don’t understand on that page is:
I just got two pieces yesterday, i quickly tested it and i succesfully installed ESPHome, i didn’t test third input yet, but i did try temp/humidity sensor config and of course i get “unknown” value, so i guess it’s a possibility that “AM2301” is in fact “DATA” input for external sensors…?
No, because I’ve had to put this project to a standstill for a while, since i have other projects, too, so i didn’t explore further. As addition, winter is coming here and i plan to put this shelly on garage door, so it’s waiting for warmer times.
But, as far as i figured it out this shelly doesn’t have any sensor onboard. I assume that it’s like i wrote above: it’s meant to be connected to data input… perhaps these Shelly’s exist in a combo package with AM2301 somewhere, or they did in the past…
Just to inform you, guys: i did some more testing today and GPIO14 is ADC range selector (0 - 15 or 0 - 30V), not input. If you configure GPIO14 as switch and turn it on you get 30V input range.