Skip to content

Conversation

andjelx
Copy link

@andjelx andjelx commented Sep 24, 2025

Fixes the following

  1. On my Macbook the BPM address is returned in different format - remove Mac Address verification
[2025-09-24 10:11:29] [I] Press Ctrl+C to stop scanning
[2025-09-24 10:11:30] [I] + 1BA087DC-8B9C-C629-4499-2A79524769F4 BLEsmart_0000026428FFB2CFDAED feff1ba087dc-8b9c-c629-4499-2a79524769f4 -48
  1. Fix dates format for Garmin connect (maybe related to PL region)
ValueError: enddate must be in format 'YYYY-MM-DD', got: 2025-09-24T23:59:59
ValueError: startdate must be in format 'YYYY-MM-DD', got: 2025-09-17T00:00:00

@andjelx andjelx changed the title Fix Dates / Bluetooh MAC / dir creation Fix Dates / Bluetooh MAC Sep 24, 2025
@andjelx
Copy link
Author

andjelx commented Sep 24, 2025

tag @bugficks

@niccomaz
Copy link

niccomaz commented Oct 2, 2025

goodmorning, i've a problem with syncronization after connected to Omron. (it seem a problem with date). I'm from country IT italy. these are the logs

invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1246, in
invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 814, in
invoke
return callback(*args, **kwargs)
File "/omramin/omramin.py", line 936, in sync_device
omron_sync_device_to_garmin(oc, gc, ocDev, startLocal, endLocal, opts=opts)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omramin/omramin.py", line 435, in omron_sync_device_to_garmin
gcData = garmin_get_weighins(gc, startdateStr, enddateStr)
File "/omramin/omramin.py", line 551, in garmin_get_weighins
gcData = gc.get_weigh_ins(startdate=startdate, enddate=enddate)
File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", l
ine 761, in get_weigh_ins
startdate = _validate_date_format(startdate, "startdate")
File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", l
ine 40, in _validate_date_format
raise ValueError(
f"{param_name} must be in format 'YYYY-MM-DD', got: {date_str}"
)
ValueError: startdate must be in format 'YYYY-MM-DD', got: 2025-09-17T00:00:00

what can i do ?

@andreyzhelnin-st
Copy link

goodmorning, i've a problem with syncronization after connected to Omron. (it seem a problem with date). I'm from country IT italy. these are the logs

invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))                      

                       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^                       

File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1246, in

invoke

return ctx.invoke(self.callback, **ctx.params)                               

       ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                               

File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 814, in

invoke

return callback(*args, **kwargs)                                             

File "/omramin/omramin.py", line 936, in sync_device

omron_sync_device_to_garmin(oc, gc, ocDev, startLocal, endLocal, opts=opts)  

~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  

File "/omramin/omramin.py", line 435, in omron_sync_device_to_garmin

gcData = garmin_get_weighins(gc, startdateStr, enddateStr)                   

File "/omramin/omramin.py", line 551, in garmin_get_weighins

gcData = gc.get_weigh_ins(startdate=startdate, enddate=enddate)              

File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", l

ine 761, in get_weigh_ins

startdate = _validate_date_format(startdate, "startdate")                    

File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", l

ine 40, in _validate_date_format

raise ValueError(                                                            

    f"{param_name} must be in format 'YYYY-MM-DD', got: {date_str}"          

)                                                                            

ValueError: startdate must be in format 'YYYY-MM-DD', got: 2025-09-17T00:00:00

what can i do ?

apply my patch and try?

@niccomaz
Copy link

niccomaz commented Oct 2, 2025

goodmorning, i've a problem with syncronization after connected to Omron. (it seem a problem with date). I'm from country IT italy. these are the logs
invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))                      

                       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^                       

File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1246, in
invoke

return ctx.invoke(self.callback, **ctx.params)                               

       ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                               

File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 814, in
invoke

return callback(*args, **kwargs)                                             

File "/omramin/omramin.py", line 936, in sync_device

omron_sync_device_to_garmin(oc, gc, ocDev, startLocal, endLocal, opts=opts)  

~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  

File "/omramin/omramin.py", line 435, in omron_sync_device_to_garmin

gcData = garmin_get_weighins(gc, startdateStr, enddateStr)                   

File "/omramin/omramin.py", line 551, in garmin_get_weighins

gcData = gc.get_weigh_ins(startdate=startdate, enddate=enddate)              

File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", l
ine 761, in get_weigh_ins

startdate = _validate_date_format(startdate, "startdate")                    

File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", l
ine 40, in _validate_date_format

raise ValueError(                                                            

    f"{param_name} must be in format 'YYYY-MM-DD', got: {date_str}"          

)                                                                            

ValueError: startdate must be in format 'YYYY-MM-DD', got: 2025-09-17T00:00:00
what can i do ?

apply my patch and try?

i've already tryed to add line 529, 530, 534 that i found in code review of omramin.py , but i recieve the same error. it seem i don't make mistakes

@andreyzhelnin-st
Copy link

@niccomaz try from my repo ? https://github.com/andjelx/omramin

@niccomaz
Copy link

niccomaz commented Oct 3, 2025

@niccomaz try from my repo ? https://github.com/andjelx/omramin

I download only the omramin.py file, but I receive this error:

Traceback (most recent call last):
File "/omramin/.venv/bin/omramin", line 5, in
from omramin import cli
File "/omramin/omramin.py", line 120
<title>omramin/omramin.py at master · andjelx/omramin · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)

so, i mark# the line, and then i recieve this error:

Traceback (most recent call last):
File "/omramin/.venv/bin/omramin", line 5, in
from omramin import cli
File "/omramin/omramin.py", line 7

^
SyntaxError: invalid syntax

@andjelx
Copy link
Author

andjelx commented Oct 3, 2025

SyntaxError: invalid character '·' (U+00B7)

@niccomaz can this be related?
xNul/palworld-host-save-fix#13 (comment)

This is raw file to be downloaded: https://raw.githubusercontent.com/andjelx/omramin/refs/heads/master/omramin.py

@niccomaz
Copy link

niccomaz commented Oct 3, 2025

SyntaxError: invalid character '·' (U+00B7)

@niccomaz can this be related? xNul/palworld-host-save-fix#13 (comment)

This is raw file to be downloaded: https://raw.githubusercontent.com/andjelx/omramin/refs/heads/master/omramin.py

same date problem also with the new raw file

[2025-10-03 06:27:07] [I] Downloaded 4 entries from 'OMRON connect' for 'Bilancia Omron'
Traceback (most recent call last):
File "/omramin/.venv/bin/omramin", line 8, in
sys.exit(cli())
~~~^^
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1462, in call
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1383, in main
rv = self.invoke(ctx)
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1850, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 1246, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omramin/.venv/lib/python3.13/site-packages/click/core.py", line 814, in invoke
return callback(*args, **kwargs)
File "/omramin/omramin.py", line 937, in sync_device
omron_sync_device_to_garmin(oc, gc, ocDev, startLocal, endLocal, opts=opts)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/omramin/omramin.py", line 434, in omron_sync_device_to_garmin
gcData = garmin_get_weighins(gc, startdateStr, enddateStr)
File "/omramin/omramin.py", line 552, in garmin_get_weighins
gcData = gc.get_weigh_ins(startdate=startdate, enddate=enddate)
File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", line 761, in get_weigh_ins
startdate = _validate_date_format(startdate, "startdate")
File "/omramin/.venv/lib/python3.13/site-packages/garminconnect/init.py", line 40, in _validate_date_format
raise ValueError(
f"{param_name} must be in format 'YYYY-MM-DD', got: {date_str}"
)
ValueError: startdate must be in format 'YYYY-MM-DD', got: 2025-10-01T00:00:00

@niccomaz
Copy link

niccomaz commented Oct 5, 2025

Good morning, any other suggest?
I retry to install the software in three new virtual machine , and also use different Garmin and omron account. I recieve always the same date error

@niccomaz
Copy link

niccomaz commented Oct 6, 2025

i fix the problem.
you should also correct the line 553 (get weight) , with the new variables.

this is the line correct:
gcData = gc.get_weigh_ins(startdate=patch_date(startdate), enddate=patch_date(enddate))

byeee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants