sebbacon / home-automation

5 stars 0 forks source link

Some TRVs not responding #16

Closed sebbacon closed 3 years ago

sebbacon commented 3 years ago

Kitchen good:

sudo homegear -e 'rc $hg->setValue("MEQ1821372:1", "AUTO_MODE", true);'

Master bedroom bad:

sudo homegear -e 'rc $hg->setValue("OEQ1040288:1", "AUTO_MODE", true);'
sebbacon commented 3 years ago

It seems like a restart of the homegear service helped; but I had to try samuel's twice

I guess I'm going to have to rewrite the script I wrote to retry failures.

Perhaps also write a simple test script to help me check all the things. Wander round the house seeing if it's to do with where I stand, etc.

sebbacon commented 3 years ago

I guess the script could be this

import subprocess

devices = {
    "living room front": "OEQ1040676",
    "living room back": "OEQ1039575",
    "kitchen": "MEQ1821372",
    "study": "OEQ1039499",
    "wall thermometer": "OEQ1447059",
    "guest bedroom": "OEQ1039384",
    "beth bedroom": "OEQ1041021",
    "master bedroom": "OEQ1040288",
    "samuel bedroom": "OEQ1039491",
}
for name, device in devices.items():
   try:
       subcommand.check_result(f"homegear -e 'rc $hg->setValue(\"{device}:1\", \"AUTO_MODE\", true);', shell=True)
    except:
      print(name)
sebbacon commented 3 years ago

Script at /usr/local/bin/test_rf.py confirms they are now all contactable.