Closed chris1howell closed 2 years ago
IMHO, this info should be handled by the WiFi module. The EVSEs aren't involved in OCPP at all. You should just use the MAC address as the serial number.
OCPP requires the serial number for the station, connector and energy meter.
The energy meter is physically built into the controller and should have a serial number even if there is no WiFi or OCPP. It does not make sense to store this number on WiFi when the hardware is physically on the controller.
The connector serial number should also be burned to the controller, again the charge connector is physically part of the controller should have a serial number even if there is no WiFi or OCPP.
The chassis serial number is arbitrary and can be store wherever. But every station chassis should have a serial number even if it does not have WiFi.
On Sat, Oct 2, 2021, 7:42 PM lincomatic @.***> wrote:
IMHO, this info should be handled by the WiFi module. The EVSEs aren't involved in OCPP at all. You should just use the MAC address as the serial number.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lincomatic/open_evse/issues/143#issuecomment-932834633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5QH52VDQVWHWWAUF7QU3UE6KFXANCNFSM5ET6YMQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
FYI, the ATMEGA 328 may has a unique ID we can use: https://www.thethingsnetwork.org/forum/t/arduino-has-a-unique-id/21415
FYI, the ATMEGA 328 may has a unique ID we can use: https://www.thethingsnetwork.org/forum/t/arduino-has-a-unique-id/21415
I looked into this... interesting idea. The first 6 bytes are ASCII, followed by 4 hex bytes. It's guaranteed to be unique only in the 328PB, but some people are using it, anyway. In the 328P, the first of the hex bytes is always FF
There's a library for this: https://github.com/ricaun/ArduinoUniqueID Maybe you guys could try running it on a bunch of boards and see if it looks unique enough to use?
Will give it a go on the boards I have, but that being said I believe the primary focus of this is new boards so I would assume we can build these with the 328PB @chris1howell ?
The PB is functionally identical. The pinouts are almost identical, but therre's a pin or two that need to be strapped. Also, you need to either get a newer copy of avrdude, or modify the config to work w/ its chip id, which is different. the PB is generally cheaper, BTW. I'll upload code in a bit.. implemented a $GI command to get the ID
In #144 I have a config that builds with the latest Arduino will see which avrdude is used.
Gave this a try $GI
gives $NK^21
, think you have it as $SI
by mistake and also the command is echoed back so passing $SI
gives $OK $SI Y91017FF14011C^0F
, but on the positive side I do indeed get different different codes on the different devices, Y57414FF020F0C
and Y91017FF14011C
Oops, sorry about that. I just pushed a fix that changed it from $SI to $GI. Glad that it's giving different values on different boards. I guess the question is how unique they really are. Anyway, let's just try using this for now.
Sorry, I just noticed that the response is echoing the command in your examples above.. it shouldn't be responding $OK $GI. I just pushed a fix for that: https://github.com/lincomatic/open_evse/commit/a5db0a49464ea0c155821f1f362bea90a6be80c5 My apologies, I don't have a hardware setup with me at the moment to test the code, so I was pushing untested commits.
RAPI command to SET and GET Serial Numbers required by OCPP.
station chassis connector meter
Proposed format SET command write once only if EEPROM serial numbers are blank. EEPROM could also be written directly with programmer. $SS station connector meter
GET $GS $OK station connector meter