-
Notifications
You must be signed in to change notification settings - Fork 25
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
iOS HomeKit API - Homebridge #193
Comments
@pihome-shc i have installed Homebridge with webgui now what is next? is there any process to read temperature or show temperature on apple devices? |
I'm at the same point, I guess what we need to decide is what we want to achieve eg do the same as with Echo or more? I installed https://www.npmjs.com/package/homebridge-dummy plugin which at least demonstrates a dummy switch and this one could possibly a basis for talking to pihome server https://github.com/Supereg/homebridge-http-switch |
@twa127 question on echo: can we add another option to read temperature ? like alexa what is the temperature for (zone name) ? i think all these compatibility device should have same options. i mean from apple home kit we can not control schedule or anything but boost only ? display temperature with zone name ? or you are thinking adding more options? i m still trying to understand how Homebridge works and youtube only talks about all commercial solutions and add them but nothing about custom solution or adding your own stuff. |
With Echo we are emulating a WeMo switch which only responds to ON and OFF and returns a boolean reflecting the state of the switch. For temperature we would need something else but I guess that must be possible. Custom solutions are possible like the dummy switch, just need you to construct the index.js and package.json code, the functionality is in index.js |
It would not take much to turn the dummy switch code in to a Boost control, node.js has a mysql module so we could update the boost status value depending if the switch were ON or OFF |
Adding to read temperature for any zone would be good addition on echo but so far i m very happy with the work @twa127 have done. my knowledge is very limited on python and next to nothing on node.js but may be its time to upskill myself. ps: this lockdown is killing me getting home sick now :( |
Let’s hope we all keep well.
I’ve been looking at Philips Hue as we could get temperature back, early days :-)
Still playing with homebridge
…Sent from my iPhone
On 2 Apr 2020, at 22:20, PiHomeHVAC ***@***.***> wrote:
Adding to read temperature for any zone would be good addition on echo but so far i m very happy with the work @twa127 have done.
as far as Homebridge goes it would be zone icons with zone name and if tape on zone button it turn on boost for that zone. i dont think more can be achieved and i dont own any commercial solution to experiment with or what commercial or non commercial solutions can do in homekit.
my knowledge is very limited on python and next to nothing on node.js but may be its time to upskill myself.
ps: this lockdown is killing me getting home sick now :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@twa127 can i help in anyway? |
thanks for the offer, I'll let you know when i get my head around it all :-) |
I've got something working for me using the HTTP Switch example and a bit of python acting as the response server. Still a work in progress :-))
|
@twa127 that is fantastic work. |
@twa127, great work, good thinking to run python script as service also can we add this under setting->services, any option we can auto generate accessories list from all exiting zone, |
I had the same thought about something to add the accessories based on the zones, I'll work on that, perhaps make it part of the install shell. Comitted the change to add the API to the services list |
@twa127
|
@twa127 at line 67 missing " |
Hi, I've added getTemperature to the homekit api so that you can get the temperature for any zone and use in hombridge. You need to install the homebridge-http-temperature-sensor plugin and add a new accessory to the homebridge config eg
Choose your zone name and use in the url, you can add for as many zones as you like and then setup rooms on your iOS device |
@twa127 |
Hi
Did you change config.jason to match your zone names?
…Sent from my iPhone
On 8 Apr 2020, at 00:16, PiHomeHVAC ***@***.***> wrote:
@twa127
after updating and installing, i have two icons for each zone and its not showing temperature for any zone.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@twa127 here is my accessories config.
|
Looks okay to me, the only thing I'm doing different is that I've got the temperature sensors all before the switches. |
Mine-
|
saw this on pihome website. |
Thank you, too much time in my hands 😁
…Sent from my iPhone
On 28 Apr 2020, at 12:02, dvdcut ***@***.***> wrote:
saw this on pihome website.
http://www.pihome.eu/2020/04/28/pihome-with-ios-homekit/
@twa127 you deserve and thank you 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi all, I followed the instructions at http://www.pihome.eu/2020/04/28/pihome-with-ios-homekit/. The switches are working great. While the temperature gauges show 0 degC for all zone. Any advice on what I could try to fix this? Thank you. |
have a look in /var/lib/homebridge/.node-persist/storage Also does the API return anything eg |
The zone states and sensors are updated by boiler.php which is running as a cron job. boiler.php looks to see if the webhooks platform is installed and then does the update if required. sensors and switches are identified by sensorxx or switchxx wher xx is the id for the zone in the zone table hope that helps |
When I run the API I can get the correct temperature for the different zones. For example If I got to http://192.168.1.2/api/getTemperature?zonename=Living%20Room I get {"success":true,"state":"18.30"} In the /var/lib/homebridge/.node-persist/storage I have only one file called 19afcbe0f11a2084b6d026d1002341e9, the content of this file is {"key":"http-webhook-switch39","value":false}. In the homebridge log file I have:
The switches are working well, they trigger the boost as expected. |
Have you got 'graph enabled for those zones? |
also do those node_ids show up in the view 'messages_in_view_24h' |
Hi twa127, Yes, the graph option is enabled for the zones and the temperature shows up in the message_in_view24h. I was checking the /var/lib/homebridge/config.json file and notice that this is what I have for the sensors:
Should there be some line similar to the following ones that I have for the switches?
|
nope the temperatures are reported by boiler.php please try adding the following at line 97 in boiler.php print_r($sensors); then run boiler.php with php /var/cron/boiler.php you should see something like this at the top of the output Array |
the assumptions are made that the webhooks directory is /usr/lib/node_modules/homebridge-http-webhooks and the path to the homebridge config is /var/lib/homebridge/config.json and that homebridge is running as a service |
Hi twa127, Below is the output of running boiler.php after adding print_r($sensors); on line 97:
Yes, config.json is located in /var/lib/homebridge/ I do not have the /usr/lib/node_modules/ folder... |
okay first you need to find where the webhooks directory is located ie then edit boiler.php and change line 62 - using the path you located with the find |
That fixed it! My webhooks folder is: Thank you! |
great I'll change boiler.php to find the file paths |
@twa127 great as always. do we need to amend documentation to include some troubleshooting steps/commands? |
I'll amend boiler.php to find the path dynamically, so no need for doc change |
@twa127 what if someone do not have homebridge installed on their system? |
Thanks, I’ll amend boiler.php to find the path dynamically, so no need to amend docs
…Sent from my iPhone
On 10 May 2020, at 22:56, PiHomeHVAC ***@***.***> wrote:
@twa127 great as always. do we need to amend documentation to include some troubleshooting steps/commands?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Now fixed for systems where homebridge not installed |
@twa127 - fantastic work on the homebridge implementation. I just updated to the latest release and have just tested homebridge - no issues - all aspects running great. All zones & Boost switches showing in Homebridge without issue. I have installed the "homebridge-gsh" google home plugin and have tested this via the google home app. Unfortunately the homebridge google home plugin does not support temp sensors yet - so only my boost switches have appeared. If it helps - I have managed to set up thermostats in google home via openhab as a means to query the pihome database. As the process is similar it may be of use here. To add a thermostat in google home it must have min 3 components: (Mandatory) Mode: Number or String (off, heat, cool, on, ...). { ga="thermostatMode" } On my own system I have set up thermostat mode as 'heat' and temperaturesetpoint 'as my cut-off temp'. Once I have specified these values the temp for that zone appears on my google home as a simple thermostat. I can query current temperature - and it spits it back out (fyi - this value is rounded off to the nearest .5'c). Really I am only using this setup to allow me to query individual room temperatures by voice. However it could be utilized to adjust the boost cut off temp and turn on/off boost. If there was a simple way to map the current 'cutofftemp' in pihome as the 'thermostatTemperatureSetpoint' and to map the current 'boost status' (off/heat) in pihome as the 'thermostatMode' then I think the google home integration would work. Hope this helps. Awesome work on the updates guys. |
Hi, I'll try and get my head around this :-) |
FYI - the Google smart home - homebridge integration was updated earlier today. The latest release now supports temperature sensors. Link to latest release - [https://github.com/oznu/homebridge-gsh/releases/tag/v2.0.0] . I've just updated mine - and I can now ask google what temperature each zone is. Thanks again @twa127 for the hard work. |
@scottagecheeseandcrackers thank you for the update. |
Homebridge is a lightweight NodeJS server that emulates the iOS HomeKit API. This would be good add-on for PiHome if we can get this one working with PiHome.
Help and Reference:
The text was updated successfully, but these errors were encountered: