Comments (6)
Completed my fake datalogger, which I can use to have one running on a Pi with MySQL, disabling the need for a P1 port.
from dsmr-reader.
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
Takes a minute or so.
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
from dsmr-reader.
Well it seems that as long as the system's time is set to UTC, things go well. However, it's not a guarantee that everyone sets UTC as their system timezone.
from dsmr-reader.
Follow-up check is checking (day) boundaries. I'll have my fake datalogger run for the next day, so I can check ranges tomorrow.
from dsmr-reader.
Seems to work fine:
WHERE (`dsmr_consumption_electricityconsumption`.`read_at` < 2016-02-06 23:00:00 AND `dsmr_consumption_electricityconsumption`.`read_at` >= 2016-02-05 23:00:00) ORDER BY `dsmr_consumption_electricityconsumption`.`read_at` ASC
So Django selects 23:00 tot 23:00, which is expected (data is stored UTC).
When I make the selection naive:
WHERE (`dsmr_consumption_electricityconsumption`.`read_at` >= 2016-02-06 00:00:00 AND `dsmr_consumption_electricityconsumption`.`read_at` < 2016-02-07 00:00:00) ORDER BY `dsmr_consumption_electricityconsumption`.`read_at` ASC
Midnight UTC, which is wrong. Also, Django complains:
RuntimeWarning: DateTimeField GasConsumption.read_at received a naive datetime (2016-02-06 00:00:00) while time zone support is active.
The only thing is, I just added timezone tables before testing. I'll revert the database and test again, without them.
from dsmr-reader.
It seems Django performs the conversion, so it should be OK, as long as UTC is set as SYSTEM time.
from dsmr-reader.
Related Issues (20)
- Installing DSMR on proxmox: restart of nginx failed HOT 1
- MQTT messages are not published anymore🙋 HOT 1
- Gas-verbruik wordt niet geïmporteerd HOT 3
- DSMR-reader remote uitlezen (door domoticz) HOT 4
- SyntaxWarning: invalid escape sequence '\d' HOT 2
- deploy.sh: ImportError: Shared object "libimagequant.so.0.0.4" not found, required by "_imaging.cpython-39.so" HOT 2
- API not working 404: not found HOT 1
- Postgres14.5 en backup lokatie NAS , DSMR op PI probleem nu met backup file. HOT 5
- Mindergas upload tijd randomiseren ? HOT 3
- Tijd van upload naar minder gas instelbaar maken HOT 1
- Mqtt input messages for readings HOT 1
- Gebruik Influx URL i.p.v. Influx hostname + port combinatie HOT 1
- Database grootte waarschuwing HOT 1
- OperationalError: database is locked HOT 6
- Statistieken van afgelopen 365 dagen HOT 1
- MQTT: Rejecting message for topic due to maximum queue size (5000) HOT 2
- READ! MQTT Broker; no incoming data from DSMR Reader, fix! HOT 1
- Not able to configure dmsr-reader: CSRF verification failed. Request aborted. HOT 11
- "How to get Homewizard P1 meter telegrams into DSMR Reader using automations" HOT 5
- welke body meegeven in opsturen P1 telegram met V1 api http://[ip]/api/v1/datalogger/dsmrreading HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsmr-reader.