Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 06 10:54
    cdubz commented #352
  • Dec 06 10:54
    cdubz labeled #352
  • Dec 06 10:54
    cdubz labeled #352
  • Dec 06 10:54
    cdubz labeled #352
  • Dec 06 10:12
    Alberdi opened #352
  • Dec 05 23:56
    cdubz commented #337
  • Dec 05 23:55
    BadCo-NZ commented #337
  • Dec 05 23:53
    BadCo-NZ commented #337
  • Dec 05 23:42
    cdubz commented #337
  • Dec 05 23:35
    BadCo-NZ commented #337
  • Dec 05 19:30
    cdubz pinned #337
  • Dec 05 19:30
    cdubz unpinned #174
  • Dec 05 19:30
    cdubz labeled #337
  • Dec 05 19:30
    cdubz commented #337
  • Dec 05 19:13
    Borlean commented #337
  • Dec 05 14:19
    cdubz commented #337
  • Dec 05 05:35
    meeb commented #337
  • Dec 04 11:54
    cdubz commented #337
  • Dec 04 11:45

    cdubz on v1.9.2

    (compare)

  • Dec 04 11:45

    cdubz on master

    Create v1.9.2 release (compare)

justin
@justin:goette.me
[m]
Hmm. Have you ever had success? You are running via Docker, right?
If Docker, LSIO image?
Drax
@dracula385
I am running Windows Docker. I can see entities from BB in HA normally. Initiating timer, adding feed, adding diaper not working... Adding notes, weight works normally, integration creates a record in BB. I am running LSIO image 1.9.0-ls14
Drax
@dracula385
I have tried a fresh new Home Assistant OS installation. Getting the same "Date/time can not be in the future". error. Just to double confirm my time zone in HA is set up as Europe/London and BB instance user has Europe/London timezone. Wierd
justin
@justin:goette.me
[m]

Weird indeed.

And once more, will you run docker exec -it <container_id> bash -c 'echo $TIME_ZONE'

1 reply
justin
@justin:goette.me
[m]
Erm, not sure that will work with Windows or not
fodi666
@fodi666
I also had that future problem back then, but then I fixed that by adding time: "{{now()}}" to the services that I use to call diaper change, tempretature, weight and notes, resullting in:
- alias: "BabyBuddy Add temperature" service: babybuddy.add_temperature data: entity_id: "sensor.baby_baby" temperature: "{{ states('input_number.baby_temp') }}" time: "{{ now() }}"
1 reply
justin
@justin:goette.me
[m]

Hmmm. I'll have to retest this. The default value sent when empty should be now().

https://github.com/jcgoette/baby_buddy_homeassistant/blob/main/custom_components/babybuddy/sensor.py#L177-L178

justin
@justin:goette.me
[m]
I'm not near a computer, but I wonder what happens if you try backtiming your entries from HA into BB one hour at a time.
Quick and dirty troubleshooting
Also, which version of HA are you on? And how is that setup? Docker, RPi, etc.
Drax
@dracula385

I am running the latest Hass OS Home Assistant 2021.11.1 on Intel NUC.
The error "Could not create changes. error: {'time': ['Date/time can not be in the future.']}" comes from
Source: custom_components/babybuddy/client.py:65.

Creating entries from HA into BB going back one hour at a time works until I get back to after my Local time (London) if that makes sense. "Then I get error Time cannot be in the future." from Source:
custom_components/babybuddy/sensor.py:180

justin
@justin:goette.me
[m]
Drax
@dracula385
Yeah, I get that :). I have just tried to call the add_diaper_change service 1sec after the defined time and that works, entry is passed to BB. Anyway, please see can you try to replicate the issue on your side
justin
@justin:goette.me
[m]

Yup. Just trying to figure out what exactly to test. Tested everything fairly extensively with 2.0 version.

Is your BB and HA both on the NUC?

Drax
@dracula385
No, I am running BB in Docker on a different pc on the same network. I will try from my side to install non-supervised HA in Docker just to try to eliminate the issue is on my HA side...though I did already test on a fresh new HA HassOS installation from different computer
justin
@justin:goette.me
[m]
Ya I don't think that will be the issue
justin
@justin:goette.me
[m]

Can you try this in Template Editor and send what you get?

{{ utcnow().tzinfo }}
{{ now().tzinfo }}
{{ now().astimezone().tzinfo }}

Then
{{ now() }}
{{ now().astimezone() }}
{{ utcnow().astimezone() }}
{{ now().now() }}
{{ now().today() }}
{{ now().utcnow() }}
{{ utcnow() }}
{{ now().tzinfo }}
{{ now().astimezone().tzinfo }}
{{ utcnow().tzinfo }}
Drax
@dracula385

UTC
Europe/London
GMT

2021-11-05 17:27:20.169980+00:00
2021-11-05 17:27:20.170012+00:00
2021-11-05 17:27:20.170105+00:00
2021-11-05 17:27:20.170206
2021-11-05 17:27:20.170267
2021-11-05 17:27:20.170329
2021-11-05 17:27:20.170355+00:00
Europe/London
GMT
UTC

Drax
@dracula385
I have tried to run non-supervised HA docker container on the same docker machine and everything works. Could it be that if the time in HA is slightly in the "future" to trigger this error?
justin
@justin:goette.me
[m]
Possibly. That's why I was trying to check the times in the post above.
Which exact install method works?
Wonder if @fodi666 could try that too?
Drax
@dracula385
It works if I run HA in Docker container on the same machine I am running BB docker container.
justin
@justin:goette.me
[m]
I wonder if any of this looks different from same machine, docker HA?
{{ now() }}
{{ now().astimezone() }}
{{ utcnow().astimezone() }}
{{ now().now() }}
{{ now().today() }}
{{ now().utcnow() }}
{{ utcnow() }}
{{ now().tzinfo }}
{{ now().astimezone().tzinfo }}
{{ utcnow().tzinfo }}
1 reply
fodi666
@fodi666
i have it running in a docker container inside the same vm as my home assistant supervised install but for me adding now fixed it
Drax
@dracula385

I have found a workaround unitl we find solution by taking out one second from the current time passed from HA to BB.

time: "{{ now() - timedelta(hours=0, minutes=0, seconds=5) }}"

putting only now() doesn't work for me

Christopher Charbonneau Wells
@cdubz
Hah crazy. Seems like I just need to update the API to do this defalting (:
2 replies
Drax
@dracula385
Thank you @cdubz because for now, integration still cannot trigger the timer from HA etc...
Drax
@dracula385

Using HA integration for a few days now I have a few suggestions if I may. Sorry if I misunderstood how integration works or if some of the things are not possible to integrate

Last feed entity: I would more like to see the time from the last feed than the amount. By default, the entity shows the feeding amount. I could make a template sensor, take the end time and calculate the time from the last feed that way...but via the integration would be easier and cleaner.
Tummy time entity: for some reason attribute does not have a unit. Now it just shows the number.
Last diaper change: Would be nice to have attribute for this entity to show wet/solid/wet and solid rather than having two attributes showing true/false. This way would be easier to show the state in HA Lovelace.

Anyway, thank you very much for the excellent work on both HA integration and BB itself, my baby dashboard is almost over. I am still planning to set up a Zigbee switch to trigger the actions and complete control over Google Home.

justin
@justin:goette.me
[m]
Would you mind entering individual issues for these on the GH repo?
1 reply
Also, if you are so inclined, PRs are welcome
Christopher Charbonneau Wells
@cdubz
@/all anyone hete able to reproduce this issue? And maybe hell with a fix… (: babybuddy/babybuddy#337
justin
@justin:goette.me
[m]
Yes, reproduced on my docker deploy
Christopher Charbonneau Wells
@cdubz
Yeah so far it seems to be only an issue in Docker. I cant reproduce in the demo or with the local dev server.
justin
@justin:goette.me
[m]
I'll try and take a look tn if I get a chance
Christopher Charbonneau Wells
@cdubz
Also I was actually able to
… test just now and i cant seem to repro even in Docker. Argh.
4 replies
adamaze
@adamaze
We just had our first child a few days ago, and when we got home from the hospital, i was able to get babybuddy up and running in only a few minutes at home, and my wife loves how easy it is to use. I just want to say thanks so much for such a great project @cdubz !!
Christopher Charbonneau Wells
@cdubz
Thanks, @adamaze. Hope all goes well with the little one! Feel free to ask any Qs here or open issues in GH if ya find any bugs.
justin
@justin:goette.me
[m]
works fine in v1.9.0
so issue was introduced in v1.9.1

version: '3.9'

services:
app:
container_name: babybuddy
cpu_shares: 1024
environment:

  • ALLOWED_HOSTS=baby.zz.me
  • DJANGO_SETTINGS_MODULE=babybuddy.settings.base
  • FILE__SECRET_KEY=/run/secrets/SECRET_KEY.json
  • SECURE_PROXY_SSL_HEADER=True
    image: ghcr.io/linuxserver/babybuddy:version-v1.9.2
    mem_limit: '2048m'
    ports:
  • '8000:8000'
    restart: always
    security_opt:
  • no-new-privileges
    volumes:
  • babybuddy_data:/config/data:rw
  • babybuddy_media:/config/media:rw
  • ./secrets:/run/secrets

volumes:
babybuddy_data:
external: true
babybuddy_media:
external: true

eh, sorry for formatting
Christopher Charbonneau Wells
@cdubz
Haha no worries. Ill have a little more time to test tonight. I just dont get why I cant reproduce…
justin
@justin:goette.me
[m]
"Here is with UTC time, if you use the exact current time it fails, if you back date it 1min, it is fine."
That comment reminds me of the folks having issues with the HA integration
🥴