The "alarm" example is intended to be run as a service within weewx. The assignment to "None" only happens if you try to run alarm as a standalone program.
Follow the instructions at the top of the file alarm.py. It will cause weewx to load it and run it as a service. -tk On Mon, Feb 13, 2017 at 2:04 PM, Brent Phillips <[email protected]> wrote: > Hi trying to test Alarm.py (version = 3.6.2) > > I cannot seem to get this running.. it does not like that the "engine" is > set to None on line 209 in alarm.py, how can I get this working? > > >engine = None > alarm = MyAlarm(engine, config_dict) > > Here is the traceback: > > root@raspberrypi_weather:/home/weewx/bin/user# python alarm.py > ../../weewx.conf > > Traceback (most recent call last): > > File "alarm.py", line 210, in <module> > > alarm = MyAlarm(engine, config_dict) > > File "alarm.py", line 93, in __init__ > > self.bind(weewx.NEW_ARCHIVE_RECORD, self.newArchiveRecord) # NOTE 1 > > File "/home/weewx/bin/weewx/engine.py", line 279, in bind > > self.engine.bind(event_type, callback) > > AttributeError: 'NoneType' object has no attribute 'bind' > > -- > 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. > -- 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.
