MattJeanes / TeslaMateAgile

Integration to automatically fill in prices for charge data captured by TeslaMate for smart energy providers
MIT License
82 stars 10 forks source link

Unable to connect to testamate #61

Open blue-eric opened 3 months ago

blue-eric commented 3 months ago

Hello, according to the Docker configuration file, after I made the configuration, I was unable to connect to and access testamate on the intranet, and I also couldn't see data on Grafana. I would like to ask if it is necessary to map port 5432 on the router to use your project? Also, how do I need to set up to access testamate normally on the intranet? When I used the testamate project before, I only mapped the 3000 port as a router, and the 4000 port does not need to be mapped on the intranet. Thank you for your answer. Here is my Docker configuration

version: "3"

services:

teslamateagile: image: mattjeanes/teslamateagile:latest restart: always environment:

blue-eric commented 3 months ago

Sorry, it was my fault. I misunderstood. I understood it as replacing the Docker file and went over it again. It was adding your project code to the Docker file.

blue-eric commented 3 months ago

Sorry, I'm here again. I would like to inquire about how to switch time zones? I am in China and I would like to use the Chinese time zone. I will use the Fixed Price Time Zone=Asia/shanghai, But the time zone has not changed. What I see in the log is: 06/29/2024 03:00:00 UTC -06/29/2024 05:00:00 UTC: 0.3783, the displayed time is incorrect.

MattJeanes commented 3 months ago

Hey, the time zone mainly affects the fixed price provider as it will interpret your times under the selected timezone. Everything gets normalised to UTC in the output logs but the data should be correct

blue-eric commented 3 months ago

At present, I only have one charging record, and I am not sure whether it is correct. I want to define the time as UTC+8, is it OK? If possible, this is also more convenient for viewing logs, thank you.

MattJeanes commented 3 months ago

You can define it with any IANA timezone code but the logs will not show this as your dates are converted into UTC when the app starts up. The logs are only really designed to be used for debugging, the calculated value will appear in Grafana. If you convert the timezone in the logs back to your configured time zone it should all add up.

blue-eric commented 3 months ago

Ok, well, I'll check to see if the calculation is correct when I have more charging records later. In addition, I would like to ask if I have multiple geofencing, should I continue to add instance configuration in the docker file? Adjust geofencing ID only?

MattJeanes commented 3 months ago

Yes you can have multiple instances of TeslaMateAgile running as long as they are using a different geofence ID

blue-eric commented 3 months ago

Okay, thank you. In terms of ease of use, I think we should optimize the display of UTC, the other is really impeccable, so that I am very convenient to record the cost. Thank you again.