homebridge-edomoticz Plugin
Moderator: leecollings
-
- Posts: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Hello everyone, I have a virtual device in energy automation that tells me the available energy that I have. What type of virtual device do I have to create in domoticz so that it appears in Apple Home? neither rain nor wind appear. Thanks in advance
-
- Posts: 300
- Joined: Thursday 01 November 2018 19:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.6
- Location: Portugal
- Contact:
Re: homebridge-edomoticz Plugin
So I discovered a solution to the log spamming issue, quite simple really, at least for me.
I had made a typo when setting my "Local Networks" in settings, missing out the final "*" in "127.0.0.*;192.168.1.*;192.168.2.*"
Once I added the asterix, Domoticz no longer logged the connections as incoming and my logs became usable again , huzzah !
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
-
- Posts: 80
- Joined: Thursday 31 May 2018 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
There has been a lot of discussion lately about the changes to the behavior of blinds in the latest beta version. Inverted blinds don't exist anymore, they have now been replaced by options where you can choose to invert the state (Open/Close) or position (slider). Also the command to open and close blinds are now Open and Close instead of On and Off (even though On and Off still works, but the other way around).
As some of you might have noticed, I posted a quick fix on https://github.com/domoticz/domoticz/issues/5371 for blinds which works as long as you don't invert the state or position. I've been looking at the code today to see if a solution can be found (as I don't see a lot of activity on the hombebridge-edomoticz github page).
I was able to get all blind types working for the new blind behavior, as well as the old ones. I didn't change anything for venetian blinds, as I don't have any to test (but I suppose it should work). There is also a new type of blinds in domoticz (Blinds + Stop) that was previously not supported. They are also blinds with position, but just have a stop button. Those blind types are automatically created when using MQTT Autodiscovery, so I added support for them too (just not the stop button, as that's not supported by homebridge as far as I know).
When using the new type of blinds, the Open or Close command will be sent. For older ones, it's still On or Off. The State and Position will be automatically recalculated to be reflected correctly in the home app.
I had to add an option the homebridge-edomoticz settings where you have to set if you use legacy blinds or not (this was the easiest way without having to create a new function). It should be left to 0 when using a recent beta, or set to 1 if using an older version.
If some of you could test if everything works as expected, that would be nice. In attachment to this post you can find the 3 modified files.
config.schema.json - Should be placed in /homebridge/node_modules/homebridge-edomoticz/
constants.js and domoticz_accessory.js - Should be placed in /homebridge/node_modules/homebridge-edomoticz/lib
Don't forget to make a backup of your old files first!!!
PS: Feel free to make adjustments or propose improvements if you have any knowledge of javascript. Also report any bugs with as much details as you can. If it works as expected, we can always create a pull request, in the hope it will be accepted (but I honestly don't know how that all works).
Edit: Deleted files as this pull request has been merged. Update hombridge edomoticz to use these new features.
As some of you might have noticed, I posted a quick fix on https://github.com/domoticz/domoticz/issues/5371 for blinds which works as long as you don't invert the state or position. I've been looking at the code today to see if a solution can be found (as I don't see a lot of activity on the hombebridge-edomoticz github page).
I was able to get all blind types working for the new blind behavior, as well as the old ones. I didn't change anything for venetian blinds, as I don't have any to test (but I suppose it should work). There is also a new type of blinds in domoticz (Blinds + Stop) that was previously not supported. They are also blinds with position, but just have a stop button. Those blind types are automatically created when using MQTT Autodiscovery, so I added support for them too (just not the stop button, as that's not supported by homebridge as far as I know).
When using the new type of blinds, the Open or Close command will be sent. For older ones, it's still On or Off. The State and Position will be automatically recalculated to be reflected correctly in the home app.
I had to add an option the homebridge-edomoticz settings where you have to set if you use legacy blinds or not (this was the easiest way without having to create a new function). It should be left to 0 when using a recent beta, or set to 1 if using an older version.
If some of you could test if everything works as expected, that would be nice. In attachment to this post you can find the 3 modified files.
config.schema.json - Should be placed in /homebridge/node_modules/homebridge-edomoticz/
constants.js and domoticz_accessory.js - Should be placed in /homebridge/node_modules/homebridge-edomoticz/lib
Don't forget to make a backup of your old files first!!!
PS: Feel free to make adjustments or propose improvements if you have any knowledge of javascript. Also report any bugs with as much details as you can. If it works as expected, we can always create a pull request, in the hope it will be accepted (but I honestly don't know how that all works).
Edit: Deleted files as this pull request has been merged. Update hombridge edomoticz to use these new features.
Last edited by ksacca on Tuesday 20 December 2022 12:07, edited 2 times in total.
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: homebridge-edomoticz Plugin
Once folks are happy with the proposed changes, see https://docs.github.com/en/get-started/ ... o-projects for how to create a fork, make your modifications, then submit a pull request.
Long story short: I don’t have any blinds, so can’t test anything to do with blinds.
Long story short: I don’t have any blinds, so can’t test anything to do with blinds.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
-
- Posts: 24
- Joined: Monday 13 November 2017 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Belgium
- Contact:
Re: homebridge-edomoticz Plugin
Tested and works for me, thanks for this work arround.
If some of you could test if everything works as expected, that would be nice. In attachment to this post you can find the 3 modified files.
config.schema.json - Should be placed in /homebridge/node_modules/homebridge-edomoticz/
constants.js and domoticz_accessory.js - Should be placed in /homebridge/node_modules/homebridge-edomoticz/lib
Don't forget to make a backup of your old files first!!!
PS: Feel free to make adjustments or propose improvements if you have any knowledge of javascript. Also report any bugs with as much details as you can. If it works as expected, we can always create a pull request, in the hope it will be accepted (but I honestly don't know how that all works).
Stephan
-
- Posts: 80
- Joined: Thursday 31 May 2018 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Thanks for the info. I already forked the repo and was looking into how to commit changes to it. This link will surely be useful.Marci wrote: ↑Wednesday 19 October 2022 20:15 Once folks are happy with the proposed changes, see https://docs.github.com/en/get-started/ ... o-projects for how to create a fork, make your modifications, then submit a pull request.
Long story short: I don’t have any blinds, so can’t test anything to do with blinds.
I made it so people can actually review and see the changes first before adapting anything (I would also be hesitant to download a random file from a forum). It can be found on https://github.com/ksacca/homebridge-edomoticz for now, but I only edited one file as a test. Will do the other ones tomorrow so all changes are clear and transparant.
Glad to hear. Let me know if you encounter any issues.
-
- Posts: 80
- Joined: Thursday 31 May 2018 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
I forked homebridge-edomoticz and made all code changes. It is available on https://github.com/ksacca/homebridge-edomoticz.
You can see the changes to the code in each commit.
If you would like to test, you should be able to replace the files using the following commands (replace your-path-to-homebridge-edomoticz by the directory where your edomoticz plugin is installed). A backup of your old file will be made, so you can always revert the changes.
Don't forget to restart homebridge once the files have been replaced.
EDIT: Changes have been merged into homebridge edomoticz, so you can now simply update to use these new features. I will delete the forked repo.
You can see the changes to the code in each commit.
If you would like to test, you should be able to replace the files using the following commands (replace your-path-to-homebridge-edomoticz by the directory where your edomoticz plugin is installed). A backup of your old file will be made, so you can always revert the changes.
Code: Select all
cd <your-path-to-homebridge-edomoticz>
sudo wget --backups=1 https://raw.githubusercontent.com/ksacca/homebridge-edomoticz/master/config.schema.json
cd lib
sudo wget --backups=1 https://raw.githubusercontent.com/ksacca/homebridge-edomoticz/master/lib/constants.js
sudo wget --backups=1 https://raw.githubusercontent.com/ksacca/homebridge-edomoticz/master/lib/domoticz_accessory.js
EDIT: Changes have been merged into homebridge edomoticz, so you can now simply update to use these new features. I will delete the forked repo.
Last edited by ksacca on Tuesday 20 December 2022 12:08, edited 1 time in total.
-
- Posts: 1
- Joined: Tuesday 18 October 2022 15:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Hi,
It's working smoothly. Thanks a lot. I hope it will be in the main branch soon
Thanks,
/F
It's working smoothly. Thanks a lot. I hope it will be in the main branch soon
Thanks,
/F
-
- Posts: 36
- Joined: Thursday 03 August 2017 15:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
I downloaded your plugin update but I don't know how to apply the changes on my raspberry.ksacca wrote: ↑Wednesday 19 October 2022 16:37 There has been a lot of discussion lately about the changes to the behavior of blinds in the latest beta version. Inverted blinds don't exist anymore, they have now been replaced by options where you can choose to invert the state (Open/Close) or position (slider). Also the command to open and close blinds are now Open and Close instead of On and Off (even though On and Off still works, but the other way around).
As some of you might have noticed, I posted a quick fix on https://github.com/domoticz/domoticz/issues/5371 for blinds which works as long as you don't invert the state or position. I've been looking at the code today to see if a solution can be found (as I don't see a lot of activity on the hombebridge-edomoticz github page).
I was able to get all blind types working for the new blind behavior, as well as the old ones. I didn't change anything for venetian blinds, as I don't have any to test (but I suppose it should work). There is also a new type of blinds in domoticz (Blinds + Stop) that was previously not supported. They are also blinds with position, but just have a stop button. Those blind types are automatically created when using MQTT Autodiscovery, so I added support for them too (just not the stop button, as that's not supported by homebridge as far as I know).
When using the new type of blinds, the Open or Close command will be sent. For older ones, it's still On or Off. The State and Position will be automatically recalculated to be reflected correctly in the home app.
I had to add an option the homebridge-edomoticz settings where you have to set if you use legacy blinds or not (this was the easiest way without having to create a new function). It should be left to 0 when using a recent beta, or set to 1 if using an older version.
homebridge-settings.JPG
If some of you could test if everything works as expected, that would be nice. In attachment to this post you can find the 3 modified files.
config.schema.json - Should be placed in /homebridge/node_modules/homebridge-edomoticz/
constants.js and domoticz_accessory.js - Should be placed in /homebridge/node_modules/homebridge-edomoticz/lib
Don't forget to make a backup of your old files first!!!
PS: Feel free to make adjustments or propose improvements if you have any knowledge of javascript. Also report any bugs with as much details as you can. If it works as expected, we can always create a pull request, in the hope it will be accepted (but I honestly don't know how that all works).
When I connected to the ftp, I don't see files in home/homebridge ?!
the node_modules folder is not here in home/homebridge .
Can you help how to make changes, replace files ?
Thanks
-
- Posts: 80
- Joined: Thursday 31 May 2018 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Hi Ouate,
It depends how homebridge was installed. If you use Homebridge UI, the plugin folder will be shown in the status page under system information.
If not, you could ssh into your pi and run the following command which should help you find the directory:
Follow the instructions in this post: https://domoticz.com/forum/viewtopic.ph ... 19#p293619 to install it as it's easier than replacing the files manually (and safer as a backup of the old files is made).
It depends how homebridge was installed. If you use Homebridge UI, the plugin folder will be shown in the status page under system information.
If not, you could ssh into your pi and run the following command which should help you find the directory:
Code: Select all
sudo find -name "node_modules"
-
- Posts: 36
- Joined: Thursday 03 August 2017 15:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
many thanks !!!
the installed folder was in /var/
Now I found it, everything works well home bridge now !!
Congratulations for the fix !
Now I will be grateful to find a working fix for the android Domoticz app
the installed folder was in /var/
Now I found it, everything works well home bridge now !!
Congratulations for the fix !
Now I will be grateful to find a working fix for the android Domoticz app
-
- Posts: 23
- Joined: Sunday 11 March 2018 15:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Contact:
Re: homebridge-edomoticz Plugin
This worked for me.ksacca wrote: ↑Friday 21 October 2022 10:20 I forked homebridge-edomoticz and made all code changes. It is available on https://github.com/ksacca/homebridge-edomoticz.
You can see the changes to the code in each commit.
If you would like to test, you should be able to replace the files using the following commands (replace your-path-to-homebridge-edomoticz by the directory where your edomoticz plugin is installed). A backup of your old file will be made, so you can always revert the changes.
Don't forget to restart homebridge once the files have been replaced.Code: Select all
cd <your-path-to-homebridge-edomoticz> sudo wget --backups=1 https://raw.githubusercontent.com/ksacca/homebridge-edomoticz/master/config.schema.json cd lib sudo wget --backups=1 https://raw.githubusercontent.com/ksacca/homebridge-edomoticz/master/lib/constants.js sudo wget --backups=1 https://raw.githubusercontent.com/ksacca/homebridge-edomoticz/master/lib/domoticz_accessory.js
So all the blinds that in the Home app on iOS were marked as incompatible. Updating the files and restarting homebridge updated the blinds and they can now be controlled again (so I can use Siri to close the blinds )
Was installed in:
Code: Select all
/usr/lib/node_modules/homebridge-edomoticz/
-
- Posts: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Hi!
i have some plugins that i use to control my philips tv, the only way i got working was to install a plugin in homebridge, i tried install it in domoticz directly but i didnt get it to work.
so my question is if its possible to get domoticz to control these swithes that i have made to control my tv in homebridge?
today i use this edomoticz plugin to get all my switches from domoticz into homebridge, but is it possible to do it the other way?
i have some plugins that i use to control my philips tv, the only way i got working was to install a plugin in homebridge, i tried install it in domoticz directly but i didnt get it to work.
so my question is if its possible to get domoticz to control these swithes that i have made to control my tv in homebridge?
today i use this edomoticz plugin to get all my switches from domoticz into homebridge, but is it possible to do it the other way?
-
- Posts: 39
- Joined: Tuesday 24 May 2016 22:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
For simple functions involving only button presses you can create dummy buttons in domoticz. These will be displayed in homebridge and through automations in the home app you can link them. I use it for a couple of plugs, but I think doing it with a TV can be cumbersome and impractical. But for things like turning on and off it can be a practical solution.tjabas wrote: ↑Saturday 26 November 2022 18:25 Hi!
i have some plugins that i use to control my philips tv, the only way i got working was to install a plugin in homebridge, i tried install it in domoticz directly but i didnt get it to work.
so my question is if its possible to get domoticz to control these swithes that i have made to control my tv in homebridge?
today i use this edomoticz plugin to get all my switches from domoticz into homebridge, but is it possible to do it the other way?
-
- Posts: 39
- Joined: Tuesday 24 May 2016 22:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Only partially related: any chance to add flood detectors to the plugin? Smoke detectors and their notifications work very well and seeing flood detectors as switches is a bit of a waste.Marci wrote: ↑Wednesday 19 October 2022 20:15 Once folks are happy with the proposed changes, see https://docs.github.com/en/get-started/ ... o-projects for how to create a fork, make your modifications, then submit a pull request.
Long story short: I don’t have any blinds, so can’t test anything to do with blinds.
-
- Posts: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
thanks for the quick reply, i have looked everywhere in homebridge but i cant find out how to link the button/swithes together in homebridgeJonyBCN wrote: ↑Saturday 26 November 2022 19:33For simple functions involving only button presses you can create dummy buttons in domoticz. These will be displayed in homebridge and through automations in the home app you can link them. I use it for a couple of plugs, but I think doing it with a TV can be cumbersome and impractical. But for things like turning on and off it can be a practical solution.tjabas wrote: ↑Saturday 26 November 2022 18:25 Hi!
i have some plugins that i use to control my philips tv, the only way i got working was to install a plugin in homebridge, i tried install it in domoticz directly but i didnt get it to work.
so my question is if its possible to get domoticz to control these swithes that i have made to control my tv in homebridge?
today i use this edomoticz plugin to get all my switches from domoticz into homebridge, but is it possible to do it the other way?
-
- Posts: 39
- Joined: Tuesday 24 May 2016 22:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
It is not a link, it is an automation directly in the Home app. Something like this: "if Philips TV switch is on" then "Phlipis Dummy switch is on".
You must do it both for on and off. It's cumbersome. It works for me for a plug in the bathroom and another that controls a camera, but for something more complex I don't know if it's worth it.
-
- Posts: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
ok, i have been looking in the homebridge website, that one i have installed on my rpi, so i need to download an app for my phone?JonyBCN wrote: ↑Saturday 26 November 2022 19:50It is not a link, it is an automation directly in the Home app. Something like this: "if Philips TV switch is on" then "Phlipis Dummy switch is on".
You must do it both for on and off. It's cumbersome. It works for me for a plug in the bathroom and another that controls a camera, but for something more complex I don't know if it's worth it.
-
- Posts: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
i fixed it , managed to get rutin to work, so it works great, thank you for your help
-
- Posts: 39
- Joined: Tuesday 24 May 2016 22:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Nevermind, I just saw that it is Domoticz that does not have a leak sensor as an accessory. As an alternative I have found this, although it has cost me to make it work and I have also changed the pool to 30 seconds (500 milliseconds seems excessive to me and it floods the homebridge log): https://github.com/davidabacon/homebrid ... ased-water sensor.JonyBCN wrote: ↑Saturday 26 November 2022 19:35Only partially related: any chance to add flood detectors to the plugin? Smoke detectors and their notifications work very well and seeing flood detectors as switches is a bit of a waste.Marci wrote: ↑Wednesday 19 October 2022 20:15 Once folks are happy with the proposed changes, see https://docs.github.com/en/get-started/ ... o-projects for how to create a fork, make your modifications, then submit a pull request.
Long story short: I don’t have any blinds, so can’t test anything to do with blinds.
With domoticz I create the files by script (on and off actions) and it seems to work fine.
Who is online
Users browsing this forum: No registered users and 1 guest