arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.17k stars 4.8k forks source link

Support Shelly addon / sensor module #7469

Closed vergoossen closed 4 years ago

vergoossen commented 4 years ago

Have you looked for this feature in other issues and in the docs?
Yes, couldn't find anything.

Is your feature request related to a problem? Please describe.
https://shop.shelly.cloud/temperature-sensor-addon-for-shelly-1-1pm-wifi-smart-home-automation#312 Tried to assign al gpio's to ds18b20 sensor, but it doesn't work. I think this module needs an additonal driver.

Describe the solution you'd like
Should be nice if Tasmota can support this module, it's great to attach inwall / in switchbox sensors.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

(Please, remember to close the issue when the problem has been addressed)

arendst commented 4 years ago

Pls provide output of commands status 0, template and gpio.

vergoossen commented 4 years ago

17:16:36 CMD: backlog status 0;template;gpio
17:16:36 RSL: stat/tasmota/STATUS = {"Status":{"Module":0,"FriendlyName":["Tasmota"],"Topic":"tasmota","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
17:16:36 RSL: stat/tasmota/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://thehackbox.org/tasmota/release/tasmota.bin","RestartReason":"Power on","Uptime":"0T00:00:33","StartupUTC":"2020-02-06T16:16:03","Sleep":50,"CfgHolder":4617,"BootCount":7,"SaveCount":17,"SaveAddress":"FB000"}}
17:16:36 RSL: stat/tasmota/STATUS2 = {"StatusFWR":{"Version":"8.1.0.6(tasmota)","BuildDateTime":"2020-02-06T15:55:13","Boot":31,"Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Hardware":"ESP8266EX","CR":"337/699"}}
17:16:36 RSL: stat/tasmota/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["WATERPAS",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000005A00000000000000","00000000","00000000"]}}
17:16:36 RSL: stat/tasmota/STATUS4 = {"StatusMEM":{"ProgramSize":569,"Free":432,"Heap":27,"ProgramFlashSize":2048,"FlashSize":2048,"FlashChipId":"1540EF","FlashMode":3,"Features":["00000809","8FDAE397","043683A0","22B617CD","01001BC0","00007881"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,29","Sensors":"1,2,3,4,5,6,7,8,9,10,14,15,17,18,20,22,26,34"}}
17:16:36 RSL: stat/tasmota/STATUS5 = {"StatusNET":{"Hostname":"tasmota-8022","IPAddress":"192.168.1.113","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.1.1","Mac":"98:F4:AB:F3:9F:56","Webserver":2,"WifiConfig":4,"WifiPower":17.0}}
17:16:36 RSL: stat/tasmota/STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_F39F56","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}}
17:16:36 RSL: stat/tasmota/STATUS7 = {"StatusTIM":{"UTC":"Thu Feb 06 16:16:36 2020","Local":"Thu Feb 06 17:16:36 2020","StartDST":"Sun Mar 29 02:00:00 2020","EndDST":"Sun Oct 25 03:00:00 2020","Timezone":"+01:00","Sunrise":"08:13","Sunset":"17:54"}}
17:16:36 RSL: stat/tasmota/STATUS10 = {"StatusSNS":{"Time":"2020-02-06T17:16:36","Switch1":"OFF"}}
17:16:36 RSL: stat/tasmota/STATUS11 = {"StatusSTS":{"Time":"2020-02-06T17:16:36","Uptime":"0T00:00:33","UptimeSec":33,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":22,"MqttCount":0,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WATERPAS","BSSId":"18:E8:29:E7:90:26","Channel":1,"RSSI":100,"Signal":-43,"LinkCount":1,"Downtime":"0T00:00:06"}}}
17:16:36 RSL: stat/tasmota/RESULT = {"NAME":"Shelly 1 U2","GPIO":[255,255,0,255,21,82,0,0,0,0,0,0,0],"FLAG":0,"BASE":46}
17:16:37 RSL: stat/tasmota/RESULT = {"GPIO0":{"192":"DS18x20o"},"GPIO1":{"0":"None"},"GPIO3":{"4":"DS18x20"}}```
arendst commented 4 years ago

I see you changed the flash layout from default Tasmota supported 1024 to 2048. So you compiled this image yourself as we do not support this flash layout.

In that case did you use the default USE_DS18x20 define?

vergoossen commented 4 years ago

Huh flash layout? I compiled with your last commit? There are no bin's available right?

arendst commented 4 years ago

Yes there are always development bins available from http://thehackbox.org/tasmota/ compiled every hour when a new commit has been made.

Your compiled flash layout is 2M while the supported Tasmota images only support 1M size. Somewhere in your compile environment you set it to 2M. The default Tasmota platfromio environment provided with the Tasmota respository also only supports 1M flash sizes

arendst commented 4 years ago

The flash size is probably not the cause of your unability to see the DS18x20. ARe you sure you made firm connections using the shelly provided clips? I was unable to use them and hd to revert to old dutch "kroonsteentjes".

vergoossen commented 4 years ago

Hmm strange, dont know about change 1M to 2M. I flashed with the bin and its indeed not working.

Let me check addon with shelly firmware or looking for a PM which is somewhere here. 1 sec

vergoossen commented 4 years ago

Allright bad connections indeed :). Its working now :). Let me try AM2302 sensor now :D

vergoossen commented 4 years ago

And that one is also working! Nice! :) Thanks for the great support!

arendst commented 4 years ago

So let's close this issue.

spielkind1 commented 4 years ago

Shelly 1 U2 has no function with 8.1.0.8

vergoossen commented 4 years ago

Why it's removed?

arendst commented 4 years ago

Has it?

image

vergoossen commented 4 years ago

Ah I see, its because spielkind said it has no function in 8.1.0.8

spielkind1 commented 4 years ago

Yes

Theo Arends notifications@github.com schrieb am Do., 2. Apr. 2020, 12:28:

Has it?

[image: image] https://user-images.githubusercontent.com/11044339/78238898-5d4ad080-74dd-11ea-8cf4-2bd435214fa9.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arendst/Tasmota/issues/7469#issuecomment-607760418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPGHCYRVAQNLIAQLNERY33RKRSELANCNFSM4KE7KBXA .

the-cyberspace commented 4 years ago

I have 2 DS18B20 sensors plugged into the shelly temperature add-on module on a shelly 1pm:

shelly1pm

And i have this configuration: {"NAME":"Shelly 1PM","GPIO":[56,0,0,0,82,134,0,0,131,132,0,21,0],"FLAG":2,"BASE":18}

shelly1pm_1

I`m not sure what i have to change to get the data from the sensor. Can someone help me with that?

arendst commented 4 years ago

Configure the sensor like below:

image

the-cyberspace commented 4 years ago

I don`t have any options there:

shelly1pm_2

spielkind1 commented 4 years ago

Dont change the template, change your settings and dont forget the widerstand between current and data..

Roy notifications@github.com schrieb am So., 26. Apr. 2020, 10:48:

I have 2 DS18B20 sensors plugged into the shelly temperature add-on module on a shelly 1pm:

[image: shelly1pm] https://user-images.githubusercontent.com/46862733/80302518-cd7e0680-87aa-11ea-97a8-67442ff33da6.png

And i have this configuration: {"NAME":"Shelly 1PM","GPIO":[56,0,0,0,82,134,0,0,131,132,0,21,0],"FLAG":2,"BASE":18}

[image: shelly1pm_1] https://user-images.githubusercontent.com/46862733/80302561-f7cfc400-87aa-11ea-9a9e-a24f1ec4dc92.png

I`m not sure what i have to change to get the data from the sensor. Can someone help me with that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arendst/Tasmota/issues/7469#issuecomment-619511512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPGHC753H5VR6SUUUFT7PDROPYMZANCNFSM4KE7KBXA .

arendst commented 4 years ago

Try another template

{"NAME":"Shelly 1PM U2","GPIO":[255,255,0,255,82,134,0,0,0,0,0,21,0],"FLAG":2,"BASE":18}
the-cyberspace commented 4 years ago

It`s working now with that template! Thanks!

hulkhaugen commented 4 years ago

Just came over this. So I can connect a DHT22 to GND,3.3V and RXD/GPIO3 to a Shelly 1PM Module? Or do I need some sort of add-on module? Will this disable the default external button function of the Shelly relay?

arendst commented 4 years ago

I suggest you start reading this issue from the top down and proceed to the one you just entered.

SmartNightly commented 4 years ago

Hi there, great work thx!

I've got connected 4 sensors to my shelly 1. But i get only 3 values. Is this hardware-limitation of the shelly addon? Or did i miss something in template config?

Bildschirmfoto 2020-06-24 um 22 53 56
arendst commented 4 years ago

I guess more should work up to 8 but it all depends on how you connected them and if the shelly can power them.

To rule out the fourth being broken did you already swap it with the third?

sirLeone commented 4 years ago

Is it possible to connect jsn-sr04t to shelly 1PM using shelly addon and above tasmota extension ?

arendst commented 4 years ago

You can connect anything but there is no driver support for this device using the shelly addon.

wmertens commented 3 years ago

Purely out of academic interest (for now): Would it be possible to connect an LCD module via the 1-wire interface with the addon? I'm thinking room thermostat which drives radiator valves, with a thermometer and a display, and maybe some buttons.

pilot1981 commented 3 years ago

Hi, anyone know if I can use temperature add-on to attach n.2 reed sensor (one for close sensor and one for open sensor)?

wmertens commented 3 years ago

@pilot1981 I don't know tasmota, but the add-on implements the 1-wire bus, so you need to make your reed switches talk to that, and have a driver in tasmota that supports that.

Shelly supports 1 reed switch that simply shorts the signal to ground (I believe), so then you can only have 1

Maikel-K commented 3 years ago

Would it be easy to change the maximum amount of DS18B20 sensors in the software? I would like to use the Shelly 1PM with addon module with 6 temperature sensors too switch on floorheating pump and read the temperature of the water in and out.

barbudor commented 3 years ago

And what do you think the limit is ? There is no hard coded limit in Tasmota, you can put as many sensors as can fit into the SENSOR MQTT messages I've seen up to 18 DS18X20

Maikel-K commented 3 years ago

As Shelly is limiting it to 3 sensors, I was thinking it was just copied those settings for example. I saw a screenshot of only 3 sensors visible in the Tasmota home page of the device.

pilot1981 commented 3 years ago

And what do you think the limit is ? There is no hard coded limit in Tasmota, you can put as many sensors as can fit into the SENSOR MQTT messages I've seen up to 18 DS18X20

@barbudor so you are able to use n.18 DS18B20 attached to the same shelly 1 using TASMOTA firmware? I think limit is related only to array dimension defined in TASMOTA firmware...

arendst commented 3 years ago

The max limit is defined using #define DS18X20_MAX_SENSORS which is default set to 8.

Nothing stops you to change that to a different value but you will have to re-compile your binary.

An issue regarding Shelly is the fact that the hardware implementation uses two GPIO's to communicate with the DS18X20 devices making timing a problem resulting probably in the in-ability to support 18 devices.

applechrist commented 2 years ago

Would it be possible to use the XKC-Y25-NPN as well?

tim4849 commented 2 years ago

Hi all, I have connected to my Shelly 1pm temperature sensors DS18B20 via the addon sensor module. Now the timers do not work anymore. I had set up 16 timers to control (on/off) of my circulation pump. Likewise, the WEB interface responds very poorly, manual switching also does not work safely, obviously the 1pm restarts again and again.

I'm using follwing Template: {"NAME":"Shelly 1PM Temp","GPIO":[1,1,0,1,192,2720,0,0,0,0,0,224,0,4736],"FLAG":0,"BASE":18}

Who knows similar problems or what am I doing wrong? Please for help!

ascillato commented 2 years ago

Hi, that seems to be an excess in power consumption. Do you have restarts when you disconnect the sensor?

SuperMaximus1984 commented 2 years ago

Is it possible to use 2xDHT22 (AM2032) sensors in Shelly 1 with Add-on & Tasmota? It was not possible in Shelly's standard firmware.

chivas03 commented 1 year ago

Is it possible to use 2xDHT22 (AM2032) sensors in Shelly 1 with Add-on & Tasmota? It was not possible in Shelly's standard firmware.

Hey, have you been able to run at least on DHT22 with the Shelly1 Add-On based on Tasmota?

SuperMaximus1984 commented 1 year ago

DHT22

Yes, sure. But there's not much sense for me to run Tasmota on Shelly as device itself unlike other ESP's does not physically support connectivity of more than 1 humidity sensor.

notacoderjustauser commented 1 year ago

my experience was, that the wifi connection in the 1pm is far more stable wenn running tasmota as when the original firmware is installed. This matters when the sensor is in a cellar or behind concrete walls for example.

chivas03 commented 1 year ago

DHT22

Yes, sure. But there's not much sense for me to run Tasmota on Shelly as device itself unlike other ESP's does not physically support connectivity of more than 1 humidity sensor.

Hello, thanks for your input. For my application, it is OK to have one DHT22. (bathroom - thermostat + ventilation control) I thought prior to use an ESP within a flush box, but with an external power supply, one relay and the sensor would lead to some extension of the available space - so I came up to use the Shelly with the add-on

Kolia56 commented 9 months ago

As of 1/24/2024, DS18x20 is supported. See current development branch. See updated template as well

sfromis commented 9 months ago

It was already supported for a long time, as this thread relates to ESP8266, not ESP32 and the "plus" variant of Shelly devices where it got to be supported very recently.

Kolia56 commented 9 months ago

It was already supported for a long time, as this thread relates to ESP8266, not ESP32 and the "plus" variant of Shelly devices where it got to be supported very recently.

my bad, I apologise, I made a confusion because of numerous opened tabs in internet browser.