Ok, back again. Clean version of Ubuntu Server 20, with a new install of 
weewx 4.1.1 installed via setup.py. Good so far.

Multiple instances configured, one using the FineOffSet driver (fousb), the 
other using the Interceptor (WH2950) - both running and producing separate 
reports with valid data that I can view via web browser.

I have then edited the wh2950.conf file to add a data binding to it from 
the fousb:

[DataBindings]

    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.manager.DaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview_extended.schema

    [[fousb_binding]]
        # Binding for WH1080 on fousb
        database = fousb_sqlite
        # The name of the table within the database
        table_name = archive
        # The class to manage the database
        manager = weewx.manager.DaySummaryManager
        # The schema defines to structure of the database contents
        schema = schemas.wview_extended.schema

##############################################################################

#   This section defines various databases.

[Databases]

    # A SQLite database is simply a single file
    [[archive_sqlite]]
        database_name = wh2950.sdb
        database_type = SQLite

    [[fousb_sqlite]]
        database_name = fousb.sdb
        database_type = SQlite

    # MySQL
    [[archive_mysql]]
        database_name = wh2950
        database_type = MySQL

When I restart the wh2950 instance, it starts without error - so far so 
good.

I then edited the Seasons skin.conf file and added the "daycompare" section 
as follows:

        [[[dayuv]]]
#            yscale = 0, 16, 1
            [[[[UV]]]]

        [[[daycompare]]]
           [[[[inTemp]]]]
               label = House inTemp
           [[[[fousbTemp]]]]
               data_type = inTemp
               data_binding = fousb_binding
               label = server inTemp

        [[[dayrx]]]
            yscale = 0.0, 100.0, 25.0
            [[[[rxCheckPercent]]]]

I then get the following error saying that the 'fousb_binding' is unknown:

Aug  8 11:30:25 weewxserver weewx-wh2950[26664] DEBUG weewx.reportengine: 
Running reports for latest time in the database.
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] DEBUG weewx.reportengine: 
Running report 'SeasonsReport'
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] DEBUG weewx.reportengine: 
Found configuration file /home/weewx/skins/Seasons/skin.conf for report 
'SeasonsReport'
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] DEBUG 
weewx.cheetahgenerator: Using search list 
['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 
'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 
'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] DEBUG weewx.manager: Daily 
summary version is 2.0
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] INFO 
weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 0.34 
seconds
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] DEBUG weewx.manager: Daily 
summary version is 2.0
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine: 
Caught unrecoverable exception in generator 
'weewx.imagegenerator.ImageGenerator'
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  Unknown data binding ''fousb_binding''
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  Traceback (most recent call last):
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/manager.py", line 632, in 
get_manager_dict_from_config
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      manager_dict = 
dict(config_dict['DataBindings'][data_binding])
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/usr/lib/python3/dist-packages/configobj.py", line 
554, in __getitem__
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      val = dict.__getitem__(self, key)
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  KeyError: 'fousb_binding'
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  During handling of the above exception, another exception 
occurred:
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  Traceback (most recent call last):
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/reportengine.py", line 197, in 
run
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      obj.start()
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/reportengine.py", line 280, in 
start
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      self.run()
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/imagegenerator.py", line 41, in 
run
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      self.genImages(self.gen_ts)
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/imagegenerator.py", line 175, in 
genImages
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      db_manager = self.db_binder.get_manager(binding)
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/manager.py", line 527, in 
get_manager
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      manager_dict = 
get_manager_dict_from_config(self.config_dict,
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****    File "/home/weewx/bin/weewx/manager.py", line 634, in 
get_manager_dict_from_config
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****      raise weewx.UnknownBinding("Unknown data binding '%s'" % e)
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  weewx.UnknownBinding: Unknown data binding ''fousb_binding''
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] ERROR weewx.reportengine:  
       ****  Generator terminated
Aug  8 11:30:25 weewxserver weewx-wh2950[26664] INFO weewx.reportengine: 
Copied 0 files to /home/weewx/public_html/wh2950

Hopefully there is a really obvious mistake that I can correct - i figure 
if I can get the 'daycompare' to work, i will be able to extrapolate that 
to the rest of the time intervals.

Thanks again, most appreciated.



On Saturday, 8 August 2020 at 00:35:04 UTC+12 [email protected] wrote:

> I do appreciate you patience, thanks.
>
> I'd love to provide a log file, however when I try to start either of 
> weewx-fousb or weewx-wh2950 using "weather@weewxserver:~$ sudo 
> /etc/init.d/weewx-* start",  "tail -f /var/log/syslog" doesn't show any 
> response at all, and the prompt shows "Starting weewx-fousb (via 
> systemctl): weewx-fousb.service." then just goes back to " 
> weather@weewxserver:~$ " - there are no errors, no nothing.
>
> If I use  "sudo weewxd /etc/weewx/wh2950.conf" (or fousb.conf), it works 
> as expected - but obviously only as long as I have that terminal window 
> open.
>
> sudo /etc/init.d/weewx status shows that it's not running, but I can't 
> tell why.
>
> weather@weewxserver:~$ sudo /etc/init.d/weewx status
> ● weewx.service - LSB: weewx weather system
>      Loaded: loaded (/etc/init.d/weewx; generated)
>      Active: active (exited) since Fri 2020-08-07 11:38:26 UTC; 54min ago
>        Docs: man:systemd-sysv-generator(8)
>       Tasks: 0 (limit: 9448)
>      Memory: 0B
>      CGroup: /system.slice/weewx.service
>
> Aug 07 11:38:26 weewxserver systemd[1]: Starting LSB: weewx weather 
> system...
> Aug 07 11:38:26 weewxserver weewx[1138]:  * Starting weewx weather system 
> weewx
> Aug 07 11:38:26 weewxserver python3[1157]: weewx[1157] INFO __main__: 
> Initializing weewx version 4.1.1
> Aug 07 11:38:26 weewxserver python3[1157]: weewx[1157] INFO __main__: 
> Using Python 3.8.2 (default, Jul 16 2020, 14:00:26)
>                                            [GCC 9.3.0]
> Aug 07 11:38:26 weewxserver python3[1157]: weewx[1157] INFO __main__: 
> Platform Linux-5.4.0-42-generic-x86_64-with-glibc2.29
> Aug 07 11:38:26 weewxserver python3[1157]: weewx[1157] INFO __main__: 
> Locale is 'en_US.UTF-8'
> Aug 07 11:38:26 weewxserver python3[1157]: weewx[1157] INFO __main__: PID 
> file is /var/run/weewx.pid
> Aug 07 11:38:26 weewxserver weewx[1138]:    ...done.
> Aug 07 11:38:26 weewxserver systemd[1]: Started LSB: weewx weather system.
> weather@weewxserver:~$
>
>
>
>
> On Saturday, 8 August 2020 at 00:17:48 UTC+12 [email protected] wrote:
>
>> We will need more details than "I can't get them to run..."
>>
>> Please see the wiki article *Help! Posting to weewx-user 
>> <https://github.com/weewx/weewx/wiki/Help!-Posting-to-weewx-user>*.
>>
>> On Fri, Aug 7, 2020 at 5:10 AM [email protected] <[email protected]> 
>> wrote:
>>
>>> Thanks for the reply, and my apologies for the lack of detail initially 
>>> - at was just after 1AM when I wrote that, and i'd been staring at weewx 
>>> forum posts for quite a few hours.
>>>
>>> I have both a FOUSB WH1080 and a WH2950 here. The fousb outdoor unit has 
>>> seen better days, but the indoor unit works well, and is connected via usb 
>>> to my server, which both live in a room off the side of my garage. The 
>>> WH2950 is new and I have it setup to get both the weather outdoors, and the 
>>> conditions inside my house.
>>>
>>> What I would like to be able to do is have a webpage (the SeasonsReport 
>>> would be perfectly fine) that shows all the available sensor data from the 
>>> WH2950, and also has the "inside temp" and "inside humidity" from the fousb 
>>> shown on the same page. To that end, I managed to get two instances of 
>>> weewx running on my server using the guide and I thought (somewhat naively 
>>> it would seem) that once I had bound one database to the other, the report 
>>> generator would add both sets of data together and produce one web page 
>>> with all the sensor data from both weather stations.
>>>
>>> I then went and changed from setup.py to a .deb install, due to some 
>>> other issues I was having.  I followed MWALL's 
>>> <https://groups.google.com/d/msg/weewx-user/FsKRIt8wG5I/Nh5u_ITiLgAJ> 
>>> instructional post on how to get multiple instances running under a .deb 
>>> install, but seem to have fallen at the last hurdle - getting it to run. I 
>>> can invoke weewxd at the command line for each .conf file and they will 
>>> both run happily, however I can't get them to run on startup or in the 
>>> background. i've obviously mucked something up in the /etc/init.d/ files 
>>> for each instance, i will have to solve that first before I come back to 
>>> solving how to display data from two databases in one web report.
>>>
>>> I followed the instructions in this link here 
>>> <https://groups.google.com/d/msg/weewx-user/FsKRIt8wG5I/Nh5u_ITiLgAJ> 
>>> but just substituted vantage and cc3000 with wh2950 and fousb. If anyone 
>>> can see anything obviously wrong with those instructions, I'd love to hear 
>>> it.
>>>
>>> I've had weewx running for years with no issue, as long as i leave it 
>>> alone...
>>>
>>>
>>>
>>> On Friday, 7 August 2020 at 02:22:01 UTC+12 vince wrote:
>>>
>>>> On Thursday, August 6, 2020 at 6:18:51 AM UTC-7, George Alexander wrote:
>>>>
>>>>> I have been trying, thus far without success, to display the 
>>>>> measurements from two separate databases of weewx on the one report. 
>>>>>
>>>>>
>>>>>
>>>> In your cheetah template simply add info telling it which db to pull 
>>>> from
>>>>
>>>>    <td 
>>>> class="stats_data">$latest($data_binding='wh2950_binding').extraTemp1</td>
>>>>
>>>> -- 
>>> 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 [email protected].
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/1448c791-8483-4d48-b0fa-fc141954106bn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/1448c791-8483-4d48-b0fa-fc141954106bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8e12e159-87c7-4178-81e4-b774954cfb7bn%40googlegroups.com.

Reply via email to