Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shelly Plus AddOn support #1146

Open
andykearney opened this issue Dec 6, 2022 · 45 comments
Open

Shelly Plus AddOn support #1146

andykearney opened this issue Dec 6, 2022 · 45 comments
Labels
new-device-support add support for a new device.

Comments

@andykearney
Copy link

Hi.

Is the new add on for plus devices supported already? Or is there work to do to make that happen?

@timoschilling
Copy link
Collaborator

No, but a test device is on the way

@timoschilling timoschilling added the new-device-support add support for a new device. label Dec 6, 2022
@timoschilling timoschilling changed the title New Shelly add on supported? Shelly Plus AddOn support Dec 6, 2022
@markirb
Copy link
Collaborator

markirb commented Dec 7, 2022

Wow nice. Didn't know these exist. Would be nice to bundle the sensor input and DHT pull requests with this...

@timoschilling
Copy link
Collaborator

timoschilling commented Dec 8, 2022

@markirb Looks like supporting the Plus AddOn is more complicated then the old one. Here is a picture of the new one:
image

@markirb
Copy link
Collaborator

markirb commented Dec 8, 2022

Mhh can be but I don‘t necessarily think so.

Lots of that circuitry should be for the galvanic isolation and newly supported analog inputs, which we can skip for the moment.

The principle for the digital ones should be the same as the previous addon I would suspect: one Digital shared IO via two Pins.
The screwing terminals should just be connected to each other for the sensor IO.

Do you have any idea how the debug Pinning and corresponding ESP32 GPIO pins of Shelly Plus devices look like where this adapter plugs in?

How many pins does the addon have? Have to be at least 6 for the additional ADC Channels. Maybe also a picture from the back?

@nevend1
Copy link

nevend1 commented Dec 19, 2022

I would love to see this Plus AddOn with reading the DS18B20 sensor too!
Is there some way we can send a donation to speed up the development? Thank you!

@timoschilling
Copy link
Collaborator

@nevend1 maybe you can sponsor @markirb a Plus AddOn and Plus 1

@andykearney
Copy link
Author

@timoschilling @nevend1 I'd be happy to do that. Let me know how best to do it.

@timoschilling
Copy link
Collaborator

@markirb are you interested, in getting a Shelly Plus and Plus AddOn? If yes I think the best way is you exchange your contact data and @andykearney send @markirb the money or @andykearney make a order with @markirb shipping address

@markirb
Copy link
Collaborator

markirb commented Dec 24, 2022

Sure I would be up to give this a shot. Very nice @andykearney just contact me via email (see profile I added it there) and I'll provide you with a shipping address. You want to use ds18bxx for now right?

@markirb
Copy link
Collaborator

markirb commented Jan 10, 2023

Any news here? I haven't received any message.

@timoschilling could you give me the reading on the U16 chip? I cannot decipher it on you picture. Apart from that the pinning of the pins should be clear by e.g: https://www.esphome-devices.com/devices/Shelly-Plus-1PM

@timoschilling
Copy link
Collaborator

image

@markirb
Copy link
Collaborator

markirb commented Jan 14, 2023

thanks. so far I see only insulating/level shifting components, should be fairly straightforward

@mbaiti
Copy link

mbaiti commented Jan 24, 2023

Are there any plans to support the add-on with the garage door mode? E.g. with a external magnetic switch and show the state of the garage door. Open or closed.

@markirb
Copy link
Collaborator

markirb commented Jan 25, 2023

See here: #967
This can also be used on Addon plus

@jeffnhelen
Copy link

jeffnhelen commented Mar 24, 2023

Looked at the lack of temp support features for the 1+PM, but then saw this request. Is it still being worked on or was there ever a test module sent to @markirb? Would like to use the temp sensors.

@markirb
Copy link
Collaborator

markirb commented Mar 29, 2023

Hi, sorry for no updates here.

I have no hardware, but also I had no time... :/
After some time of several sick-phases for the whole family and now a holiday, I hope that I can find some time in the next weeks to push some version that might also work for the new addon.

@jeffnhelen
Copy link

Hi, sorry for no updates here.

I have no hardware, but also I had no time... :/ After some time of several sick-phases for the whole family and now a holiday, I hope that I can find some time in the next weeks to push some version that might also work for the new addon.

Sorry to hear you guys were battling illnesses. Thanks for the response and let us know if you would still like a unit to test with.

@danny1605
Copy link

hello is there something new to support shelly 1 +

@vrpt2022
Copy link

vrpt2022 commented Aug 3, 2023

Good evening, any update here?
I verified that the old add-on module has been retired from the market, so any hope with the new version?
Thanks!

@markirb
Copy link
Collaborator

markirb commented Aug 5, 2023

Hi,

sorry for not writing anything here... time.. :/
But today I found some and tried to do a quick implementation:

This should implement Temperature Sensor Support for ShellyPlus1 / 1PM:
#1307

I have no hardware to test, so please feel free to test the github actions artifacts at your own risk.

@vrpt2022
Copy link

vrpt2022 commented Aug 5, 2023

Thanks @markirb, awesome news!!

I remember the old issues regarding DHT sensors with the old addon, so you think there is any chance with the new one to make it work?

I’m available (with some support from you guys) to buy the devices and test them….

It’s taking years for the different companies to introduce thread/matter devices/sensors , so this is, in my opinion, the only way we have to have reliable sensors integrated in HomeApp…

Thanks!

@jeffnhelen
Copy link

jeffnhelen commented Aug 5, 2023

Saw these are on Amazon now. Looks like I’ll be picking one up to give it a shot! Anyone know how long the wire can be on these DS18B20 sensors and still be functional/accurate?

@0ctus
Copy link

0ctus commented Nov 21, 2023

Hi! Is the Shelly addon Plus already working with the garage door reed? I have tried several options but keep getting "obstruction detected" error

@markirb
Copy link
Collaborator

markirb commented Nov 21, 2023

No, gdo reed will work once someone can test the pull request metioned above, and another branch is merged. I cannot as I have no hardware.

@markirb
Copy link
Collaborator

markirb commented Dec 8, 2023

This would work with GDO as well: It requires testing
https://github.com/mongoose-os-apps/shelly-homekit/actions/runs/7061601881

@markirb
Copy link
Collaborator

markirb commented Feb 11, 2024

Shelly Plus Addon seems to work now; also with GDO. at least it was tested on Plus1 with ds18b20
See #1102 (comment)

@markirb
Copy link
Collaborator

markirb commented May 20, 2024

Please test latest 2.12.0-beta2 Prerelease in Release section if you need add-on support

@vrpt2022
Copy link

vrpt2022 commented May 21, 2024

Please test latest 2.12.0-beta2 Prerelease in Release section if you need add-on support

Good afternoon,

I've been testing it since "released" and so far no massive issues (tested with Plus1 + Plus addon + DHT22 sensor).
Great work!

I'm doing a test with 3 sensors (humidity and temperature) in the same room, and I verified the following:

  • When changing settings over the web interface I was not able to change the name of the sensors, check the image attached, you can see "Sensor 0 (Shelly TS1)" - "Sensor 1 (Shelly TS1)" when trying to change the name of 1 of the sensors both of them change name (i tried to name one as TS1 (temperature sensor 1) and the other as HS1 (humidity sensor 1) but both of them change name when one or the other change name. I hope I managed to explain it...
  • Another situation I verified is, I'm using a Meross HTSensor (model MS100F ) a Xiaomi HTSensor (LYWSD03MMC) and a DHT22 sensor with the +1 addon. I obtained diferent humidity lectures in all 3 sensors (ie. Meross 65% - Xiaomi 68% - DHT22 71%, so a difference of 6% so I'm not sure which value I should trust or if it is a calibration issue or if it is just the way the sensitivity of the sensors work...)

In general, regarding the firmware, i would say that sometimes whe checking the humidity in HomeApp the humidity goes to 0% and after 2 seconds it shows the readings, after few minutes same thing, the value goes to 0% and 2 seconds later the value appears, this issue is just on HomeApp as in the WebInterface the value is shown always.

I'll give more feedback if I identify any issue, I hope this helps...

Thanks!

1 2

@vrpt2022
Copy link

In general, regarding the firmware, i would say that sometimes whe checking the humidity in HomeApp the humidity goes to 0% and after 2 seconds it shows the readings, after few minutes same thing, the value goes to 0% and 2 seconds later the value appears, this issue is just on HomeApp as in the WebInterface the value is shown always.

Good evening, in fact I verified the log and I can see the "0" readings:
LogHT

@vrpt2022
Copy link

  • Another situation I verified is, I'm using a Meross HTSensor (model MS100F ) a Xiaomi HTSensor (LYWSD03MMC) and a DHT22 sensor with the +1 addon. I obtained diferent humidity lectures in all 3 sensors (ie. Meross 65% - Xiaomi 68% - DHT22 71%, so a difference of 6% so I'm not sure which value I should trust or if it is a calibration issue or if it is just the way the sensitivity of the sensors work...)

Good afternoon,
Regarding this issue, I checked on different websites that DHT22 sensors sometimes have a "deviation values/readings", do you think would be possible to add a field, e.g. after the value readed called "correction" to be able to manually do the correction of the reading (e.g. from -10 to +10)?
Thank you

@markirb
Copy link
Collaborator

markirb commented May 27, 2024

In general, regarding the firmware, i would say that sometimes whe checking the humidity in HomeApp the humidity goes to 0% and after 2 seconds it shows the readings, after few minutes same thing, the value goes to 0% and 2 seconds later the value appears, this issue is just on HomeApp as in the WebInterface the value is shown always.

Good evening, in fact I verified the log and I can see the "0" readings: LogHT

Hi,

Haven't seen this here. But it could happen in the code, I wonder why it is not reported as NaN...

What hardware are you using?
What is your "Update Interval" set to?

@vrpt2022
Copy link

Hi,

Haven't seen this here. But it could happen in the code, I wonder why it is not reported as NaN...

What hardware are you using? What is your "Update Interval" set to?

Good morning,

I'm using the sensor in the pictures, a shelly +1 and a +addon. The "Update interval" has been set at 5 seconds (found on few sites that minimum interval should be 2 seconds...), do you think It should be higher update interval?
Sensor1
sensor2

@vrpt2022
Copy link

vrpt2022 commented May 27, 2024

I wonder why it is not reported as NaN

I had one of those "NaN" readings today for the fist time (but still getting "0" readings"), check the pictures
NaN
Nan2

@vrpt2022
Copy link

vrpt2022 commented May 27, 2024

Well, after nearly 6 days using the beta version, here some feedback (device used in iPhone 11 / iOS 17.5.1 / HomeApp with Automations - +1 plugged to a bulb with physical switch /+addon/DHT22-AM2302 HT & T sensor) :

  • No problems flashing

  • Since day one sometimes “0” readings appear randomly.

  • After few tests regarding the “update interval” I found 30 seconds the most equilibrated value with stability on the readings.

  • In my opinion a field with correction values is necessary, as different sensors (even within the same model and brand-I tried 2 in the same place) have different sensitivity, so after testing with 4 sensors in the same spot we can have a reference to apply correction values.

  • Today, from nowhere, in the home app (everything ok with the switch and Web Interface) the bulb that is plugged into the +1 and both sensors where stuck “Updating”, just this shelly, the other 32 at home working absolutely fine. Tried to remove the “accessories” from home app and reset the HomeKit settings on the web interface, when tried to add them again a message from HomeApp saying that “Unable to add accessory- Accessory is out of compliance”, so the only solution was to return to stock software, factory reset (flashing without it shown the same issues) and flash it again. No issues shown in the log, that shown normal activity. Before this happened I verified that on the “Homekit Settings” was showing that 12 connections where active (only 1 iPhone and 1 AppleTV at home) and until today only was shown 1 connection active.

  • When the issue above happened by itself activated the AP mode as well and it was impossible to disable it, even after flashing it again, the only solution was factory reset and flash again.

  • Unable to change sensor names independently, when 1 is changed the other one automatically changes to the same name.

Hope it helps. I will give more feedback if anything happens.

Thank you.

@markirb
Copy link
Collaborator

markirb commented Jun 2, 2024

Thanks for you feedback. I will do a fix to filter out the 0 and NaN readings.

The correction would be a nice add-on yes... maybe sometime.

The temporary loss of the device is strange, but I think not really related to DHT support. Sensor names are coupled as this is really just one sensor....

@kurremkarmeruk
Copy link

Hi!
First of all, thank you for your work, great job!

I have a question.
How to use the digital input from the Add-on?
I would like to use it to display the door status.

Regards,
Luke.

@markirb
Copy link
Collaborator

markirb commented Jun 10, 2024

Do you want to use this for "open" status?

Should actually just work on latest beta

@kurremkarmeruk
Copy link

Do you want to use this for "open" status?
Yes. Door open.
Should actually just work on latest beta
Hm.. Should I enable this somewhere?
In the logs it shows only a change in the first input (used as an exit button - in shelly 1plus).
image
screenshot-sp
IMG_4870

@markirb
Copy link
Collaborator

markirb commented Jun 10, 2024

Ah I see... this one does currently not work, I do not know which GPIO it maps to. And I do not have this hardware.

However it should work in the style of the old addon at the temperature sensor inputs

@markirb
Copy link
Collaborator

markirb commented Jun 11, 2024

Well, after nearly 6 days using the beta version, here some feedback (device used in iPhone 11 / iOS 17.5.1 / HomeApp with Automations - +1 plugged to a bulb with physical switch /+addon/DHT22-AM2302 HT & T sensor) :

  • No problems flashing
  • Since day one sometimes “0” readings appear randomly.
  • After few tests regarding the “update interval” I found 30 seconds the most equilibrated value with stability on the readings.
  • In my opinion a field with correction values is necessary, as different sensors (even within the same model and brand-I tried 2 in the same place) have different sensitivity, so after testing with 4 sensors in the same spot we can have a reference to apply correction values.
  • Today, from nowhere, in the home app (everything ok with the switch and Web Interface) the bulb that is plugged into the +1 and both sensors where stuck “Updating”, just this shelly, the other 32 at home working absolutely fine. Tried to remove the “accessories” from home app and reset the HomeKit settings on the web interface, when tried to add them again a message from HomeApp saying that “Unable to add accessory- Accessory is out of compliance”, so the only solution was to return to stock software, factory reset (flashing without it shown the same issues) and flash it again. No issues shown in the log, that shown normal activity. Before this happened I verified that on the “Homekit Settings” was showing that 12 connections where active (only 1 iPhone and 1 AppleTV at home) and until today only was shown 1 connection active.
  • When the issue above happened by itself activated the AP mode as well and it was impossible to disable it, even after flashing it again, the only solution was factory reset and flash again.
  • Unable to change sensor names independently, when 1 is changed the other one automatically changes to the same name.

Hope it helps. I will give more feedback if anything happens.

Thank you.

this should fix invalid readings
https://github.com/mongoose-os-apps/shelly-homekit/releases/tag/2.12.0-beta3

@markirb
Copy link
Collaborator

markirb commented Jun 11, 2024

Do you want to use this for "open" status?
Yes. Door open.
Should actually just work on latest beta
Hm.. Should I enable this somewhere?
In the logs it shows only a change in the first input (used as an exit button - in shelly 1plus).
image
screenshot-sp
IMG_4870

according to
arendst/Tasmota#18885 (comment)
GPIO19 should be DIGITA_IN. We can try: What shelly are you using?

@kurremkarmeruk
Copy link

Im using Shelly 1 plus

@markirb
Copy link
Collaborator

markirb commented Jun 12, 2024

Can you try this?

shelly-homekit-ShellyPlus1.zip

@vrpt2022
Copy link

Well, after nearly 6 days using the beta version, here some feedback (device used in iPhone 11 / iOS 17.5.1 / HomeApp with Automations - +1 plugged to a bulb with physical switch /+addon/DHT22-AM2302 HT & T sensor) :

  • No problems flashing
  • Since day one sometimes “0” readings appear randomly.
  • After few tests regarding the “update interval” I found 30 seconds the most equilibrated value with stability on the readings.
  • In my opinion a field with correction values is necessary, as different sensors (even within the same model and brand-I tried 2 in the same place) have different sensitivity, so after testing with 4 sensors in the same spot we can have a reference to apply correction values.
  • Today, from nowhere, in the home app (everything ok with the switch and Web Interface) the bulb that is plugged into the +1 and both sensors where stuck “Updating”, just this shelly, the other 32 at home working absolutely fine. Tried to remove the “accessories” from home app and reset the HomeKit settings on the web interface, when tried to add them again a message from HomeApp saying that “Unable to add accessory- Accessory is out of compliance”, so the only solution was to return to stock software, factory reset (flashing without it shown the same issues) and flash it again. No issues shown in the log, that shown normal activity. Before this happened I verified that on the “Homekit Settings” was showing that 12 connections where active (only 1 iPhone and 1 AppleTV at home) and until today only was shown 1 connection active.
  • When the issue above happened by itself activated the AP mode as well and it was impossible to disable it, even after flashing it again, the only solution was factory reset and flash again.
  • Unable to change sensor names independently, when 1 is changed the other one automatically changes to the same name.

Hope it helps. I will give more feedback if anything happens.
Thank you.

this should fix invalid readings https://github.com/mongoose-os-apps/shelly-homekit/releases/tag/2.12.0-beta3

Using it since yesterday.
So far so good, no issues observed.

@kurremkarmeruk
Copy link

Can you try this?

shelly-homekit-ShellyPlus1.zip

I can't update. I have error as below.
It's the same on two laptops, the same error when updating via smartphone (safari).
I also connected via AP - with the same result.

obraz

Logs:
61633839 shelly_debug.cpp:231 No log file, sending new entries
61688115 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
64838455 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
65843964 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
66805468 shelly_main.cpp:473 Up 66.79, HAP 0/1/16 ns 1, RAM: 206976/190240; st 54; 0.1: st:0 in_st:0 inm:0 ininv:0; 12.0: t:23.40; 12.1: t:59.60
66849325 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
67863562 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
74805609 shelly_main.cpp:473 Up 74.79, HAP 0/1/16 ns 1, RAM: 206976/190240; st 54; 0.1: st:0 in_st:0 inm:0 ininv:0; 12.0: t:23.30; 12.1: t:59.40
82807497 shelly_main.cpp:473 Up 82.79, HAP 0/1/16 ns 1, RAM: 206976/190240; st 54; 0.1: st:0 in_st:0 inm:0 ininv:0; 12.0: t:23.40; 12.1: t:59.30
83784890 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
84789200 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
85786899 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
86797407 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
87802565 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
88804729 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
89815605 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
89947341 mg_rpc.c:315 Shelly.SetState via WS_in 192.168.123.248:59803
89952375 shelly_output.cpp:64 Output 1: off -> on (RPC)
89972452 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
90898319 mgos_sys_config.c:323 Saved to conf9.json
90912103 shelly_main.cpp:473 Up 90.90, HAP 0/1/16 ns 1, RAM: 205008/190240; st 54; 0.1: st:1 in_st:0 inm:0 ininv:0; 12.0: t:23.30; 12.1: t:59.20
90920780 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
91259796 mg_rpc.c:315 Shelly.SetState via WS_in 192.168.123.248:59803
91264877 shelly_output.cpp:64 Output 1: on -> off (RPC)
91284509 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
91829243 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
98908643 mgos_sys_config.c:323 Saved to conf9.json
98922381 shelly_main.cpp:473 Up 98.91, HAP 0/1/16 ns 1, RAM: 206772/190240; st 54; 0.1: st:0 in_st:0 inm:0 ininv:0; 12.0: t:23.30; 12.1: t:59.40
101455788 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
102466702 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
103481209 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
104487033 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
105490525 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
106501786 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
106805549 shelly_main.cpp:473 Up 106.79, HAP 0/1/16 ns 1, RAM: 206976/190240; st 54; 0.1: st:0 in_st:0 inm:0 ininv:0; 12.0: t:23.40; 12.1: t:59.40
107514998 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
108524132 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
109538480 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
110546368 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
111547014 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
112546409 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
113561388 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
114575683 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
114805859 shelly_main.cpp:473 Up 114.79, HAP 0/1/16 ns 1, RAM: 206976/190240; st 54; 0.1: st:0 in_st:0 inm:0 ininv:0; 12.0: t:23.30; 12.1: t:59.10
115581224 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
116297949 mgos_http_server.c:180 0x3ffcaf68 HTTP connection from 192.168.123.248:59851
116307918 mgos_ota_core.c:269 Starting, timeout 600, commit timeout 0, mem 200392
116331530 mgos_ota_core.c:656 FW: Plus1 esp32 2.12.0-beta3 20240612-175056/2.12.0-beta2-9-g32071b9-plusaddon/digital_in sig 0x00
116337387 shelly_main.cpp:350 == Stopping HAP service (1)
116342304 mgos_ota_core.c:771 begin: waiting for user
116347975 shelly_main.cpp:365 HAP server state: 2
116356987 HAPPlatformTCPStrea:309 HAPPlatformTCPStreamClose ts 0x3ffce65c nc 0x3ffcea20 0/0/16
116367306 HAPPlatformTCPStrea:112 0x3ffcd840 0.0.0.0:9000 HAP connection closed, ns 0/0/16 i 1
116373162 shelly_main.cpp:365 HAP server state: 0
116377909 shelly_main.cpp:338 === Destroying accessories
116589245 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803
117593692 mg_rpc.c:315 Shelly.GetInfoExt via WS_in 192.168.123.248:59803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-device-support add support for a new device.
Projects
None yet
Development

No branches or pull requests

10 participants