Another database

233 views
Skip to first unread message

rimas petronis

unread,
Mar 19, 2019, 10:10:50 AM3/19/19
to weewx-user
good day

sorry my weak english translated with google
i really liked the program not only watching the weather but watching other devices i would like to connect to weewx data in another database

database and other composition

image.png


can be connected

rimas petronis

unread,
Mar 19, 2019, 10:18:14 AM3/19/19
to weewx-user

duom baze..png

rimas petronis

unread,
Mar 26, 2019, 10:51:21 AM3/26/19
to weewx-user
Hello. 

help needed
I'm trying to connect such a database to weewx
after a long online search and the test failed
maybe you have a suggestion or reference where to look


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Pagarbiai,
Rimas Petronis

Thomas Keffer

unread,
Mar 26, 2019, 11:05:54 AM3/26/19
to weewx-user
You will need to give us much more information before we can help you. To start:

What kind of database?
is it remote, or local?
What is the problem when you connect? 

-tk

rimas petronis

unread,
Mar 26, 2019, 11:44:17 AM3/26/19
to weewx-user

database  phpmyadmin   local

I can't find a way to connect





2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:

Thomas Keffer

unread,
Mar 26, 2019, 12:04:12 PM3/26/19
to weewx-user
phpmyadmin is an administrative tool, not a database. What is the database?

Why not write your question in your native language? Please avoid jargon and idioms. Use full, natural sentences. There is probably someone here who speaks it, or we can use Google translate. 

-tk

--
Message has been deleted

Thomas Keffer

unread,
Mar 26, 2019, 6:11:33 PM3/26/19
to weewx-user
OK, and what is the problem?

On Tue, Mar 26, 2019 at 11:12 AM <hesf...@gmail.com> wrote:
Zahlreiche Datenbanken in WeeWX


ich verwende 10 Datenbanken unter MySQL für Anzeigen unter www.wetter.hes61.de


many databases in WeeWX

follow the link  --> https://github.com/hes19073/hesweewx/blob/master/weewx.conf

I use 10 databases "MySQL" and "SqLite"  by www.wetter.hes61.de

rimas petronis

unread,
Mar 27, 2019, 3:55:22 AM3/27/19
to weewx-user
with weewx I have created 4 databases all ok
  server installed scada heating system monitor and control
    compile data for MySQL I want to connect heating system data to weewx so I can monitor my weekly annual reports



2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:

Thomas Keffer

unread,
Mar 27, 2019, 8:16:44 AM3/27/19
to weewx-user
Instructions for how to use more than one database are in the section Using multiple bindings. Did you try that?

-tk

--

rimas petronis

unread,
Mar 27, 2019, 11:51:48 AM3/27/19
to weewx-user

According to sita instruction I tried but did not join
I created a new scheme
maybe wrongly created scheme

schema = [('D',              'INTEGER NOT NULL PRIMARY KEY'),
          ('T01',            'INTEGER'),
          ('T02',            'INTEGER'),
          ('T03',            'INTEGER'),
          ('T04',            'INTEGER'),






2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:

rimas petronis

unread,
Apr 13, 2019, 1:30:32 AM4/13/19
to weewx-user

nepavyksta prijungti  
naudoju pagal instrukcija ''Using multiple bindings.''     4 duomenu bazes
 prie kurios noriu prijungti nepavyksta 
sita duomenu baze  ira kitokias sudeties 
data   UTC o ne Unix time
nera  usUnits , interval
galvoju kad  nesugebu  sukurti ''schema''
turit pasiulimu kaip prijugti  sita duomenu baze



2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:
duom baze..png

rimas petronis

unread,
Apr 15, 2019, 5:05:47 AM4/15/19
to weewx-user

Unable to connect
I use 4 databases for 'Using multiple bindings.'
  I don't want to connect to
this database is different
date UTC instead of Unix time
not usUnits, interval
i think i can't create a '' schema ''
have a suggestion on how to connect to this database



2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:

gjr80

unread,
Apr 15, 2019, 9:44:00 PM4/15/19
to weewx-user
If I understand you correctly you have another database you want WeeWX to connect to. This database does not have a dateTime field that stores a Unix epoch timestamp, but rather it has a field that stores a UTC date-time in a YYYY-mm-dd HH:MM:SS format. The database does not have usUnits or interval fields. I assume you wish to be able to (as a minimum) use data from this database in WeeWX generated reports.

WeeWX will certainly be able to 'connect' to the database but unless you have a dateTime field that stores a Unix epoch timestamp you will be severely limited in what WeeWX can do with the data in the database. The reason being that almost all WeeWX report tags (eg $current, $day, $week etc) rely on there being a dateTime field (that holds a Unix epoch timestamp) that WeeWX can use in the underlying SQL queries that support the WeeWX tags. The lack of a usUnits field will certainly create issues with units whether you are converting units or not. The lack of an interval field is probably less of an issue but it will certainly create some limitations as well.

Your best approach might be to develop a WeeWX service that reads the relevant data from the external database, makes the necessary conversion from the UTC date-time field and determines a usUnits value and the saves these fields and the relevant data in a suitable WeeWX database. If the system that produces the external database has some means on interrogating it for the data you are interested in, and if your WeeWX machine can connect to it, another approach maybe to develop a WeeWX service to obtain the data of interest direct from the external system and save it to a WeeWX database. Ether way will take some effort, the first approach will require some SQL skills and the second, if possible, some basic skills like used in many of the WeeWX drivers.

Gary

rimas petronis

unread,
May 3, 2019, 1:03:32 PM5/3/19
to weewx-user

i want to create a weewx service


121.png



i created a tester all ok
crawl i weewx don't get what i do
  what i do badly







2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:
Modbuselectricity.py
MODBUSTest.py

rimas petronis

unread,
May 6, 2019, 10:02:42 AM5/6/19
to weewx-user

I'm asking for help
For 3 weeks, I try to get along, but I don't succeed

I've created another scrip for data scans
one problem
reads healthy numbers well
  negatives (65250 must -286)
I found a formula to calculate
unable to get stuck (65250 -65536 = - 286)
how to make correct numbers
positive and negative


May  6 16:38:27 rimaspetronis weewx[25649]: Vc: 248.60
May  6 16:38:27 rimaspetronis weewx[25649]: Vab: 435.30
May  6 16:38:27 rimaspetronis weewx[25649]: Vbc: 427.40
May  6 16:38:27 rimaspetronis weewx[25649]: Vca: 438.40
May  6 16:38:27 rimaspetronis weewx[25649]: Hz: 50.00
May  6 16:38:27 rimaspetronis weewx[25649]: Kwa: 65437.00
May  6 16:38:27 rimaspetronis weewx[25649]: Kwb: 65439.00
May  6 16:38:27 rimaspetronis weewx[25649]: Kwc: 65422.00



2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:
ElectricModbus.py

Andrew Milner

unread,
May 6, 2019, 11:05:37 AM5/6/19
to weewx-user
I do not understand your problem
The first values you said were type float, and you have printed them with the format %.2f - are these the correct values??

the values in red you have said are type integer, but you are printing them as type float
if they are integers the format should be %d ((integers do not have a decimal point)

What are the logged messages supposed to be showing??

rimas petronis

unread,
May 6, 2019, 11:49:14 AM5/6/19
to weewx-user
red scans from "1000 to -1000" data, "1000 to 0" good, and -1 to -1000 shows 65536 o should read -1


2019 m. kovas 19 d., antradienis 16:10:50 UTC+2, rimas petronis rašė:

Andrew Milner

unread,
May 6, 2019, 2:23:53 PM5/6/19
to weewx-user
I think you need to define your integers as signed integers to modbus rather than (I suspect) unsigned integers which you are probably using now

The 'error' will be within the modbus tcp setup/definitions
Reply all
Reply to author
Forward
0 new messages