andrewshilliday / garage-door-controller

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

I tried copying the garage-door-controller in /home/pi/ #30

Closed sandeepbv closed 6 years ago

sandeepbv commented 8 years ago

When i open the index.html..i am not able to see the anything except "My Garage"..not able to see any icons to select so not sure whether I need to copy the pictures anywhere else along with the folder

Also when i am running the python controller.py..i am getting the below error pi@sandeep-pi ~/garage-door-controller $ python controller.py Traceback (most recent call last): File "controller.py", line 330, 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 , delimiter: line 28 column 20 (char 459) pi@sandeep-pi ~/garage-door-controller $

can you please help here ???

sandeepbv commented 8 years ago

I did not provide any details for the below one "openhab" : { "server" : "", "port" : "" }

then I am getting the below

pi@sandeep-pi ~/garage-door-controller $ python controller.py Unhandled error in Deferred: Unhandled Error Traceback (most recent call last): File "controller.py", line 332, in controller.run() File "controller.py", line 195, in run task.LoopingCall(self.status_check).start(0.5) File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 173, in start self() File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 218, in call d = defer.maybeDeferred(self.f, _self.a, _self.kw) --- --- File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 139, in maybeDeferred result = f(_args, _kw) File "controller.py", line 116, in status_check self.update_openhab(door.openhab_name, new_state) File "controller.py", line 175, in update_openhab conn = httplib.HTTPConnection("%s:%s" % (config['server'], config['port'])) File "/usr/lib/python2.7/httplib.py", line 712, in init (self.host, self.port) = self._get_hostport(host, port) File "/usr/lib/python2.7/httplib.py", line 754, in _get_hostport raise InvalidURL("nonnumeric port: '%s'" % host[i+1:]) httplib.InvalidURL: nonnumeric port: '' Traceback (most recent call last): File "controller.py", line 332, in controller.run() File "controller.py", line 212, in run reactor.listenTCP(self.config['site']['port'], site) # @UndefinedVariable File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 495, in listenTCP p.startListening() File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 979, in startListening raise CannotListenError(self.interface, self.port, le) twisted.internet.error.CannotListenError: Couldn't listen on any:8002: [Errno 98] Address already in use.

sandeepbv commented 8 years ago

I tried changing the port to different ones but none of them are working.

my config files are here are /etc/webiopi/config [GPIO]

Initialize following GPIOs with given function and optional value

This is used during WebIOPi start process

21 = IN

23 = OUT 0

24 = OUT 0

26 = OUT 1

7 = OUT 0 8 = OUT 0

[HTTP]

HTTP Server configuration

enabled = true port = 8081

/home/pi/garage-door-controller/config.json "openhab" : { "server" : "", "port" : "" }, "site" : { "port":7001, "username":"xxxxx", "password":"xxxxx" }, "doors" : { "left" : { "name" : "LEFT", "relay_pin" : 24, "state_pin" : 17, "approx_time_to_close" : 10, "approx_time_to_open" : 13, "openhab_name" : "g_door_left" }, "right" : { "name" : "RIGHT", "relay_pin" : 26, "state_pin" : 27, "approx_time_to_close" : 10, "approx_time_to_open" : 13, "openhab_name" : "g_door_right" } } }

loflo commented 7 years ago

What was the fix for the issue from the first post?

andrewshilliday commented 7 years ago

My suspicion is that your config file is not valid json. Can you post the raw config file?

zackoch commented 7 years ago

Seems to be the result of forgetting quotes in the JSON file.

Poncherelly commented 6 years ago
I reinstalled from scratch and have the site working ...
andrewshilliday commented 6 years ago

Three is the config.json file that should be changed to your needs. What is the issue you're having?