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 temperature sensor addon for Shelly 1 / 1PM #228

Open
Tins612 opened this issue Dec 8, 2020 · 101 comments
Open

Shelly temperature sensor addon for Shelly 1 / 1PM #228

Tins612 opened this issue Dec 8, 2020 · 101 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@Tins612
Copy link

Tins612 commented Dec 8, 2020

Hello, is the Shelly temperature sensor addon for Shelly 1 / 1PM planned? Currently, I can only evaluate the temperature using the Shelly Cloud app.

@alexryd
Copy link
Owner

alexryd commented Dec 14, 2020

Yes, it's been requested multiple times before and is on the roadmap.

@rangerek
Copy link

rangerek commented Jan 4, 2021

Just checking on the roadmap progress ;) would it then support different type presented in HK for Shelly 1 as well?

@simonfield76
Copy link

Intrested into this topic as I need the same implement!!!

@alexryd alexryd added enhancement New feature or request duplicate This issue or pull request already exists labels Jan 12, 2021
@homefuchs
Copy link

Hi,
first of all, thx a lot for this great shelly plugin! After I've several shelly 2.5 running for window covering,
I'm also interested in the implementation of the shelly 1 temp-addon.
Would like to use it as a room thermostat for an underfloor heating in HomeKit.
Is there a chance to get this implemented soon?

BR,

@AxelStamme
Copy link

Hi,

I would be also very interested in this solution
I have setup a Frost Guard in my Garage and it works in the Shelly.App it would be great to see the Temperatures of my 3 connected sensors via Hoobs in HomeKit

Thank you

@PatriceRobert
Copy link

Same here interested into this one 👍🏼

@bjornand1
Copy link

Same here, want to use it to monitor the temperature of my fish tank

@rangerek
Copy link

rangerek commented Apr 6, 2021

I believe it is addressed and can be closed

@AxelStamme
Copy link

I believe it is addressed and can be closed

For me it is solved I moved away from Hoobs after the performance went dow with every Update

@bjornand1
Copy link

Adressed as in it works, you mean? I cannot see the temperature readings in HomeKit.

@rangerek
Copy link

rangerek commented Apr 6, 2021

@bjornand1 use eve or controller for HomeKit as your app and you will see

@bjornand1
Copy link

@rangerek Sounds promising, but I just don’t see the temp readings, despite seeing them in the Shelly app

@bjornand1
Copy link

@rangerek I am getting this wrong, must I add the temp add-on as a separate device? I have so far believed the temperature sensor would appear as integrated with the Shelly 1 relay, but I don't see any measurements in either the Eve nor the Controller app.

@rangerek
Copy link

rangerek commented Apr 7, 2021

Disregard my post 🤦🏻‍♂️ I mixed it with power consumption - overloaded with work - sorry for inconvenience- this feature is still missing

@bjornand1
Copy link

@rangerek OK, thanks for the clarification. Hope this will be supported in the future.

@PatriceRobert
Copy link

Thanks @rangerek for the clarification, I could not find the temp in Controller either ;-)
Definitely need the three temps in Homekit via homebridge to enable correct automations ! ;-)

@PatriceRobert
Copy link

@alexryd , thanks for all your dev on shelly, really useful and pretty quick response on Homekit ;-)
Regarding the temp sensor add-on on the Shelly1, do you have any update ?
Thanks a lot,
Patrice.

@bjornand1
Copy link

@PatriceRobert Notice that this Homebridge plugin works with the add-on: https://github.com/metbosch/homebridge-http-temperature

@PatriceRobert
Copy link

@bjornand1 Thanks a lot, "field_name": "ext_temperature.0.tC" made my evening !!!!

@bjornand1
Copy link

Great! I had got it working through several hoops and then got tipped about this plugin, which is so easy😄

@tritter
Copy link

tritter commented Sep 4, 2021

@PatriceRobert @bjornand1 Checkout my fork/PR #336 added "temperatureSensor" or "thermostat" :)

@oskarhart
Copy link

Try using Homebridge Http Temperature Plugin just config with "url": "http://192.168.x.xx/status?format=json",
"http_method": "GET",
"field_name": ".ext_temperature[0].tC", works flawlessly

@PatriceRobert
Copy link

PatriceRobert commented Sep 7, 2021

@PatriceRobert @bjornand1 Checkout my fork/PR #336 added "temperatureSensor" or "thermostat" :)

Hey @tritter , I wanted to give it a try but it does not find it ....yet:
$ npm install tritter/homebridge-shellies
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/tritter/homebridge-shellies.git
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!

@tritter
Copy link

tritter commented Sep 7, 2021

@PatriceRobert my bad updated the guide. Repo should be of course "homebridge-shelly" So please use: sudo npm i -g homebridge-shelly@git+ssh://[email protected]/tritter/homebridge-shelly.git#master

@PatriceRobert
Copy link

PatriceRobert commented Sep 7, 2021

@PatriceRobert my bad updated the guide. Repo should be of course "homebridge-shelly" So please use: sudo npm i -g tritter/homebridge-shelly

;-)

$ npm install tritter/homebridge-shelly
added 102 packages, and audited 103 packages in 15s
`12 packages are looking for funding` ` run `npm fund` for details`
found 0 vulnerabilities
$

No time to test right now, will do that a bit later....

@PatriceRobert
Copy link

Hey Thom,

I gave it a try with a Shelly1 with three temp sensors but even setting up with "sensors": 3 I can only see one temperature.

@tritter

@tritter
Copy link

tritter commented Sep 9, 2021

@PatriceRobert Fixed it, thanks for testing! I only have one temp sensor but forgot to add the case for multiple sensors.

You need to reinstall the package npm install tritter/homebridge-shelly#4ddbb7c, restart homebridge and probably re-add your device (admin interface 8181 > click remove and wait till it is added again)

Let me know if it works now!

@PatriceRobert
Copy link

Hey @tritter , it works, I can now see the three temp sensors, good reaction time to update themselves individually. Perfect !!
Now, another request ;-) : can we ALSO have the possibility to manage the shelly1 as a relay at the same time to turn on something (some fans in my example) so to have a 4th object published in homekit ?

@Tontonpat
Copy link

I don't find node-modules/shellies folder in your file
Capture d’écran 2022-06-17 à 16 55 41
s

@tritter
Copy link

tritter commented Jun 17, 2022

@Tontonpat you need to run npm i first then you will see your node_modules and the shellies folder.

@Tontonpat
Copy link

That was the folder i downloaded. not on my homebridge folder.
Why this error : npm ERR! fatal: Could not read from remote repository.

@tritter
Copy link

tritter commented Jun 17, 2022

Yea I know you need to run npm i inside that folder?

@Tontonpat
Copy link

i don't understand your question.
What should i do?

@Tontonpat
Copy link

@bjornand1 Thanks a lot, "field_name": "ext_temperature.0.tC" made my evening !!!!

For me, it works with "field_name": "[ext_temperature].[0].[tC]"

@solitpapa
Copy link

solitpapa commented Jul 3, 2022

hello. :) as I'm a noob with console and command sudo npm i -g homebridge-shelly@git+ssh://[email protected]/tritter/homebridge-shelly.git#master caused for me errors like below:

`bash-5.1# sudo npm i -g tritter/homebridge-shelly
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/tritter/homebridge-shelly.git
npm ERR! ssh -oStrictHostKeyChecking=accept-new: line 1: ssh: not found
npm ERR! fatal: Could not read from remote repository.
npm ERR! you
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-06-17T07_09_34_125Z-debug-0.log`

I've just copied your files, add in config

{
"id": "3494546A3B97",
"name": "Shelly 1",
"type": "outlet",
"sensors": 1
}

restart homebridge, remove that shelly 1 from x.x.x.x:8181 and finally I have it working (docker - synology nas)! :)

thank you very much. that helps a lot.

@tritter
Copy link

tritter commented Jul 3, 2022

@solitpapa @Tontonpat I published everything now, you should be able to find the plugin under: @tritter/homebridge-shelly

@solitpapa
Copy link

perfect! working fine.
maybe there is an option to place somewhere in settings the addition of sensors. now I think that it's only possible in json.

@Tontonpat
Copy link

Hi @tritter, I install your plugin successfully, but I have to uninstall the shelly plugin.
Then I try to paste { "id": "3494546A3B97", "name": "Shelly 1", "type": "outlet", "sensors": 1 } with the good id and name, but the config was on error
Where do I have to paste it?
Here is my config :
{ "name": "Shelly", "admin": { "enabled": true }, "platform": "Shelly" },

@Tontonpat
Copy link

Sorry, i forgot the devices field :
{ "name": "Shelly", "admin": { "enabled": true }, "devices": [ { "id": "************", "name": "Filtration", "type": "outlet", "sensors": 1 } ], "platform": "Shelly" },
It works flawlessly.
Thanks for your work.
One last question, does the name field is the sensor name or the shelly name? For me, they have the same name in Home

@Tontonpat
Copy link

False joy.
After homebridge restart, the sensor disappeared… and the shelly device was in the default room…
I came back with http temperature plugin and the shelly plugin

@solitpapa
Copy link

I've observed different weird behavior... after restart of homebridge everything is working fine. on page x.x.x.x:8181 I can see that devices are refreshing every few seconds... but after some time devices are not refreshing and appearing time reaching few or more minutes what is causing no response from devices... to have devices responding again I have to remove it from the list. till then they remain not reachable.
any idea what is going on and how to fix it?

@tritter
Copy link

tritter commented Jul 12, 2022

@solitpapa I use the same refresh mechanism as the main repo. Sounds like your network is spawn? Maybe you can try with a single device first? Do you may have both plugins installed?

@solitpapa
Copy link

@tritter - I rather don't expect that it's a network issue - apart from 2 shelly devices thru homebridge I have more than 60 other devices working with no problems.
I've got both plugins installed, but alexryd's is disabled.
Of course, I first tried with single shelly 1 connected thru homebridge, then switched to shelly 1pm - the same issue. now both are working in parallel - sh1pm with 3 sensors, sh1 with 1 sensor, and described issue occurs after some hours of correct working.

@PatriceRobert
Copy link

Small tip here that 'may' or 'may not' be related.
The Shellies are going to use multicast by default (can override via CoIoT). Then some of the WiFi or other routers sometimes have a multicast conversion to unicast which breaks the communication, you will see your device at the early stages and then it does not seems to answer as the multicast packet is converted to unicast and the homebridge device will not see it going through. Of course, you can still reach your Shelly via the WebUI as this is pure unicast, you can ping it but when the Shelly changes or updates its status, this will communicate via multicast.
Bottom line (for me at least), I did change my network setup to disable the multicast to unicast conversion and all is working like a charm.
the only device I have CoIoT for is the motion sensor (under 'Internet & Security') but requires direct connection to 'fixed' IP address.
-- Patrice.

@solitpapa
Copy link

@PatriceRobert - thank you for the detailed explanation. going according to your recommendation I've turned off multicast enhancement in my unifi network.
thought that helped but after some more time issue appeared again. this time even device simply went offline.
maybe I'm doing something wrong from very beggining so correct me if needed - alexrg's plugin disabled, turned on version from @tritter, I've turned on child bridge for shelly. Before starting to operate shelly in Homekit I restart HB, thru x.x.x.x:8181 remove devices and wait till they appear again. Then I add shelly device to homekit automation connected with PIR sensor and that's it.

any advice for a noob hb user? ;)

@tritter
Copy link

tritter commented Jul 16, 2022

@solitpapa good, i also recommend to run without multicast and set within the Shelly settings your CoIT host. That should work…
If they appear online on the 8181 interface it’s something between your homebridge and HomeKit-Hub (you can find it out within the HomeKit app -> Settings -> Home Hub. Maybe restart that one? Or check if they appear online what’s happening on the LAN and if your HomeKit-Hub is able to reach your homebridge server…

@solitpapa
Copy link

@tritter - ok - will try setting my HB server as coiot peer. will come back with feedback.
one more question - operation thru the shelly app may have an impact on described previously issue? I'm mean verifying temperature and switching on/off the outlet? I'm doing that to take a look on graphs with temp history.

@tritter
Copy link

tritter commented Jul 18, 2022

@solitpapa I also use the shelly app too... The cloud function takes some performance away but should usually work too.

@solitpapa
Copy link

@tritter - apart from the issue related to connection - sometimes I can see that one of 3 sensors becomes an outlet and while activating it is responding as the main outlet from my shelly 1 PM, which means I have 2 outlets and 2 sensors, instead of 1 outlet and 3 sensors. any idea? :)

@TheTeeDot
Copy link

False joy.
After homebridge restart, the sensor disappeared… and the shelly device was in the default room…
I came back with http temperature plugin and the shelly plugin

@tritter I had the same behaviour - I removed the shelly with the add-on and then let it be rediscovered. I could see the temperature in HomeKit as expected. After a reboot the temperature disappeared from Homekit. Happy to share logs or other debug if you let me know what you need

@tritter
Copy link

tritter commented Dec 30, 2022

@solitpapa @TheTeeDot if you're still interested I made some changes and figured out the bugs! You can also exclude the relay now. So you only have a temperature sensor.

@jeloneal
Copy link

@tritter how can I install your version of the plug-in? Ideally without having to reconfigure all Accessoires again.

@tritter
Copy link

tritter commented Dec 30, 2022

@jeloneal

  1. delete old homebridge-shelly (without the config!).
  2. search for @tritter/homebridge-shelly in homebridge-ui install that one...
  3. Restart

@jeloneal
Copy link

@tritter will this also work if the plugin is configured as a sub-bridge? By deleting the plugin you mean uninstall and preserving config when asked for, right?

@tritter
Copy link

tritter commented Dec 30, 2022

@jeloneal yes. As always please make backups 👍 but it should work the plugin is just an extension to the original code.

@jeloneal
Copy link

@tritter thanks a lot for the help. Works!

@PeterALee
Copy link

Hi @tritter , does your temperature sensor work with a sensor connected to a Shelly Uni, or is it just for the Shelly 1 & 1PM?
Trying to get my Shelly Uni + temp sensor to show the temperature in Home App, but so far I can only see it in the Shelly App & the Uni’s webpage.

@tritter
Copy link

tritter commented May 8, 2023

@PeterALee nope this is just for the 1/1PM with the addon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests