AllskyTeam / allsky-modules

User modules for allsky
MIT License
18 stars 17 forks source link

Extending fan control with multiple sensors #67

Closed CapricornusObs closed 7 months ago

CapricornusObs commented 7 months ago

This version of fan-control can use external temperature sensors - along with the built in one - to turn on/off the fan. Each sensor can have different temperature limit. Some code of dewheater project was reused. New sensor BMP280 control code added.

Alex-developer commented 7 months ago

Thanks for the PR it all looks good :-)

We do not allow PR into master could you please change the PR so that its going into dev.

There are a couple of other changes it would be good if you can make. I am currently adding a couple of new entries to the metaData. Onne for bus information and the other for changelogs. If you look in the 61-test-all-external-devices-for-error-handling branch I have started to change a lot of the modules, a good example is the dewheater module.

The businfo section just lists the potential buses that the module may need. Since this may need i2c it just needs the same entry thats in the dewheater.

These changes are to allow more information to be displayed in the module manager and ensure that things like the i2c bus are enabled on the pi before a user attempts to install modules that needs it.

    "businfo": [
        "i2c"
    ],    
    "changelog": {
        "v1.0.0" : [
            {
                "author": "Alex Greenland",
                "authorurl": "https://github.com/allskyteam",
                "changes": "Initial Release"
            }
        ],
        "v1.0.1" : [
            {
                "author": "Damian Grocholski (Mr-Groch)",
                "authorurl": "https://github.com/Mr-Groch",
                "changes": [
                    "Added extra pin that is triggered with heater pin",
                    "Fixed dhtxxdelay (was not implemented)",
                    "Fixed max heater time (was not implemented)"
                ]
            }
        ],
        "v1.0.2" : [
            {
                "author": "Alex Greenland",
                "authorurl": "https://github.com/allskyteam",
                "changes": "Initial Release"
            }
        ],
        "v1.0.4" : [
            {
                "author": "Alex Greenland",
                "authorurl": "https://github.com/allskyteam",
                "changes": "Add AHTx0 i2c sensor"
            },            
            {
                "author": "Andreas Schminder",
                "authorurl": "https://github.com/Adler6907",
                "changes": "Added Solo Cloudwatcher"
            }
        ],
        "v1.0.5" : [
            {
                "author": "Alex Greenland",
                "authorurl": "https://github.com/allskyteam",
                "changes": "Added OpenWeather option"
            }
        ]                                        
    }

Thanks

Alex

CapricornusObs commented 7 months ago

Hi Alex,

I made the changes you asked for.

I am not sure that original version info was filled correctly.

Later I would like to add all the other sensor codes, but currently I have no hardware to test them.

Thanks, Tamas