tgalarneau / bms

JBD BMS and Thornwave bluetooth data monitoring
43 stars 17 forks source link

4 Cell Version - Partially Working #10

Open Vanguard4893 opened 3 years ago

Vanguard4893 commented 3 years ago

I've given the 4 cell version a try, and I'm not getting all the data coming through. Seems I'm just missing the temperature sensor data, and all the c** values are zero.

Happy to provide as much data as needed to fix this issue.

Cheers

tgalarneau commented 3 years ago

I don't have a 4 cell version so never tested this software version. Send me the printout of your data and I can take a look at it to try and fix.

On Tue, Oct 5, 2021 at 6:54 AM Vanguard4893 @.***> wrote:

I've given the 4 cell version a try, and I'm not getting all the data coming through. I've got main pack voltage, and amperage, but there are no individual cell voltages or the temperature sensors.

The script is definitely pulling these values from the BMS, as I can see the data in the terminal, however the keys don't seem to be present in the Influx DB.

Happy to provide as much data as needed to fix this issue.

Cheers

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYLZWJCBN7VKWIKER63UFMUSVANCNFSM5FMEQ6WQ . 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.

-- Tom

Vanguard4893 commented 3 years ago

Hi Tom,

See code snippet below for what the Python script is spitting out.

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cellmin,cellmax,delta bms,3285,3287,2 meter,cellmin,cellmax,delta bms,3285,3287,2 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

I don't have a 4 cell version so never tested this software version. Send me the printout of your data and I can take a look at it to try and fix. On Tue, Oct 5, 2021 at 6:54 AM Vanguard4893 @.***> wrote: I've given the 4 cell version a try, and I'm not getting all the data coming through. I've got main pack voltage, and amperage, but there are no individual cell voltages or the temperature sensors. The script is definitely pulling these values from the BMS, as I can see the data in the terminal, however the keys don't seem to be present in the Influx DB. Happy to provide as much data as needed to fix this issue. Cheers — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#10>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYLZWJCBN7VKWIKER63UFMUSVANCNFSM5FMEQ6WQ . 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. -- Tom

tgalarneau commented 3 years ago

Your data looks okay to me.

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285

meter,cellmin,cellmax,delta bms,3285,3287,2

meter,cellmin,cellmax,delta bms,3285,3287,2

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

But it seems to be listed twice. Are you using the socket or MQTT version ?

On Tue, Oct 5, 2021 at 9:04 AM Vanguard4893 @.***> wrote:

Hi Tom,

See code snippet below for what the Python script is spitting out.

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cellmin,cellmax,delta bms,3285,3287,2 meter,cellmin,cellmax,delta bms,3285,3287,2 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

I don't have a 4 cell version so never tested this software version. Send me the printout of your data and I can take a look at it to try and fix. … <#m-894507604634307647> On Tue, Oct 5, 2021 at 6:54 AM Vanguard4893 @.***> wrote: I've given the 4 cell version a try, and I'm not getting all the data coming through. I've got main pack voltage, and amperage, but there are no individual cell voltages or the temperature sensors. The script is definitely pulling these values from the BMS, as I can see the data in the terminal, however the keys don't seem to be present in the Influx DB. Happy to provide as much data as needed to fix this issue. Cheers — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#10 https://github.com/tgalarneau/bms/issues/10>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYLZWJCBN7VKWIKER63UFMUSVANCNFSM5FMEQ6WQ . 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 . -- Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934689765, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYKAY7ECJXNOU7JN4BDUFND2ZANCNFSM5FMEQ6WQ . 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.

-- Tom

tgalarneau commented 3 years ago

Your are missing the temp data information. Need to see incoming data. Can you edit the python code and add a new print statement?

On Tue, Oct 5, 2021 at 9:21 AM Tom Galarneau @.***> wrote:

Your data looks okay to me.

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285

meter,cellmin,cellmax,delta bms,3285,3287,2

meter,cellmin,cellmax,delta bms,3285,3287,2

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

But it seems to be listed twice. Are you using the socket or MQTT version ?

On Tue, Oct 5, 2021 at 9:04 AM Vanguard4893 @.***> wrote:

Hi Tom,

See code snippet below for what the Python script is spitting out.

meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cell1,cell2,cell3,cell4 bms,3285,3287,3287,3285 meter,cellmin,cellmax,delta bms,3285,3287,2 meter,cellmin,cellmax,delta bms,3285,3287,2 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,13.14,-1.19,-15.64,271,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0

I don't have a 4 cell version so never tested this software version. Send me the printout of your data and I can take a look at it to try and fix. … <#m_7303052811304807720m-894507604634307647_> On Tue, Oct 5, 2021 at 6:54 AM Vanguard4893 @.***> wrote: I've given the 4 cell version a try, and I'm not getting all the data coming through. I've got main pack voltage, and amperage, but there are no individual cell voltages or the temperature sensors. The script is definitely pulling these values from the BMS, as I can see the data in the terminal, however the keys don't seem to be present in the Influx DB. Happy to provide as much data as needed to fix this issue. Cheers — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#10 https://github.com/tgalarneau/bms/issues/10>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYLZWJCBN7VKWIKER63UFMUSVANCNFSM5FMEQ6WQ . 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 . -- Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934689765, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYKAY7ECJXNOU7JN4BDUFND2ZANCNFSM5FMEQ6WQ . 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.

-- Tom

-- Tom

Vanguard4893 commented 3 years ago

I'm using the socket version, happy to edit the Python script to add some new bits.

tgalarneau commented 3 years ago

In class MyDelegate(DefaultDelegate):

after text_string = hex_data.decode('utf-8') # check incoming data for routing to decoding routines

add print(text_string)

Then run and send me terminal printout

On Tue, Oct 5, 2021 at 9:30 AM Vanguard4893 @.***> wrote:

I'm using the socket version, happy to edit the Python script to add some new bits.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934710814, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYMY7X3SGG5WHAIX6ODUFNG4DANCNFSM5FMEQ6WQ . 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.

-- Tom

Vanguard4893 commented 3 years ago

Data snippet as requested:

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket dd030019050ff73962bb9c4000002b3a00000000 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.47,-290.99,252,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 0000193f0304010b6bfb6f77 dd0400080c8b0cb50cb60ca7fd2b77 meter,cell1,cell2,cell3,cell4 bms,3211,3253,3254,3239 meter,cellmin,cellmax,delta bms,3211,3254,43 dd030019050ff74162b89c4000002b3a00000000 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.39,-289.95,252,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 0000193f0304010b6bfb6a77 dd0400080c8b0cb50cb60ca7fd2b77 meter,cell1,cell2,cell3,cell4 bms,3211,3253,3254,3239 meter,cellmin,cellmax,delta bms,3211,3254,43

In class MyDelegate(DefaultDelegate): after text_string = hex_data.decode('utf-8') # check incoming data for routing to decoding routines add print(text_string) Then run and send me terminal printout On Tue, Oct 5, 2021 at 9:30 AM Vanguard4893 @.***> wrote: I'm using the socket version, happy to edit the Python script to add some new bits. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#10 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYMY7X3SGG5WHAIX6ODUFNG4DANCNFSM5FMEQ6WQ . 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. -- Tom

tgalarneau commented 3 years ago

Change elif text_string.find('77') != -1 and len(text_string) == 28 or len( text_string) == 36: # x03 to elif text_string.find('77') != -1 and len(text_string) == 24 or len( text_string) == 36: # x03 cellinfo2(data)send new output

cellinfo2(data)

On Tue, Oct 5, 2021 at 10:07 AM Vanguard4893 @.***> wrote:

Data snippet as requested:

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket dd030019050ff73962bb9c4000002b3a00000000 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.47,-290.99,252,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 0000193f0304010b6bfb6f77 dd0400080c8b0cb50cb60ca7fd2b77 meter,cell1,cell2,cell3,cell4 bms,3211,3253,3254,3239 meter,cellmin,cellmax,delta bms,3211,3254,43 dd030019050ff74162b89c4000002b3a00000000 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.39,-289.95,252,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 0000193f0304010b6bfb6a77 dd0400080c8b0cb50cb60ca7fd2b77 meter,cell1,cell2,cell3,cell4 bms,3211,3253,3254,3239 meter,cellmin,cellmax,delta bms,3211,3254,43

In class MyDelegate(DefaultDelegate): after text_string = hex_data.decode('utf-8') # check incoming data for routing to decoding routines add print(text_string) Then run and send me terminal printout … <#m-4454918131172045362> On Tue, Oct 5, 2021 at 9:30 AM Vanguard4893 @.***> wrote: I'm using the socket version, happy to edit the Python script to add some new bits. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#10 (comment) https://github.com/tgalarneau/bms/issues/10#issuecomment-934710814>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYMY7X3SGG5WHAIX6ODUFNG4DANCNFSM5FMEQ6WQ . 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 . -- Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934754210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYNVVMWLYMJP7VQCLU3UFNLHTANCNFSM5FMEQ6WQ . 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.

-- Tom

tgalarneau commented 3 years ago

Didn't format correct trying again

In class MyDelegate(DefaultDelegate):

change elif text_string.find('77') != -1 and len(text_string) == 28 or len(text_string) == 36: # x03

to elif text_string.find('77') != -1 and len(text_string) == 24 or len(text_string) == 36: # x03

On Tue, Oct 5, 2021 at 10:19 AM Tom Galarneau @.***> wrote:

Change elif text_string.find('77') != -1 and len(text_string) == 28 or len (text_string) == 36: # x03 to elif text_string.find('77') != -1 and len(text_string) == 24 or len( text_string) == 36: # x03 cellinfo2(data)send new output

cellinfo2(data)

On Tue, Oct 5, 2021 at 10:07 AM Vanguard4893 @.***> wrote:

Data snippet as requested:

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket dd030019050ff73962bb9c4000002b3a00000000 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.47,-290.99,252,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 0000193f0304010b6bfb6f77 dd0400080c8b0cb50cb60ca7fd2b77 meter,cell1,cell2,cell3,cell4 bms,3211,3253,3254,3239 meter,cellmin,cellmax,delta bms,3211,3254,43 dd030019050ff74162b89c4000002b3a00000000 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.39,-289.95,252,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 0000193f0304010b6bfb6a77 dd0400080c8b0cb50cb60ca7fd2b77 meter,cell1,cell2,cell3,cell4 bms,3211,3253,3254,3239 meter,cellmin,cellmax,delta bms,3211,3254,43

In class MyDelegate(DefaultDelegate): after text_string = hex_data.decode('utf-8') # check incoming data for routing to decoding routines add print(text_string) Then run and send me terminal printout … <#m_-1389836327008829289m-4454918131172045362_> On Tue, Oct 5, 2021 at 9:30 AM Vanguard4893 @.***> wrote: I'm using the socket version, happy to edit the Python script to add some new bits. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#10 (comment) https://github.com/tgalarneau/bms/issues/10#issuecomment-934710814>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYMY7X3SGG5WHAIX6ODUFNG4DANCNFSM5FMEQ6WQ . 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 . -- Tom

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934754210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYNVVMWLYMJP7VQCLU3UFNLHTANCNFSM5FMEQ6WQ . 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.

-- Tom

-- Tom

Vanguard4893 commented 3 years ago

That's got it! There's no Temp2 sensor on my BMS, so it thinks it's at over 6000°C. Not a problem as I'm not using that data anyway.

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cellmin,cellmax,delta bms,3213,3255,42 meter,cellmin,cellmax,delta bms,3213,3255,42

Just out of interest, what do the c01, c02 etc values indicate?

tgalarneau commented 3 years ago

okay now is printing out temp and other data correct.

Now

in def cellinfo2(data):

change protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHHB', infodata, i)

to protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHB', infodata, i)

delete temp2 = (temp2-2731)/10

change message = ("meter,protect,percent,fet,cells,temp1,temp2\r\n%s,%0000i,%00i,%00i,%0i,%0.1f,%0.1f" % (meter,protect,percent,fet,cells,temp1,temp2))

to message = ("meter,protect,percent,fet,cells,temp1\r\n%s,%0000i,%00i,%00i,%0i,%0.1f" % (meter,protect,percent,fet,cells,temp1))

print out again

On Tue, Oct 5, 2021 at 10:27 AM Vanguard4893 @.***> wrote:

That's got it!

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cellmin,cellmax,delta bms,3213,3255,42 meter,cellmin,cellmax,delta bms,3213,3255,42

Just out of interest, what do the c01, c02 etc values indicate?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934779146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYIUGYFOZRYHBIYF6Q3UFNNSLANCNFSM5FMEQ6WQ . 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.

-- Tom

Vanguard4893 commented 3 years ago

With those changes I get errors in the script:

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.31,-288.91,245,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,12.95,-22.31,-288.91,245,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 Traceback (most recent call last): File "jbdbms-4-socket-test.py", line 185, in <module> result = bms.writeCharacteristic(0x15,b'\xdd\xa5\x04\x00\xff\xfc\x77',False) # write x04 w/o response cell voltages File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 543, in writeCharacteristic return self._getResp('wr') File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 416, in _getResp self.delegate.handleNotification(hnd, data) File "jbdbms-4-socket-test.py", line 156, in handleNotification cellinfo2(data) File "jbdbms-4-socket-test.py", line 103, in cellinfo2 protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHB', infodata, i) ValueError: not enough values to unpack (expected 9, got 8) Closed socket Exception ignored in: <function Peripheral.__del__ at 0x766208a0> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 630, in __del__ File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 454, in disconnect File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 407, in _getResp File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 375, in _waitResp

tgalarneau commented 3 years ago

c01, c02 etc. show if cells are balancing and show on or off for each cell during charging.

The problem was your 4 cell bms has only 1 temperature probe. I had assumed it had 2 probes. Will change on github.

The vp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf show the protection state for overvoltage etc. Either on or off

On Tue, Oct 5, 2021 at 10:32 AM Tom Galarneau @.***> wrote:

okay now is printing out temp and other data correct.

Now

in def cellinfo2(data):

change protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHHB', infodata, i)

to protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHB', infodata, i)

delete temp2 = (temp2-2731)/10

change message = ("meter,protect,percent,fet,cells,temp1,temp2\r\n%s,%0000i,%00i,%00i,%0i,%0.1f,%0.1f" % (meter,protect,percent,fet,cells,temp1,temp2))

to message = ("meter,protect,percent,fet,cells,temp1\r\n%s,%0000i,%00i,%00i,%0i,%0.1f" % (meter,protect,percent,fet,cells,temp1))

print out again

On Tue, Oct 5, 2021 at 10:27 AM Vanguard4893 @.***> wrote:

That's got it!

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cellmin,cellmax,delta bms,3213,3255,42 meter,cellmin,cellmax,delta bms,3213,3255,42

Just out of interest, what do the c01, c02 etc values indicate?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934779146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYIUGYFOZRYHBIYF6Q3UFNNSLANCNFSM5FMEQ6WQ . 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.

-- Tom

-- Tom

Vanguard4893 commented 3 years ago

no worries, thanks for the clarification. I'm not sure if this BMS has a second thermistor input, I'll have to check & report back - it may do, but the connector may be unpopulated.

tgalarneau commented 3 years ago

change protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHB', infodata, i)

to protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHHB', infodata, i)

send output

On Tue, Oct 5, 2021 at 10:48 AM Tom Galarneau @.***> wrote:

c01, c02 etc. show if cells are balancing and show on or off for each cell during charging.

The problem was your 4 cell bms has only 1 temperature probe. I had assumed it had 2 probes. Will change on github.

The vp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf show the protection state for overvoltage etc. Either on or off

On Tue, Oct 5, 2021 at 10:32 AM Tom Galarneau @.***> wrote:

okay now is printing out temp and other data correct.

Now

in def cellinfo2(data):

change protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHHB', infodata, i)

to protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHB', infodata, i)

delete temp2 = (temp2-2731)/10

change message = ("meter,protect,percent,fet,cells,temp1,temp2\r\n%s,%0000i,%00i,%00i,%0i,%0.1f,%0.1f" % (meter,protect,percent,fet,cells,temp1,temp2))

to message = ("meter,protect,percent,fet,cells,temp1\r\n%s,%0000i,%00i,%00i,%0i,%0.1f" % (meter,protect,percent,fet,cells,temp1))

print out again

On Tue, Oct 5, 2021 at 10:27 AM Vanguard4893 @.***> wrote:

That's got it!

attempting to connect connected A4:C1:38:B8:EE:D6 Created socket meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,volts,amps,watts,remain,capacity,cycles bms,12.96,-22.31,-289.14,249,400,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c01,c02,c03,c04,c05,c06,c07,c08 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 bms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf bms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,protect,percent,fet,cells,temp1,temp2 bms,0,62,3,4,19.4,6172.8 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cell1,cell2,cell3,cell4 bms,3213,3255,3255,3241 meter,cellmin,cellmax,delta bms,3213,3255,42 meter,cellmin,cellmax,delta bms,3213,3255,42

Just out of interest, what do the c01, c02 etc values indicate?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934779146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYIUGYFOZRYHBIYF6Q3UFNNSLANCNFSM5FMEQ6WQ . 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.

-- Tom

-- Tom

-- Tom

tgalarneau commented 3 years ago

The data you sent shows 0000 19 3f 03 04 01 0b6b fb6a 77

0000 = protect info (H) 19 = version (B) 3f = percent full (B) 03 = fet (B) 04 = number of cells (B) 01 - number of temp sensors (B) 0b6b = temp1 (H)

fb6b = checksum (H) 77 = end of message (B)

My mistake

in def cellinfo2(data):

change protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHHB', infodata, i)

to protect,vers,percent,fet,cells,sensors,temp1,b77 = struct.unpack_from('>HBBBBBHB', infodata, i)

On Tue, Oct 5, 2021 at 10:57 AM Vanguard4893 @.***> wrote:

no worries, thanks for the clarification. I'm not sure if this BMS has a second thermistor input, I'll have to check & report back - it may do, but the connector may be unpopulated.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-934823121, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYJ2DLR3YOKOU2K4NWTUFNREDANCNFSM5FMEQ6WQ . 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.

-- Tom

Vanguard4893 commented 3 years ago

So I need to make all the changes from a few replies back, but change the first struct.unpack to the one in the last reply?

Cheers

tgalarneau commented 3 years ago

I put a new version of the 4 cell code with all the changes on github. Hopefully it works.

On Wed, Oct 6, 2021 at 7:04 AM Vanguard4893 @.***> wrote:

So I need to make all the changes from a few replies back, but change the first struct.unpack to the one in the last reply?

Cheers

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-936701475, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYIKX7YIBXBYYGAGQSDUFR6QLANCNFSM5FMEQ6WQ . 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.

-- Tom

playersz28 commented 3 years ago

I just tried the jbdbms-4-socket-test.py and I only get the data that is sent out by the cellvolts1 procedure. The other two will print to the SSH window but trying to add the fields in Grafana gives "No Data"

tgalarneau commented 3 years ago

can you send me terminal window data to see what is happening

On Thu, Oct 7, 2021 at 9:34 AM playersz28 @.***> wrote:

I just tried the jbdbms-4-socket-test.py and I only get the data that is sent out by the cellvolts1 procedure. The other two will print to the SSH window but trying to add the fields in Grafana gives "No Data"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-938095075, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYNSHFNU54XBIT3S4LTUFXY37ANCNFSM5FMEQ6WQ . 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.

-- Tom

playersz28 commented 3 years ago

pi@rvserver:~/jbdbms/bms-main $ sudo python3 ./jbdbms-4-socket-test.py -b E0:9F:2A:FD:23:A9 -i 15 -m jbdbms attempting to connect connected E0:9F:2A:FD:23:A9 Created socket dd0400080dd00df00dbb0df3fc5677 b'dd0400080dd00df00dbb0df3fc5677' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3568,3515,3571 meter,cellmin,cellmax,delta jbdbms,3515,3571,56 dd0400080dd00df10dbb0df3fc5577 b'dd0400080dd00df10dbb0df3fc5577' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3569,3515,3571 meter,cellmin,cellmax,delta jbdbms,3515,3571,56 dd0400080dd00df10dbb0df3fc5577 b'dd0400080dd00df10dbb0df3fc5577' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3569,3515,3571 meter,cellmin,cellmax,delta jbdbms,3515,3571,56

I added prints for the raw data. It varies from run to run as to whether I see the dd03 data

playersz28 commented 3 years ago

pi@rvserver:~/jbdbms/bms-main $ sudo python3 ./jbdbms-4-socket-test.py -b E0:9F:2A:FD:23:A9 -i 10 -m jbdbms attempting to connect connected E0:9F:2A:FD:23:A9 Created socket dd0400080dd00df10dbb0df2fc5677 b'dd0400080dd00df10dbb0df2fc5677' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3569,3515,3570 meter,cellmin,cellmax,delta jbdbms,3515,3570,55 dd03001b058b00006cd36d6000012b0600000000 b'dd03001b058b00006cd36d6000012b0600000000' meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.19,0.00,0.00,278,280,1 meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.19,0.00,0.00,278,280,1 000125630204020b550b5cfbbf77 b'000125630204020b550b5cfbbf77' dd0400080dd00df10dbb0df2fc5677 b'dd0400080dd00df10dbb0df2fc5677' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3569,3515,3570 meter,cellmin,cellmax,delta jbdbms,3515,3570,55 dd03001b058a00006cd36d6000012b0600000000 b'dd03001b058a00006cd36d6000012b0600000000' meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.18,0.00,0.00,278,280,1 meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.18,0.00,0.00,278,280,1 000125630204020b560b5cfbbf77 b'000125630204020b560b5cfbbf77' dd0400080dd00df00dbb0df2fc5777 b'dd0400080dd00df00dbb0df2fc5777' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3568,3515,3570 meter,cellmin,cellmax,delta jbdbms,3515,3570,55 dd03001b058a00006cd36d6000012b0600000000 b'dd03001b058a00006cd36d6000012b0600000000' meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.18,0.00,0.00,278,280,1 meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.18,0.00,0.00,278,280,1 000125630204020b560b5cfbbf77 b'000125630204020b560b5cfbbf77' dd0400080dd00df00dbb0df2fc5777 b'dd0400080dd00df00dbb0df2fc5777' meter,cell1,cell2,cell3,cell4 jbdbms,3536,3568,3515,3570 meter,cellmin,cellmax,delta jbdbms,3515,3570,55 dd03001b058a00006cd36d6000012b0600000000 b'dd03001b058a00006cd36d6000012b0600000000' meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.18,0.00,0.00,278,280,1 meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.18,0.00,0.00,278,280,1 000125630204020b560b5cfbbf77 b'000125630204020b560b5cfbbf77' ^CTraceback (most recent call last): File "./jbdbms-4-socket-test.py", line 190, in time.sleep(z) KeyboardInterrupt Closed socket

Ran again and got the dd03 this time. Also changed to "-i 10"

tgalarneau commented 3 years ago

You are not getting temperature data. To find why its not working can you modify the script

In class MyDelegate(DefaultDelegate):

after text_string = hex_data.decode('utf-8') # check incoming data for routing to decoding routines

add print(text_string)

Then run and send me terminal printout

playersz28 commented 3 years ago

That's what I already did to get the two hex strings you see in the data above.

tgalarneau commented 3 years ago

I see you already have the data for this string and it looks like you have 2 temperature sensors

000125630204020b560b5cfbbf77

It looks like my original 2 sensor version would work that I just changed to 1 sensor for the last user.

I will repost this version and you can try.

tgalarneau commented 3 years ago

I have now added a new 2 sensor version try it and let me know.

playersz28 commented 3 years ago

Terminal output shows all 3 data streams.

pi@rvserver:~/jbdbms/bms-main $ sudo python3 ./jbdbms-4-socket-2temps.py -b E0:9F:2A:FD:23:A9 -i 1 -m jbdbms attempting to connect connected E0:9F:2A:FD:23:A9 Created socket meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.16,0.00,0.00,278,280,1 meter,c01,c02,c03,c04,c05,c06,c07,c08 jbdbms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 jbdbms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf jbdbms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 jbdbms,1,99,2,4,17.2,18.0 meter,cell1,cell2,cell3,cell4 jbdbms,3530,3562,3511,3562 meter,cellmin,cellmax,delta jbdbms,3511,3562,51 meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.16,0.00,0.00,278,280,1 meter,c01,c02,c03,c04,c05,c06,c07,c08 jbdbms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 jbdbms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf jbdbms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 jbdbms,1,99,2,4,17.2,18.0 meter,cell1,cell2,cell3,cell4 jbdbms,3531,3563,3511,3562 meter,cellmin,cellmax,delta jbdbms,3511,3563,52 meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.16,0.00,0.00,278,280,1 meter,c01,c02,c03,c04,c05,c06,c07,c08 jbdbms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 jbdbms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf jbdbms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 jbdbms,1,99,2,4,17.2,18.0

I'll uncomment the sends and try again

playersz28 commented 3 years ago

So I turned on the sending of data and all of the messages make it into the db except the one with the volts

Not in db (No Data msg in Grafana) meter,volts,amps,watts,remain,capacity,cycles jbdbms,14.15,0.00,0.00,278,280,1

In db and can see in a Grafana table meter,c01,c02,c03,c04,c05,c06,c07,c08 jbdbms,0,0,0,0,0,0,0,0 meter,c09,c10,c11,c12,c13,c14,c15,c16 jbdbms,0,0,0,0,0,0,0,0 meter,ovp,uvp,bov,buv,cot,cut,dot,dut,coc,duc,sc,ic,cnf jbdbms,0,0,0,0,0,0,0,0,0,0,0,0,0 meter,protect,percent,fet,cells,temp1,temp2 jbdbms,1,99,2,4,17.2,18.0 meter,cell1,cell2,cell3,cell4 jbdbms,3529,3559,3510,3560 meter,cellmin,cellmax,delta jbdbms,3510,3560,50

tgalarneau commented 3 years ago

That's strange. All data is being sent from bms. Need check if reaching socket and telegraf.

playersz28 commented 3 years ago

so I just changed the names of the db fields that get created.

from this->

message = ("meter,volts,amps,watts,remain,capacity,cycles\r\n%s,%0.2f,%0.2f,%0.2f,%0i,%0i,%0i" % (meter,volts,amps,watts,remain,capacity,cycles))

to this-> message = ("meter,voltage,amperes,wattage,remaining,totcapacity,numcycles\r\n%s,%0.2f,%0.2f,%0.2f,%0i,%0i,%0i" % (meter,volts,amps,watts,remain,capacity,cycles))

and after a minute or so of running I can add the new field names to a Grafana panel

playersz28 commented 3 years ago

well, I was getting data filled. Now I don't get the "No Data" error because there is some data but this run the fields are blank

tgalarneau commented 3 years ago

Did you change the grafana data field names to match the bms data names ?

playersz28 commented 3 years ago

Yes, after I had changed the names I was then going to Grafana and changing a panel to that field and with the new names I got data for a bit.

I just dropped and recreated the jbdbms database I'm using for this testing and now I can get the parameters under the original names. Not sure if something was corrupted or what. I'll monitor it for a while and see. I'm running two instances of the service so I'll use the 2temp one now. I don't know if that's the right way to do it but each instance creates a unique meter name so I can see two BMS units on the same dashboard

tgalarneau commented 3 years ago

You have 2 temp sensors so that is the one to use. Running multiple bms is no problem just change the meter names. I combine meters in grafana. These jbdbms have weak bluetooth connections so sometimes service needs restart to re-establish connection.

playersz28 commented 3 years ago

I can connect from in the house with the RV in the driveway (maybe 40' thru walls) using my Pixel 4 but the Pi can barely connect from 15' away.

tgalarneau commented 3 years ago

I had the same problem and needed to add an additional router as an extender to solve.

playersz28 commented 3 years ago

I had the same problem and needed to add an additional router as an extender to solve.

An extender for the BT? Wifi has no problem making the distance and the BTLE connection is good with my phone but the Pi4 doesn't have much range at all for it.

After checking this morning there are a lot of holes in the data where no response was received to put in the db within the 15sec time window. The Pi4 is currently about 6' away from the BMS location. I'll move it right up close but if this is how well BTLE works it won't work as a long term solution

tgalarneau commented 3 years ago

What I did was move the pi close to the bms and also an extender to reach the network. The bms bt signal is too weak on its own. If could replace the bms bt would be better.

On Fri, Oct 8, 2021 at 1:00 AM playersz28 @.***> wrote:

I had the same problem and needed to add an additional router as an extender to solve.

An extender for the BT? Wifi has no problem making the distance and the BTLE connection is good with my phone but the Pi4 doesn't have much range at all for it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgalarneau/bms/issues/10#issuecomment-938549821, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATWKVYK7LRCRWTKD72ETSJDUF3FN5ANCNFSM5FMEQ6WQ . 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.

-- Tom