Want to stop Simulator from adding data to weewx database

98 views
Skip to first unread message

Ameya Chilukuri

unread,
Jul 3, 2019, 9:38:12 AM7/3/19
to weewx-user
Hello Everyone,

I have my WeeWX installed on raspberry pi.
I get live data for temperature and humidity from the DHT 22 sensor every 15 minutes and dump it into a .csv file.
I have written a program to wee_import the CSV file into the weewx database.
But the Simulator also generates it's own random data and adds it to the database.
I want this to stop.
As a work around, I have set the "time_grace" = 7200 seconds ( = 2 hours)
So the Simulator adds the data only at intervals of 2 hours.
Is there a permanent solution for this?

Thanks a lot in advance.

Regards,
C. Ameya Manas

Andrew Milner

unread,
Jul 3, 2019, 9:50:29 AM7/3/19
to weewx-user
why are you running simulator if you do not want its data??  simulator 'device' generates random data which is pretty meaningless!!  Just not selecting simulator as your station type would be the logical solution I would have thought.

Thomas Keffer

unread,
Jul 3, 2019, 9:53:05 AM7/3/19
to weewx-user
It sounds like you just want to use the reporting features of WeeWX, and not its data logging abilities. It would help if you explained what you're trying to do. 

-tk

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/56dfb1b0-777d-4360-8900-d6f2b6844f6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ameya Chilukuri

unread,
Jul 3, 2019, 9:54:09 AM7/3/19
to weewx-user
Dear Andrew,

I am under the assumption that choosing a station during installation is necessary.
Is there a way to not select any station?
Thank you for your quick reply.

Regards,
C. Ameya Manas

Ameya Chilukuri

unread,
Jul 3, 2019, 9:58:48 AM7/3/19
to weewx-user
Dear Thomas,

You are right. I only want to use the WeeWX reporting features.
As of now, my team is still in the process of shortlisting a weather station. So currently, we are using our own sensors for testing purposes.
I wish to use the received sensor data to be displayed on the WeeWX index.html file, without the logged simulated data,

Regards,
C. Ameya Manas

On Wednesday, July 3, 2019 at 7:23:05 PM UTC+5:30, Thomas Keffer wrote:
It sounds like you just want to use the reporting features of WeeWX, and not its data logging abilities. It would help if you explained what you're trying to do. 

-tk

On Wed, Jul 3, 2019 at 6:38 AM Ameya Chilukuri <camey...@gmail.com> wrote:
Hello Everyone,

I have my WeeWX installed on raspberry pi.
I get live data for temperature and humidity from the DHT 22 sensor every 15 minutes and dump it into a .csv file.
I have written a program to wee_import the CSV file into the weewx database.
But the Simulator also generates it's own random data and adds it to the database.
I want this to stop.
As a work around, I have set the "time_grace" = 7200 seconds ( = 2 hours)
So the Simulator adds the data only at intervals of 2 hours.
Is there a permanent solution for this?

Thanks a lot in advance.

Regards,
C. Ameya Manas

--
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...@googlegroups.com.

Ameya Chilukuri

unread,
Jul 3, 2019, 10:31:21 AM7/3/19
to weewx-user
I made a mistake in saying that setting "time_grace" = 7200 will lessen the frequency with which Simulator will add data to the WeeWX database.
It is infact:
     archive_interval = 7200
which is found in the [StdArchive] section of the WeeWX.conf file, in /etc/WeeWX/

Still, my issue remains the same. If anyone can tell me how to stop Simulator from adding data altogether, I will be very thankful.

Regards,
C. Ameya Manas

Thomas Keffer

unread,
Jul 3, 2019, 10:37:08 AM7/3/19
to weewx-user
In that case, you would be better off writing a device driver that reads from your  CSV file, rather than using wee_import. This would be the right way to do this.

Another option is to use the utility wee_reports, which just runs the reporting engine. 

I think you'll find that running wee_import over and over again will get less and less efficient as the size of your archive file increases.

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/6138bf14-5351-4107-8ade-23e6f66e3f0f%40googlegroups.com.

p q

unread,
Jul 3, 2019, 10:39:33 AM7/3/19
to weewx...@googlegroups.com
Write yourself a little weewx service to read your csv file and put the valid data in the right variables. Weewx will take care of the rest. 

--
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.

Ameya Chilukuri

unread,
Jul 3, 2019, 10:52:13 AM7/3/19
to weewx...@googlegroups.com
Dear Thomas,

Just saw your reply.
Thanks a lot!!! Please ignore the previous mail. Sent it without reading this. [Desperation. :'-) ]
Thank you for your suggestion. It makes sense. I will explore it.

Regards,
C. Ameya Manas


Ameya Chilukuri

unread,
Jul 3, 2019, 10:57:15 AM7/3/19
to weewx-user
Dear p q,

Thank you for your response. I'm not sure I followed. :-/
Mr. Thomas has suggested an alternate solution, which might be what I am looking for. Thanks a ton anyway. :-)

Regards,
C. Ameya Manas
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Thomas Keffer

unread,
Jul 3, 2019, 11:04:37 AM7/3/19
to weewx-user
On Wed, Jul 3, 2019 at 7:39 AM p q <peterq...@gmail.com> wrote:
Write yourself a little weewx service to read your csv file and put the valid data in the right variables. Weewx will take care of the rest. 

Unfortunately, this would not work. The program weewxd requires a device driver to run properly. So, Ameya would still be stuck with the simulator. 

The best solution is to write a device driver that reads from a file. I don't see one on the Wiki, but someone has probably written one. It's not very hard.

-tk

Andrew Milner

unread,
Jul 3, 2019, 10:09:29 PM7/3/19
to weewx-user
I see from Ron Walker's,weewx.conf in the thread "weewx not running reports" that he has a driver called FileParse, and a FileParse section to define the file contents.  If you contact Ron and obtain the driver then you should be able to select FileParse driver instead of Simulator and your problem is solved.

So contact Ron and see if he can help.  I do not know if the driver is his creation or if he obtained it elsewhere.

Thomas Keffer

unread,
Jul 3, 2019, 10:14:39 PM7/3/19
to weewx-user
Twenty milliseconds after I hit "send" on that message, I remembered that WeeWX comes with an example "Fileparse" driver. That's probably what Ron was using.

-tk

--
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.

Ron Walker

unread,
Jul 4, 2019, 12:46:46 AM7/4/19
to weewx...@googlegroups.com
The FileParse driver came from Github!  Easy to set up and use!

Ameya Chilukuri

unread,
Jul 4, 2019, 12:52:26 AM7/4/19
to weewx-user
Dear Andrew,

This does seem helpful. Ron has just directed toward the source. Also Mr. Thomas has pointed out that WeeWX has it's own example Fileparse driver.
I will explore both. Thank you. :-)

Regards,
C. Ameya Manas

Ameya Chilukuri

unread,
Jul 4, 2019, 12:53:14 AM7/4/19
to weewx-user
Dear Ron,

Thank you for sharing the source. Will check.  :-)

Regards,
C. Ameya Manas

On Thursday, July 4, 2019 at 10:16:46 AM UTC+5:30, Ron Walker wrote:
The FileParse driver came from Github!  Easy to set up and use!

Ron


Sent from Yahoo Mail for iPhone

On Wednesday, July 3, 2019, 10:14 PM, Thomas Keffer <tke...@gmail.com> wrote:

Twenty milliseconds after I hit "send" on that message, I remembered that WeeWX comes with an example "Fileparse" driver. That's probably what Ron was using.

-tk

On Wed, Jul 3, 2019 at 7:09 PM Andrew Milner <andrew....@gmail.com> wrote:
I see from Ron Walker's,weewx.conf in the thread "weewx not running reports" that he has a driver called FileParse, and a FileParse section to define the file contents.  If you contact Ron and obtain the driver then you should be able to select FileParse driver instead of Simulator and your problem is solved.

So contact Ron and see if he can help.  I do not know if the driver is his creation or if he obtained it elsewhere.



On Wednesday, 3 July 2019 18:04:37 UTC+3, Thomas Keffer wrote:
On Wed, Jul 3, 2019 at 7:39 AM p q <peterq...@gmail.com> wrote:
Write yourself a little weewx service to read your csv file and put the valid data in the right variables. Weewx will take care of the rest. 

Unfortunately, this would not work. The program weewxd requires a device driver to run properly. So, Ameya would still be stuck with the simulator. 

The best solution is to write a device driver that reads from a file. I don't see one on the Wiki, but someone has probably written one. It's not very hard.

-tk

--
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...@googlegroups.com.

--
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...@googlegroups.com.

Ameya Chilukuri

unread,
Jul 4, 2019, 1:39:29 AM7/4/19
to weewx-user
Dear Thomas,

20 milliseconds. XD
Thank you for your reply. I'm grateful. Now I have an idea as to where I might find a solution. :-)

Regards,
C. Ameya Manas

On Thursday, July 4, 2019 at 7:44:39 AM UTC+5:30, Thomas Keffer wrote:
Twenty milliseconds after I hit "send" on that message, I remembered that WeeWX comes with an example "Fileparse" driver. That's probably what Ron was using.

-tk

On Wed, Jul 3, 2019 at 7:09 PM Andrew Milner <andrew....@gmail.com> wrote:
I see from Ron Walker's,weewx.conf in the thread "weewx not running reports" that he has a driver called FileParse, and a FileParse section to define the file contents.  If you contact Ron and obtain the driver then you should be able to select FileParse driver instead of Simulator and your problem is solved.

So contact Ron and see if he can help.  I do not know if the driver is his creation or if he obtained it elsewhere.



On Wednesday, 3 July 2019 18:04:37 UTC+3, Thomas Keffer wrote:
On Wed, Jul 3, 2019 at 7:39 AM p q <peterq...@gmail.com> wrote:
Write yourself a little weewx service to read your csv file and put the valid data in the right variables. Weewx will take care of the rest. 

Unfortunately, this would not work. The program weewxd requires a device driver to run properly. So, Ameya would still be stuck with the simulator. 

The best solution is to write a device driver that reads from a file. I don't see one on the Wiki, but someone has probably written one. It's not very hard.

-tk

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages