gitibeyonde / openevse-ocpp

[WIP] OCPP 1.5J Implementation for OpenEVSE
4 stars 2 forks source link

Cannot connect via serial #4

Closed kernelkraut closed 4 years ago

kernelkraut commented 5 years ago

I am unable to connect to the serial port using capability=OPENEVSE variable in system.properties

ocpp.py runs fine but the error relates to openevse.py:

INFO:root:created= openevse.SerialOpenEVSE() Unhandled exception in thread started by <function on_open..checkOpenEvse at 0x75aafa50> Traceback (most recent call last): File "ocpp.py", line 184, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/opt/evdevice/openevse/openevse.py", line 709, in init self.s = serial.Serial(port='/dev/serial0', baudrate=115200, timeout=STANDARD_SERIAL_TIMEOUT) AttributeError: module 'serial' has no attribute 'Serial' Exception ignored in: <function SerialOpenEVSE.del at 0x75aaa108> Traceback (most recent call last): File "/opt/evdevice/openevse/openevse.py", line 728, in del self.s.close() AttributeError: 'SerialOpenEVSE' object has no attribute 's'

gitibeyonde commented 5 years ago

Need to install pyserial: pip install pyserial

gitibeyonde commented 5 years ago

This commit fixes it: commit 170439d1eeaa0ea5a2b4ed44d0593b778b700243 (HEAD -> master, origin/master) Author: Abhinandan Prateek abhi@ibeyonde.com Date: Mon Aug 12 12:37:41 2019 +0530

Cannot connect via serial #4: Incorrect version of serial package is
included in the prerequisite(base.sh). This is corrected to the right
package pyserial.
kernelkraut commented 5 years ago

This commit fixes it: commit 170439d (HEAD -> master, origin/master) Author: Abhinandan Prateek abhi@ibeyonde.com Date: Mon Aug 12 12:37:41 2019 +0530

Cannot connect via serial #4: Incorrect version of serial package is
included in the prerequisite(base.sh). This is corrected to the right
package pyserial.

Busy starting a new git glone to test setup from clean pi.

kernelkraut commented 5 years ago

Thanks - Looks like serial comms are now working. I can see I'm now getting a $NK (Not OK) response. I'm now getting the error below:

Line= $NK 809 response $NK 810 response_match None Unhandled exception in thread started by <function on_open..checkOpenEvse at 0x75dedae0> Traceback (most recent call last): File "/root/evdevice/openevse/openevse.py", line 721, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError

gitibeyonde commented 5 years ago

Can you try once by using python 2 ? I noticed you are using python 3. You will have to change SSL.casefold() to SSL.lower() for python 2. Python 3 will require encoding to be explicitly mentioned while serializing string like objects.

kernelkraut commented 5 years ago

Isn't python-openevse written for python3? Forgive me where I ask stupid questions :)

Changed SSL.Casefold to SSL.lower and also changed _thread to thread (for 2.7) - Now I get the following when i run with python2:

Traceback (most recent call last): File "ocpp.py", line 212, in on_open _thread.start_new_thread(processAuthCommand, ()) NameError: global name '_thread' is not defined INFO:root:on_error: Error received Traceback (most recent call last): File "ocpp.py", line 265, in main ws.run_forever() File "/usr/local/lib/python2.7/dist-packages/websocket/_app.py", line 258, in run_forever self._callback(self.on_open) File "/usr/local/lib/python2.7/dist-packages/websocket/_app.py", line 345, in _callback callback(self, *args) File "ocpp.py", line 216, in on_open sys.exit() SystemExit

kernelkraut commented 5 years ago

Isn't python-openevse written for python3? Forgive me where I ask stupid questions :)

Changed SSL.Casefold to SSL.lower and also changed _thread to thread (for 2.7) - Now I get the following when i run with python2:

Traceback (most recent call last): File "ocpp.py", line 212, in on_open _thread.start_new_thread(processAuthCommand, ()) NameError: global name '_thread' is not defined INFO:root:on_error: Error received Traceback (most recent call last): File "ocpp.py", line 265, in main ws.run_forever() File "/usr/local/lib/python2.7/dist-packages/websocket/_app.py", line 258, in run_forever self._callback(self.on_open) File "/usr/local/lib/python2.7/dist-packages/websocket/_app.py", line 345, in _callback callback(self, *args) File "ocpp.py", line 216, in on_open sys.exit() SystemExit

Ok, i edited the ocpp.py references to _thread and edited them to thread.****

Now I see comms but I'm still getting $NK (running with python2)

('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) INFO:root:on_message=[3,"3396292f-5867-4b7a-8dfd-fdbfd160629a",{"status":"Accepted","currentTime":"2019-08-12T12:13:29.591Z","heartbeatInterval":14400}] INFO:root:Received server_resp {'status': 'Accepted', 'heartbeatInterval': 14400, 'currentTime': '2019-08-12T12:13:29.591Z'} Getting value for 3396292f-5867-4b7a-8dfd-fdbfd160629a INFO:root:For server_resp name = BootNotification INFO:root:BootNotification=Accepted INFO:root:HB Interval=14400 INFO:root:on_message=[3,"12fbd5f6-b760-445b-9ecb-7d12bb8400a9",{}] INFO:root:Received server_resp {} Getting value for 12fbd5f6-b760-445b-9ecb-7d12bb8400a9 INFO:root:For server_resp name = StatusNotification INFO:root:StatusNotification received.... INFO:root:on_message=[3,"ea805b3d-12bd-4fb8-9b79-5a6145f8beab",{"currentTime":"2019-08-12T12:13:29.603Z"}] INFO:root:Received server_resp {'currentTime': '2019-08-12T12:13:29.603Z'} Getting value for ea805b3d-12bd-4fb8-9b79-5a6145f8beab INFO:root:For server_resp name = Heartbeat INFO:root:HB received Server time = 2019-08-12 12:13:29.603000+00:00 ('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) Unhandled exception in thread started by <function checkOpenEvse at 0x76068ab0> Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError

gitibeyonde commented 5 years ago

I am using python 2.7 and don’t see those errors. I guess some of your packages were installed using pip3. Can you just install pip packages using pip2(ensure that ver 2 packages are installed). We tested it with python 2 quite some time back. We will port it to python 3, but first lets ensure it works with python 2.

If it is possible for you to port forward 22 for ssh access to your pi, then i can remotely try debugging it.

On 12-Aug-2019, at 5:44 PM, kernelkraut notifications@github.com wrote:

Isn't python-openevse written for python3? Forgive me where I ask stupid questions :)

Changed SSL.Casefold to SSL.lower and also changed _thread to thread (for 2.7) - Now I get the following when i run with python2:

Traceback (most recent call last): File "ocpp.py", line 212, in on_open _thread.start_new_thread(processAuthCommand, ()) NameError: global name '_thread' is not defined INFO:root:on_error: Error received Traceback (most recent call last): File "ocpp.py", line 265, in main ws.run_forever() File "/usr/local/lib/python2.7/dist-packages/websocket/_app.py", line 258, in run_forever self._callback(self.on_open) File "/usr/local/lib/python2.7/dist-packages/websocket/_app.py", line 345, in _callback callback(self, *args) File "ocpp.py", line 216, in on_open sys.exit() SystemExit

Ok, i edited the ocpp.py references to _thread and edited them to thread.****

Now I see comms but still still getting $NK

('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) INFO:root:on_message=[3,"3396292f-5867-4b7a-8dfd-fdbfd160629a",{"status":"Accepted","currentTime":"2019-08-12T12:13:29.591Z","heartbeatInterval":14400}] INFO:root:Received server_resp {'status': 'Accepted', 'heartbeatInterval': 14400, 'currentTime': '2019-08-12T12:13:29.591Z'} Getting value for 3396292f-5867-4b7a-8dfd-fdbfd160629a INFO:root:For server_resp name = BootNotification INFO:root:BootNotification=Accepted INFO:root:HB Interval=14400 INFO:root:on_message=[3,"12fbd5f6-b760-445b-9ecb-7d12bb8400a9",{}] INFO:root:Received server_resp {} Getting value for 12fbd5f6-b760-445b-9ecb-7d12bb8400a9 INFO:root:For server_resp name = StatusNotification INFO:root:StatusNotification received.... INFO:root:on_message=[3,"ea805b3d-12bd-4fb8-9b79-5a6145f8beab",{"currentTime":"2019-08-12T12:13:29.603Z"}] INFO:root:Received server_resp {'currentTime': '2019-08-12T12:13:29.603Z'} Getting value for ea805b3d-12bd-4fb8-9b79-5a6145f8beab INFO:root:For server_resp name = Heartbeat INFO:root:HB received Server time = 2019-08-12 12:13:29.603000+00:00 ('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) Unhandled exception in thread started by <function checkOpenEvse at 0x76068ab0> Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitibeyonde/openevse-ocpp/issues/4?email_source=notifications&email_token=AE2QF3G47PAAD5YDXZUSNELQEFH4BA5CNFSM4IK6DCHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4CK3OQ#issuecomment-520400314, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2QF3BHXPURZOGLUMWR2GLQEFH4BANCNFSM4IK6DCHA.

kernelkraut commented 5 years ago

I am using python 2.7 and don’t see those errors. I guess some of your packages were installed using pip3. Can you just install pip packages using pip2(ensure that ver 2 packages are installed). We tested it with python 2 quite some time back. We will port it to python 3, but first lets ensure it works with python 2. If it is possible for you to port forward 22 for ssh access to your pi, then i can remotely try debugging it.

Ok, I have tried a clean install - and followed the steps below:

  1. Clone repo
  2. Run base.sh (which re-installs python3)
  3. Edited config files (Set to real serial (not emulator), changed _thread to thread in ocpp.py and changed casefold to lower in ocpp.py)
  4. Run with python (not python3)

Unfortunately I'm still getting the error below - It's getting a response but based on the response, the command being issued is incorrect.

INFO:root:HB received Server time = 2019-08-12 12:33:57.377000+00:00 ('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) Unhandled exception in thread started by <function checkOpenEvse at 0x75f809f0> Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError send: b'\x8a\x80\x94\xf15\x8b' DEBUG:websocket:send: b'\x8a\x80\x94\xf15\x8b'

gitibeyonde commented 5 years ago

It is erring out as it is expecting '$ST’ as response [line 816] we can add condition that if it is “$NK” then we flag and error and not try to read response again. Btw why are you getting $NK, isn’t it an error ?

On 12-Aug-2019, at 6:13 PM, kernelkraut notifications@github.com wrote:

I am using python 2.7 and don’t see those errors. I guess some of your packages were installed using pip3. Can you just install pip packages using pip2(ensure that ver 2 packages are installed). We tested it with python 2 quite some time back. We will port it to python 3, but first lets ensure it works with python 2. If it is possible for you to port forward 22 for ssh access to your pi, then i can remotely try debugging it.

Ok, I have tried a clean install - and followed the steps below:

Clone repo Run base.sh (which re-installs python3) Edited config files (Set to real serial (not emulator), changed _thread to thread in ocpp.py and changed casefold to lower in ocpp.py) Run with python (not python3) Unfortunately I'm still getting the error below - It's getting a response but based on the response, the command being issued is incorrect.

INFO:root:HB received Server time = 2019-08-12 12:33:57.377000+00:00 ('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) Unhandled exception in thread started by <function checkOpenEvse at 0x75f809f0> Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError send: b'\x8a\x80\x94\xf15\x8b' DEBUG:websocket:send: b'\x8a\x80\x94\xf15\x8b'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitibeyonde/openevse-ocpp/issues/4?email_source=notifications&email_token=AE2QF3C576C346KW62XVUEDQEFLFXA5CNFSM4IK6DCHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4CNBRY#issuecomment-520409287, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2QF3CBT7OQIL3QVDW46CTQEFLFXANCNFSM4IK6DCHA.

kernelkraut commented 5 years ago

It is erring out as it is expecting '$ST’ as response [line 816] we can add condition that if it is “$NK” then we flag and error and not try to read response again. Btw why are you getting $NK, isn’t it an error ?

Yeah, $NK means "Not OK" - I'm not sure why it's getting that. If I run the read.py and test.py it works and I get a $ST 01 response... Also screen works and I can read and write all the RAPI commands.

I am not near the test equipment today so I will test again tomorrow and perhaps we can work on the unit together?

gitibeyonde commented 5 years ago

Yes, I am ok to get the opneevse code upto date and make it python 3 compatible. It will be convenient if you can give me secure ssh access.

On 13-Aug-2019, at 9:47 AM, kernelkraut notifications@github.com wrote:

It is erring out as it is expecting '$ST’ as response [line 816] we can add condition that if it is “$NK” then we flag and error and not try to read response again. Btw why are you getting $NK, isn’t it an error ?

Yeah, $NK means "Not OK" - I'm not sure why it's getting that. If I run the read.py and test.py it works and I get a $ST 01 response... Also screen works and I can read and write all the RAPI commands.

I am not near the test equipment today so I will test again tomorrow and perhaps we can work on the unit together?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitibeyonde/openevse-ocpp/issues/4?email_source=notifications&email_token=AE2QF3C5K6CNTIZ2ZVPZ3ULQEIYXPA5CNFSM4IK6DCHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4EPXJY#issuecomment-520682407, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2QF3EYSREXYNDGY4IGFDLQEIYXPANCNFSM4IK6DCHA.

kernelkraut commented 5 years ago

Yes, I am ok to get the opneevse code upto date and make it python 3 compatible. It will be convenient if you can give me secure ssh access.

Sorry for the delay, I haven't had much time the last few days. I have some time available tomorrow. I can arrange access - please let me know what time is ok for you?

gitibeyonde commented 5 years ago

I am bit busy today. I am planning to do my own debugging this weekend. Hopefully the issue will be nailed. If not then lets plan to colloborate early next week.

On 15-Aug-2019, at 7:52 PM, kernelkraut notifications@github.com wrote:

Yes, I am ok to get the opneevse code upto date and make it python 3 compatible. It will be convenient if you can give me secure ssh access.

Sorry for the delay, I haven't had much time the last few days. I have some time available tomorrow. I can arrange access - please let me know what time is ok for you?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitibeyonde/openevse-ocpp/issues/4?email_source=notifications&email_token=AE2QF3BELUAH2GRDFQWSD73QEVRAZA5CNFSM4IK6DCHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4L6FBI#issuecomment-521659013, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2QF3B4QR5OMGFHVSRIWN3QEVRAZANCNFSM4IK6DCHA.

kernelkraut commented 5 years ago

Ok great. In the meantime I have done some more digging:

If I run ocpp.py it fails with the error below (Which indicates that the serial read is showing $NK)

('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) Unhandled exception in thread started by <function checkOpenEvse at 0x7625ecf0> Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError

So I then opened up another session and ran some tests. If I run write.py I can issue any rapi command then using read.py on anohter session I can see that the correct response is coming through on serial:

image image

So, while I have read.py open, I start up a new ocpp.py and this is what I see as a response on read.py:

image

Now, i'm trying to find out what the initial command is which is being sent on initialize? Do you know on which line the initial send is?

gitibeyonde commented 5 years ago

ok, i think the issue is that the ocpp is continuously polling openevse for status and initially openevse reponds with not ok. Here is the code:

Line 179: def checkOpenEvse(): .. .. Line 187: …. status = openevse_serial.get_status_change()

I will comment line 187 and check if we still get $NK. ($NK [optional parameters]\r - failure)

If not then openevse is responding with $NK when asked for status.

If above analysis is true, then we should be able to handle $NK.

On 16-Aug-2019, at 1:25 PM, kernelkraut notifications@github.com wrote:

Ok great. In the meantime I have done some more digging:

If I run ocpp.py it fails with the error below (Which indicates that the serial read is showing $NK)

('Line=', u'$NK \r') ('809 response', u'$NK \r') ('810 response_match', None) Unhandled exception in thread started by <function checkOpenEvse at 0x7625ecf0> Traceback (most recent call last): File "ocpp.py", line 183, in checkOpenEvse openevse_serial = openevse.SerialOpenEVSE() File "/root/evdevice/openevse/openevse.py", line 723, in init self.echo(False) File "/root/evdevice/openevse/openevse.py", line 407, in echo if self._request('FF', 'E', '1' if enabled else '0')[0]: File "/root/evdevice/openevse/openevse.py", line 839, in _request return self._get_response() File "/root/evdevice/openevse/openevse.py", line 822, in _get_response return self._get_response() File "/root/evdevice/openevse/openevse.py", line 809, in _get_response response = self._read_line() File "/root/evdevice/openevse/openevse.py", line 790, in _read_line raise EvseTimeoutError openevse.EvseTimeoutError

So I then opened up another session and ran some tests. If I run write.py I can issue any rapi command then using read.py on anohter session I can see that the correct response is coming through on serial:

https://user-images.githubusercontent.com/23164186/63152251-aeb85500-c00b-11e9-8595-3188a4ebe4d5.png https://user-images.githubusercontent.com/23164186/63152265-b7109000-c00b-11e9-9805-800c0c57baf8.png So, while I have read.py open, I start up a new ocpp.py and this is what I see as a response on read.py:

https://user-images.githubusercontent.com/23164186/63152341-df988a00-c00b-11e9-9d43-b1716d0b88bb.png Now, i'm trying to find out what the initial command is which is being sent on initialize? Do you know on which line the initial send is?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gitibeyonde/openevse-ocpp/issues/4?email_source=notifications&email_token=AE2QF3DKIS6UW23IC2G2CETQEZMQPA5CNFSM4IK6DCHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4N6N2A#issuecomment-521922280, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2QF3D5TCJBQRZOBUWGKELQEZMQPANCNFSM4IK6DCHA.

kernelkraut commented 5 years ago

I haven't had much time the last few weeks - so I got an opportunity now to continue. I upgraded the firmware with a USBAsp and no I see checksum in responses. I will continue to test again and revert back to you.

image

kernelkraut commented 5 years ago

Ok, so the ocpp.py now works and is seeing the checksums:

image

But if I change the status (on the unit by using the button) I see the following error:

image

Also, the tasks from SteVe are coming through, but nothing happens:

image

gitibeyonde commented 5 years ago

The returned status is not as per specs and that is why it fails the parsing. Will you elaborate a bit more on what the status change is?

On ChangeAvailability: Have added an implementation for this.. will submit a pull request.

kernelkraut commented 5 years ago

The status change is as follows:

If you push the button on the openEVSE it changes to "Sleep" mode ($FS) and if you push it again it sends "Enable" mode ($FE)

gitibeyonde commented 5 years ago

Ok, so the ocpp.py now works and is seeing the checksums:

image

But if I change the status (on the unit by using the button) I see the following error:

image

Also, the tasks from SteVe are coming through, but nothing happens:

image

The status is represented as hex. So when emulator sends then it appears as a proper hex number 0xff ('Line=', u'$OK 0xff^48\r') While OpenEVSE seems to be sending "$ST fe^00" and python fails to recognize that as a hex number. That requires fixing openevse.py. Will fix that in next pull request.

gitibeyonde commented 5 years ago

@kernelkraut I am closing this issue as it is addressed and fixes merged in master. Please, open a new ticket for further observations.

kernelkraut commented 4 years ago

@gitibeyonde My apologies, I have not had any time in the past few months to continue testing. I've installed on a clean pi and will report back any issues in a new issue if necessary.