Unfortunately Matthew left out one rather important line. Add the 
highlighted line to your code:

class CozirService(weewx.engine.StdService):
    def __init__(self, engine, config_dict):
        super(CozirService, self).__init__(engine, config_dict)
        d = config_dict.get('Cozir', {})

Save the file and restart weeWX.

As for adding co2 to your database and defining supporting units/unit 
groups have a read of the sections Customizing the database 
<http://weewx.com/docs/customizing.htm#archive_database> and Customizing 
units and unit groups 
<http://weewx.com/docs/customizing.htm#customizing_units> in the Customization 
Guide <http://weewx.com/docs/customizing.htm>. That should get you started.

Gary

On Sunday, 25 November 2018 07:48:37 UTC+10, KattanaD wrote:
>
> syslog
>  
>
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/weewx/engine.py", line 78, i                     n __init__
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.loadServices(config_dict)
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/weewx/engine.py", line 142,                      in 
>> loadServices
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.service_obj.append(weeutil.weeutil._get_obj                     
>> ect(svc)(self, config_dict))
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/user/cozir.py", line 12, in                      __init__
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.bind(weewx.NEW_LOOP_PACKET, self.handle_new                     _loop)
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/weewx/engine.py", line 281,                      in bind
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.engine.bind(event_type, callback)
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****  AttributeError: 
>> 'CozirService' object has no attribu                     te 'engine'
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****  Exiting.
>> Nov 24 21:39:33 raspberrypi kernel: [ 4997.987824] usb 1-1.3: dvb_usb_v2: 
>> found a 'Realtek RTL2832U refe                     rence design' in warm 
>> state
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.055411] usb 1-1.3: dvb_usb_v2: 
>> will pass the complete MPEG2 t                     ransport stream to the 
>> software demuxer
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.055486] dvbdev: DVB: 
>> registering new adapter (Realtek RTL2832                     U reference 
>> design)
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.085896] i2c i2c-3: Added 
>> multiplexed i2c bus 4
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.085920] rtl2832 3-0010: 
>> Realtek RTL2832 successfully attached
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.086057] usb 1-1.3: DVB: 
>> registering adapter 0 frontend 0 (Rea                     ltek RTL2832 
>> (DVB-T))...
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.086527] r820t 4-001a: creating 
>> new instance
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.094085] r820t 4-001a: Rafael 
>> Micro r820t successfully identif                     ied
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.138362] Registered IR keymap 
>> rc-empty
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.138608] rc rc0: Realtek 
>> RTL2832U reference design as /devices                     
>> /platform/soc/20980000.usb/usb1/1-1/1-1.3/rc/rc0
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.138891] input: Realtek 
>> RTL2832U reference design as /devices/                     
>> platform/soc/20980000.usb/usb1/1-1/1-1.3/rc/rc0/input4
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.152380] input: MCE IR 
>> Keyboard/Mouse (dvb_usb_rtl28xxu) as /d                     
>> evices/virtual/input/input5
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.153351] rc rc0: lirc_dev: 
>> driver ir-lirc-codec (dvb_usb_rtl28                     xxu) registered at 
>> minor = 0
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.153377] usb 1-1.3: dvb_usb_v2: 
>> schedule remote query interval                      to 200 msecs
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.169881] usb 1-1.3: dvb_usb_v2: 
>> 'Realtek RTL2832U reference de                     sign' successfully 
>> initialized and connected
>> Nov 24 21:39:33 raspberrypi systemd-udevd[14565]: Process 
>> '/usr/sbin/th-cmd --socket /var/run/thd.socket                      
>> --passfd --udev' failed with exit code 1.
>> Nov 24 21:39:33 raspberrypi systemd-udevd[14573]: Process 
>> '/usr/sbin/th-cmd --socket /var/run/thd.socket                      
>> --passfd --udev' failed with exit code 1.
>> Nov 24 21:39:33 raspberrypi systemd-udevd[14566]: Process 
>> '/usr/sbin/th-cmd --socket /var/run/thd.socket                      
>> --passfd --udev' failed with exit code 1.
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/weewx/engine.py", line 78, i                     n __init__
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.loadServices(config_dict)
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/weewx/engine.py", line 142,                      in 
>> loadServices
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.service_obj.append(weeutil.weeutil._get_obj                     
>> ect(svc)(self, config_dict))
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/user/cozir.py", line 12, in                      __init__
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.bind(weewx.NEW_LOOP_PACKET, self.handle_new                     _loop)
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****    File 
>> "/home/weewx/bin/weewx/engine.py", line 281,                      in bind
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****      
>> self.engine.bind(event_type, callback)
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****  AttributeError: 
>> 'CozirService' object has no attribu                     te 'engine'
>> Nov 24 21:39:26 raspberrypi weewx[14456]:     ****  Exiting.
>> Nov 24 21:39:33 raspberrypi kernel: [ 4997.987824] usb 1-1.3: dvb_usb_v2: 
>> found a 'Realtek RTL2832U refe                     rence design' in warm 
>> state
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.055411] usb 1-1.3: dvb_usb_v2: 
>> will pass the complete MPEG2 t                     ransport stream to the 
>> software demuxer
>> Nov 24 21:39:33 raspberrypi kernel: [ 4998.055486] dvbdev: DVB: 
>> registering new adapter (Realtek RTL2832
>>
>>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to