andrewshilliday / garage-door-controller

Software to monitor and control garage doors via a raspberry pi
MIT License
327 stars 132 forks source link

Only display single door #55

Closed monkeyboyohyeah closed 7 years ago

monkeyboyohyeah commented 7 years ago

Hi, Firstly, thanks for a great little programme.

I've only got one big garage door and, try as I might, I can't seem to be able to remove the 'right' door from the programme. I see people are able to add doors - any way I can remove a door?

Thanks in advance.

andrewshilliday commented 7 years ago

Can you upload your config.json file?

monkeyboyohyeah commented 7 years ago

Almost completely unmodified. I've only changed the name of the left door to "DOOR".

config.json.zip

andrewshilliday commented 7 years ago

Ah. Well then. In order to remove one of the doors, simply remove the entire second door description block from the config file.

Delete the following:

    "right" : 
    {
        "name" : "RIGHT",
        "relay_pin" : 24,
        "state_pin" : 21,
        "state_pin_closed_value" : 0,
        "approx_time_to_close" : 15,
        "approx_time_to_open" : 15,
        "openhab_name" : "g_door_right"
    }

Then you should have only a single door button.

monkeyboyohyeah commented 7 years ago

You'd think that would work!

However, the script fails with the following message;

pi@raspberrypi:~/garage-door-controller $ sudo python controller.py

Traceback (most recent call last):

File "controller.py", line 386, in

controller = Controller(json.load(config_file))

File "/usr/lib/python2.7/json/init.py", line 290, in load

**kw)

File "/usr/lib/python2.7/json/init.py", line 338, in loads

return _default_decoder.decode(s)

File "/usr/lib/python2.7/json/decoder.py", line 366, in decode

obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode

obj, end = self.scan_once(s, idx)

ValueError: Expecting property name: line 56 column 1 (char 870)

andrewshilliday commented 7 years ago

Please post your resulting config.json. You've probably got a rogue comma or something.

monkeyboyohyeah commented 7 years ago

Got it, There was a comma that was causing the problem; Cheers

screen shot 2017-06-10 at 1 58 57 pm