mongoose-os-apps / shelly-homekit

Apple HomeKit firmware for Shelly's
Other
1.82k stars 130 forks source link

Shelly 1 Garage opener with DS1820 #1102

Closed rassual closed 3 months ago

rassual commented 2 years ago

Hey, i use a few shelly 1 in my House and one in my Garage as door opener.

is it possible with the external plug-in an an DS1820 Sensor to show the Temperature in Homekit?

i can‘t find an solution here

markirb commented 2 years ago

Should be possible, but only by changing the code. Currently implementation excludes GDO see

https://github.com/mongoose-os-apps/shelly-homekit/blob/master/src/Shelly1/shelly_init.cpp

marcus-aa commented 1 year ago

This would be great also for Shelly Uni in gdo mode.

markirb commented 11 months ago

Please test this here if you want to (for shelly1, etc. not for shelly uni currently) https://github.com/mongoose-os-apps/shelly-homekit/actions/runs/7061601881

cameronaffleck commented 9 months ago

Please test this here if you want to (for shelly1, etc. not for shelly uni currently) https://github.com/mongoose-os-apps/shelly-homekit/actions/runs/7061601881

Excuse my ignorance, but how would one test this? I've got a DS1820, the add-on, and a Shelly Plus 1. Do I use the Python script?

markirb commented 9 months ago

If you scroll to the bottom of the linked page there is a build artifact called releases. This is a zip file containing all builds for all devices that you can download. You pick the Shelly plus one and upload it via webinterface.

ah sorry, obviously it cannot be accessed. I attached it here:

shelly-homekit-ShellyPlus1.zip

cameronaffleck commented 9 months ago

If you scroll to the bottom of the linked page there is a build artifact called releases. This is a zip file containing all builds for all devices that you can download. You pick the Shelly plus one and upload it via webinterface.

ah sorry, obviously it cannot be accessed. I attached it here:

shelly-homekit-ShellyPlus1.zip

Thanks - thought I was going crazy as couldn't find any files on the page. I've downloaded it now and will give it a go over the next day or two. Cheers

cameronaffleck commented 9 months ago

Have now installed it and checked - can't seem to find any additional sensor information from the DS1820 as a GDO? Not showing on either the WebGUI side or the Home app side.

markirb commented 9 months ago

ah, I got the wrong build, can you try this: shelly-homekit-ShellyPlus1.zip

cameronaffleck commented 9 months ago

ah, I got the wrong build, can you try this: shelly-homekit-ShellyPlus1.zip

I've been using this firmware since you posted, and haven't seen any additional information from the temperature sensor in either Home or the Web page. The sensor doesn't appear when the Plus 1 is set to either switch or GDO. Anything to try?

markirb commented 9 months ago

Ok; not ok your side, there is the chance that a pin is wrong. I will get back to you. Your webinterface under version should say something like 2.10.1-152-gb6fab82-addon_unification correct?

cameronaffleck commented 9 months ago

Ok; not ok your side, there is the chance that a pin is wrong. I will get back to you. Your webinterface under version should say something like 2.10.1-152-gb6fab82-addon_unification correct?

Yep - see image

Screenshot 2024-02-10 at 11 11 59
markirb commented 9 months ago

Okay good, can you try this one this uses gpio1, which should be correct according to tasmota… shelly-homekit-ShellyPlus1.zip

cameronaffleck commented 9 months ago

Okay good, can you try this one this uses gpio1, which should be correct according to tasmota… shelly-homekit-ShellyPlus1.zip

Just uploaded and no difference to the previous version, other than the temperature of the actual shelly is approximately 10º warmer than it was before... The webgui also takes a lot longer to load than the previous build.

Currently on build 20240210-193437/2.11.2-48-g68c79be

markirb commented 9 months ago

Ok strange… I will have a look again.If it’s hotter than better revert to an older version….But thanks for testing this

markirb commented 9 months ago

ok, i rechecked tasmota firmware. which has addon working since a few weeks. they seem to be using gpio0 and 1 for onewire out and in respectively... notably by arendst himself: https://github.com/arendst/Tasmota/discussions/20580#discussioncomment-8256030 I tried this here:

shelly-homekit-ShellyPlus1.zip

cameronaffleck commented 9 months ago

ok, i rechecked tasmota firmware. which has addon working since a few weeks. they seem to be using gpio0 and 1 for onewire out and in respectively... notably by arendst himself: arendst/Tasmota#20580 (comment) I tried this here:

shelly-homekit-ShellyPlus1.zip

First impressions seem to suggest it's working..! Both Home and WebGui are successfully showing temperature values. Will keep you updated.

Screenshot 2024-02-11 at 20 30 10
markirb commented 9 months ago

Very nice.

Now I'm interested why your garage has 41 degrees 😂😂

cameronaffleck commented 9 months ago

Very nice.

Now I'm interested why your garage has 41 degrees 😂😂

I'm not actually planning to use it as a GDO (or a switch really) but wanted to be able to get an external temperature sensor into HomeKit. Seemed one way of doing it with the bonus of a relay.

Doesn't work for my NTC sensor sadly, unless you know where to enable that?

markirb commented 9 months ago

What do you mean exactly? Is the scaling for DS18B20 incorrect? What exact type do you have?

cameronaffleck commented 9 months ago

What do you mean exactly? Is the scaling for DS18B20 incorrect? What exact type do you have?

I have the DS18B20 as a test sensor, I'll use it somewhere else eventually. It's within 1.5ºC of my Flir Infrared camera.

I'm using a 10K NTC Thermistor Sensor that wraps around a pipe in order to monitor central heating temperature, but it wouldn't show up. The wiring diagrams from Shelly aren't particularly useful at telling you which sensor is to be wired where.

markirb commented 9 months ago

Oh so you want to use the analog/ADC input of the addon? That is currently not supported… I have no idea how that one works, we only have the 3 digital inputs working just now.

Just an idea: Is there an ds18b20 or DHT with external thermistor that you can use?

cameronaffleck commented 9 months ago

There may well be... alternatively I'll cable tie the DS18B20 onto the pipe!

Thanks for all your help - seems to be still holding strong and no abnormal temperatures from the Shelly itself.