Giter Club home page Giter Club logo

Comments (25)

dingo35 avatar dingo35 commented on August 17, 2024 2

Well you guys you should have told that earlier about my pinpas, now I spilled 5 bucks on a couple of rewritable NFC's... :-)

(Of course I had tried it but the NXP app on my phone said "unformatted"; luckily the RFID reader from Stegen is not so picky!!)

This version publishes RFIDLastRead on homeassistant and has the : removed:
182cf36892.zip

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024 1

Check nice one. I also put some RFID related FR here #13
The RFID address is read in OneWire.cpp and stored in the char RFID. So I guess it should be able to post that char to mqtt if the rfid is a match.

unsigned char RFID[8] = {0, 0, 0, 0, 0, 0, 0, 0};

void CheckRFID(void) {
    unsigned char x;
    // When RFID is enabled, a OneWire RFID reader is expected on the SW input
    uint8_t RFIDReader = getItemValue(MENU_RFIDREADER);
    if (RFIDReader) {                                        // RFID Reader set to Enabled, Learn or Delete
        if (OneWireReadCardId() ) {                                             // Read card ID
            switch (RFIDReader) {
                case 1:                                                         // EnableAll. All learned cards accepted for locking /unlocking
                    x = MatchRFID();
                    if (x && !RFIDstatus) {
                        _LOG_A("RFID card found!\n");

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024 1

Test this alfpha 3.5.1 version:
2b608a6869b.zip

It should publish:
SmartEVSE-6498/RFIDLastRead 01:01:02:03:04:05:06:F0 on MQTT and [evse][rfid_lastread] on the REST API.

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024 1

@fluppie please take note: in the final version I will strip the first byte ("family code") and last byte ("checksum"), since the standards define they do not belong to the RFID id....

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

To sharpen my request a bit: it would already be helpful if the sensor shows "last RFID tag scanned" (because the new value will have a timestamp in home assistant anyways) if it proves to be too hard to make sure the RFID tag is indeed the one that initiated charging (after all, we can initiate charging in other ways too)

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

for (x=1 ; x<7 ; x++) _LOG_A("%02x",RFID[x]);

When opening putty and to a telnet to the module you can see this:
(OneWireReadCardId)(C0) 94(OneWireReadCardId)(C0) 8a(OneWireReadCardId)(C0) 17(OneWireReadCardId)(C0) c3(OneWireReadCardId)(C0) 00(OneWireReadCardId)(C0) 00(OneWireReadCardId)(C0)

94 8A 17 C3 00 00 but in reality this is 00 00 C3 17 8A 94 for some reason you need to inverse them per 2 bytes to match laser etched number on those RFID tags.

So now there should be a way to convert RFID[x] to a string and then publish this string via MQTT and or HTTP, show in the webinterface?

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

@dingo35 do you think it's possible to log the tag ID to MQTT / HTTP from the for loop above?

Alfen charging equipement is reporting the above tag as 948A17C3 in their transactions list.

afbeelding

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

Nice! That posts 01:94:8A:17:C3:00:00:2F for the 948A17C3 tag.
Is the 01 a start bit? and 2F the checksum?

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024

That first byte is called "family mode" , not sure what it is used for. Last byte is checksum.

I thought export it all and see what the community does with it....

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

Yes this is a nice start. Thanks for this! Did you need to add a lot of code?

FYI for those curious out there how a charging session starts and stops with a backoffice connection :)

afbeelding

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024

So did you bridge SmartEVSE to an OCPP solution? What tools/code did you use?

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

No, this is a screenshot from the Alfen ACE installer software. So we can have an idea if one day we are going the ocpp route :-).

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

Indeed that's ok. I think it's good to see how parties like Alfen handle this, in public spaces you see them a lot.

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

BTW if possible also remove the : between bytes so we do not need to parse it. I think for OCPP it's a must the : are not there.
From the past I also remember something with big and little endian. I think in combination with Wallbox chargers.

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

@hmmbob did you see the test version? https://github.com/dingo35/SmartEVSE-3.5/files/14970553/2b608a6869b.zip
Does it also work for you?
@dingo35 will this feature come to the next release?

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

I did, but I'm away from home so did not have the opportunity to test yet

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

Updated via VPN and asked my wife to swipe: I'm seeing the RFID data in the raw data of the SmartEVSE, but not in the frontend or mqtt. Is that expected?

It's there on MQTT, just not in the discovery payload for HA I guess so no sensor showing up 😉

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024

I havent tested this myself yet, received an RFID reader but still waiting for NFC tags to arrive ....

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

It works, it's just missing the MQTT discovery information for HomeAssistant (and still has the 01: .... and checksum).

For testing, your pinpas will also work 😉 💳

(I had a space after the ~~ so the strikethrough did not work in my previous comment)

from smartevse-3.5.

fluppie avatar fluppie commented on August 17, 2024

Jups and I also think an Apple Airtag works. Haven't tried putting the phone in Apple Pay mode, yet.
Indeed you need to manually add the sensor in the yaml. But so far I just tested using MQTT Explorer to see the activity.

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

But so far I just tested using MQTT Explorer to see the activity.

Yeah, when I did the same I saw the info as well. It's there 😃

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

Well you guys you should have told that earlier about my pinpas, now I spilled 5 bucks on a couple of rewritable NFC's... :-)

Well, I just tried & figured it out to see if I could get you going again 😉 Never used it before 😆 And you'll find another use case for those cards, I'm sure!

This version publishes RFIDLastRead on homeassistant and has the : removed: 182cf36892.zip

Works!
image

Were the units changed for the EVMeter as well? Suddenly they are in Wh (and KWh is pretty much the standard in EV land....) Or were they always like this and didn't I notice this before?
image

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024

This was changed long time ago, some users wanted really detailed info and I wanted to avoid floating points...

from smartevse-3.5.

hmmbob avatar hmmbob commented on August 17, 2024

Never noticed 😬 (But, in all honestly, I was using the custom_component for this info and I changed that this morning to fully MQTT). No worries, I'll add a few round(1) to my templates.

from smartevse-3.5.

dingo35 avatar dingo35 commented on August 17, 2024

Done with 60e8035

from smartevse-3.5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.