Jump to content

xKing

Administrators
  • Posts

    1028
  • Joined

  • Last visited

Everything posted by xKing

  1. eyaniv, thank you for your feedback! Unfortunately I'm not aware of a way to "subscribe" to MyQ so I can have an always up to date status. There is what I can do: 1) Have the script update ISY automatically when you invoke "status" - that would eliminate the need for the bash script. 2) Re-write it as a "server" in NODE.JS so it would run all the time and poll the MyQ server periodically (with configurable interval) and update ISY when needed (update won't be instant of course). Node server would be similar to option 2, but with the same limitation - I'm not aware of the way to "subscribe" to the MyQ. I personally have a magnetic contact on my garage door tied to my security system so I know door status from it instantly.
  2. Is anyone interested in NODE.JS script that is using the NEST API (Firebase) and capable of reporting thermostat status back to ISY (as variables)? It's pretty rough right now but if you understand NODE.JS (Javascript) you can customize it to your taste.
  3. Did you actually add the device (entered PIN, etc)?
  4. If the paste above was the complete file - you missing the closing } There is mine: { "description": "This is an example configuration file with all supported devices. You can use this as a template for creating your own configuration file containing devices you actually own.", "platforms": [ { "platform": "ISY", "name": "ISY", "host": "1.1.1.1", "port": "80", "username": "user", "password": "top-secret" } ] }
  5. Can you show the config? Edit out the password (replace with secret or 1111 or something) Sent from my iPhone using Tapatalk
  6. npm run start > hab.log 2>&1 &
  7. BTW, it seems like it dies daily with this: events.js:85 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at exports._errnoException (util.js:746:11) at TCP.onread (net.js:559:26)
  8. See if http:// works? Without s Sent from my iPhone using Tapatalk
  9. I prefer low voltage contractor coils (kind of what is used in HVAC - 24V coil on 240V contractor). Yes that would require a transformer powered off the X10 or Insteon receptacle but much less chances of damaging the "smart" part
  10. Running those loads on a contactors would also add a benefit of the ability to go 240V if needed
  11. Yes, it talks to the MyQ cloud server. I know it's kind of odd to go to the cloud to close your own garage door, but MyQ Internet gateway does not seem to have anything locally accessible. If you don't want could - your only way would be soldering to the remote or wall button
  12. Sure! Sent from my iPhone using Tapatalk
  13. See if this will work for you?
  14. Hi guys! My Garage opener broke (little gear on top sheared off) and I had to get a replacement, so I've got one of these Chamberlain models with MyQ and no way to control it via the normal contact closure. I know about soldering to the spare visor remote button but thought I'l try the software way first. So there is the simple python script that meant to be placed to /usr/lib/cgi-bin on your Pi (don't forget to do chmod +x) and called from ISY like this: To close: http://1.1.1.1/cgi-bin/myq-cgi.py?user=user@example.com&pass=secret1&cmd=close To open: http://1.1.1.1/cgi-bin/myq-cgi.py?user=user@example.com&pass=secret1&cmd=open If you want to test the script: http://1.1.1.1/cgi-bin/myq-cgi.py?user=user@example.com&pass=secret1&cmd=status It currently does not support 2 openers on the same account but that is fairly easy to add if there is a demand for it (I have a 2 car garage but it's only one door). Script is based on this one Many thanks to this topic for API description and a sample code, all I had to do is to re-write it in Python. My script does save a token to the temporary file and it would re-use that token within 1 hour of it's creation or until authentication fails (whatever comes first). Please let me know if you are interested in supporting multiple openers and Happy 4th! P.S. I think I can re-write it as a Node Server as well, but wondering what would be the best way to update the door status? Pulling it like every 15 minutes? I read my own door status via DSCLinc (just as a zone) so I did not add anything like that into the current version of this script. myq-cgi.zip
  15. nodes sent in PM, thanks!
  16. Ok, thanks for the tip, I've started mdnsd (didn't know I need it) and it got me past that error. Now - another thing - what should I have in accessories ? I mean right now I only have a platform - ISY, accessories is empty and it does not seem to like it. [andrey@penguin ~/src/homebridge]$ npm run start > homebridge@0.0.0 start /usr/home/andrey/src/homebridge > node app.js Starting HomeBridge server... Loading 1 platforms... [ISY] Initializing ISY platform... [ISY] Fetching ISY Devices. Loading 1 accessories... module.js:338 throw err; ^ Error: Cannot find module './accessories/undefined.js' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at loadAccessories (/usr/home/andrey/src/homebridge/app.js:41:31) at startup (/usr/home/andrey/src/homebridge/app.js:28:29) at Object.<anonymous> (/usr/home/andrey/src/homebridge/app.js:188:1) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) UPDATE: Never mind this, deleting accessories altogether fixed the above as well. Sorry about the extra confusion Server seems like it's up now, going to try to add something. UPDATE2: It works!! Kind of Would not let me add the Z Wave device but added Insteon device no problem And Siri can turn it on/off! Unfortunately it does not work from the Watch - Siri just says something like "I can help you control your home when you using handoff on your iPhone". But still very cool, thanks!
  17. avahi works fine, I can do avahi-browse -at no prob, you saying you have to have some kind of mdns process running?
  18. Tried on my FreeBSD server, had fun fixing the dns_sd.h not being found (I had it in /usr/local/include rather than in /usr/include, could not figure out how to tell the d@mn, thing to look under /usr/local/include), now it passed the install steps, trying to run and getting Unexpected result while probing for avahi: { [Error: dns service error: unknown error code] errorCode: -65563 } /usr/home/andrey/src/homebridge/lib/HAP-NodeJS/node_modules/mdns/lib/avahi.js:28 dns_sd.DNSServiceRefDeallocate(sr);
  19. I'd try with curl and see what I get... As a last resort - try to collect a trace with Wireshark
  20. I don't even see myself without some level of home automation... You have to have the security/fire alarm system for the house, right? So that's already something. Then look at the thermostats - most of the households are moving to programable ones and there is a good chance new thermostat would have some WiFi capabilities as well. Then - tuning your outside and holiday lights on and off at the pre-determined times - you have to add some kind of automation device to do that. Sprinkler controllers - it really helps to have some kind of a smart controller that calculates evapotransportation based on weather data and would only water when needed. Can't escape HA - it will sneak into your house one way or another On power quality - I'd say it really depends on the location. I've travelled around the world (Russia, India, China, Turkey, South Africa, Europe (many countries there)) and seen different things... From datacenters and government/military facilities which would have multiple feeds, diesel generators and batteries to rural areas with no reliable power at all. US is looking pretty good. Here in Texas where I live now - it's constant 123-125V on each side and maybe 2-3 interruptions per year, nether of them lasting more than 30 minutes. I did not look at the waveform via oscilloscope for a long time - but what I've seen was looking fine. The biggest noise generators would be AC compressors cycling on/off and pool pumps (variable speed especially).
  21. I agree, I have this guy: http://www.homedepot.com/p/Eaton-Whole-House-Surge-Protector-CHSPT2ULTRA/204761136installed it inside the main panel and it seems to do the job
  22. I use http://freedns.afraid.org- totally free DDNS
  23. Updated the nest-cgi.py script so it does support index=-1 which would mean "ALL" for the cmd=mode like: http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=off&index=-1 http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=range&index=-1 So you can shut off/turn on both Nests using a single network resource
  24. Hi guys! Thought this might help someone like me who does not have any Windows PCs at home to run EventGhost but has Raspberry Pi or other Unix-based system and wants ISY to be able to perform simple actions with the NEST. Solution is based on the nest.py tool which is available here. All I did is modified it to run as a CGI script. There is what you will need: 1) ISY with Networking module installed 2) Raspberry Pi or any other Unix box (I use FreeBSD 10) with Apache web server installed and running and python installed. Pi should be able to access internet. First start with the CGI script nest-cgi.py Place the file to the cgi-bin folder on your Pi, I think it is /usr/lib/cgi-bin but may vary, you can always find it using the following command find / -type d -name cgi-bin make sure file is executable chmod +x nest-cgi.py make sure 1st line of the file is pointing to the correct python binary on your system, for Pi (default) it would be /usr/bin/python, for FreeBSD it's /usr/local/bin/python - correct if wrong. try to execute the file ./nest-cgi.py - it should complain about username or password being missing - that is OK. if you see python errors - that's bad, let me know and I'll try to help. you should be ready to try it fire up your favorite web browser and point to the script like that http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=show replacing your username and password with your Nest credentials that should give you a long list of variables showing a current status of your Nest(s) - if you see that - you are good to go! there is a list of possible commands script can understand, note that if you have multiple Nest thermostats - you may want to add &index= option to the URL to address the specific one. If option is not present - it assumes index=0 which is your first thermostat, index=1 would be your second and so on. Which is which - experiment! AWAY mode is set for the structure, not individual per Nest http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=away&away=away http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=away&away=here http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=off http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=cool http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=heat http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=range for another Nest - add index: http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=mode&mode=off&index=1 http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=temp&newtemp=72 http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=fan&fan=on http://1.2.3.4/cgi-bin/nest-cgi.py?user=me@example.com&pass=secret&cmd=fan&fan=auto All you need now is to create Network Resources on your ISY! I use POST method (it is possible to use GET as well but that would make your Nest username and password visible in the apache access.log file which is not secure) Host: your Pi IP Path: /cgi-bin/nest-cgi.py Timeout: 5000 (it takes time to get to the Nest cloud service) Mode: C-Escaped Body: your command, for example: user=me@example.com&pass=secret&cmd=fan&fan=auto please note that if you have special characters in your password - you may need to encode them in URL-safe way like "%2A" for star *, look at the ASCII table for reference. Test your Resource and see if Nest reacts I personally use it to set Nest AWAY and HOME as my alarm system status changes and I also have it set both Nests to OFF if my alarm system reports FIRE alarm (to shutdown possible air supply to the fire just in case). Now how about the other way around? I did some experiments and actually was able to set ISY variable to the current humidity level reported by Nest - I'm attaching the script nest.py I just run it via cron every couple hours like that: ${HOME}/bin/nest.py --user me@example.com --pass secret --isyuser=user --isypass=secret2 --varnum=12 curhumid and it does set ISY's state variable number 12 to the humidity level on my downstairs Nest. Both scripts attached: nestpy.zip
  25. Maybe start with less harsh steps? Like disable all programs and enable one by one slowly?
×
×
  • Create New...