The ultimate mod

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

The ultimate mod

Post by davidefa » Tue Jun 28, 2022 3:17 pm

Every software should have an 'ultimate' block/plugin/something... now is meteotemplate's turn.
This mod will add 3 icons in the control panel to install:
- unofficial blocks
- unofficial plugins
- unofficial mods
As the name implies, these are all unofficial updates, from a repository maintained by me, which contains the same blocks/plugins/mods published in this forum, but in a centralized manner.
In this way it should be easier to update meteotemplate ( without searching the whole forum ), directly from the control panel.

This is an initial release. I'd like to extend it:
- adding version selection support ( now you can only update to last version )
- adding a mod undo option ( mods are potentially dangerous, so an undo should restore the previous situation, in case... )
- adding a 'repository plugin' ( for those who want to create their own repository )
- adding the support of multiple repositories
- adding the support of installation from a given url
Any suggestion is welcome.

P.S.
I'm in the process of extracting from the forum any block/plugin/mod already published. Any help is welcome

INSTALLATION
Copy the zipped archive in the meteotemplate root directory and unzip the file ( it will overwrite 'a few' files in the admin directory, it is always a good idea to make a backup before installing a mod ).

v1.0 28/6/2022
- initial release

v1.1 8/7/2022
- corrected mod install
- added block duplication feature, it should be enough for 'simple blocks' ( for more complex ones you also need the 'iframe' block )


unofficial01.png
unofficial01.png (440.37 KiB) Viewed 2801 times
Attachments
ultimateMod_1.1.zip
(43.98 KiB) Downloaded 104 times
ultimateMod_1.0.zip
(45.23 KiB) Downloaded 52 times
Last edited by davidefa on Fri Jul 08, 2022 4:13 pm, edited 4 times in total.
Image

alexvanuxem
Forecaster
Forecaster
Posts: 182
Joined: Mon Jan 31, 2022 4:41 pm
Location: Sint-Katelijne-Waver, Belgium
Station model: Davis Vantage Pro 2
Software: Meteobridge
Contact:

Re: The ultimate mod

Post by alexvanuxem » Tue Jun 28, 2022 4:27 pm

+10000!

Great job!

can't wait to test the mod!

This will be a new version of MT?

KR

A
Image

alexvanuxem
Forecaster
Forecaster
Posts: 182
Joined: Mon Jan 31, 2022 4:41 pm
Location: Sint-Katelijne-Waver, Belgium
Station model: Davis Vantage Pro 2
Software: Meteobridge
Contact:

Re: The ultimate mod

Post by alexvanuxem » Tue Jun 28, 2022 5:12 pm

Hi Davidefa,

These are three blocks I made airqualityindoor: a second block to show next to the airquality block, a block which shows the indoor AQ

forecastBE: a simple block to show the Belgium KMI widget (based on forecastNL)

and weathernetworksblock: there I changed the link to CWOP, the normal one is not working, if you are not an official member of cwop (official members are US only).

hope this will help for the library.
weatherNetworksBlock.zip
(1.92 KiB) Downloaded 40 times
airQualitySensorIndoor.zip
(45.81 KiB) Downloaded 39 times
forecastBE.zip
(1.87 KiB) Downloaded 37 times
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: The ultimate mod

Post by davidefa » Tue Jun 28, 2022 8:34 pm

Good
Image

alexvanuxem
Forecaster
Forecaster
Posts: 182
Joined: Mon Jan 31, 2022 4:41 pm
Location: Sint-Katelijne-Waver, Belgium
Station model: Davis Vantage Pro 2
Software: Meteobridge
Contact:

Re: The ultimate mod

Post by alexvanuxem » Fri Jul 01, 2022 2:08 pm

Hi David!

Thanks for the ultimate mod, works well.
Now I got the latest versions of all, I use!

two small issues : the riset block I have is 7.3, the mod shows an update to 7.4, but can't seem to update it.
It keeps hanging on 7.3. Don't find a update either to 7.4 in this forum.

in the unofficial mod section I can't download them, error: Unable to load file from http://realrunning.netsons.org/template ... repository

thx man!
Image

User avatar
meteoesine
Forecaster
Forecaster
Posts: 166
Joined: Sun Aug 20, 2017 4:08 pm
Location: Esine, Valcamonica (BS) - Italy
Station model: Davis Pro2+
Software: Meteobridge nano
Contact:

Re: The ultimate mod

Post by meteoesine » Sat Oct 01, 2022 11:54 am

just to know,
Does the unofficial mod installation work or is it still being tested?
i mean i have already installed all mods but it looks like they are not.
did I do something wrong?
Attachments
ScreenShot01157.jpg
ScreenShot01157.jpg (39.03 KiB) Viewed 2409 times
:arrow: https://meteoesine.it
ham wx aprs/cwop: IW2LAO-13

Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: The ultimate mod

Post by andyk1 » Sat Oct 01, 2022 11:07 pm

I installed the ultimate mode by David's directions and it worked as he described. The only issue I have is I cannot get PHP to work in php 8.0 or 8.1 on my host server which is IONOS.COM. other than that it works... at least till December 31st.

Describe the issue you are having in more detail if you can.

Your site looks nice and organized. The one thing I recommend is to turn on other languages in the upper right corner as people like me do not speak your language and have to guess the lay out to offer help but that is your choice.

Also, I'm not sure if it's out of the testing phase but works as is for me as I said. Big THANK YOU to David.

Andy
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Mon Dec 19, 2022 12:35 am

I installed ultimate mod 8.1.1 in my new install of meteotemplate which is working great runs PHP 8.1.13, apache2
it added all the links in the CP but when I click I get a error this page isnt working and when a check the error I get looks like its looking for a table thats not there I reclicked on the test connection in main setup and its ok how does this table 'hurricanepub.mt_mods get created

Warning: Undefined array key "HTTP_X_FORWARDED_FOR" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 116

Warning: Undefined array key "HTTP_CLIENT_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 117

Warning: Undefined array key "HTTP_CF_CONNECTING_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 118

Fatal error: Uncaught mysqli_sql_exception: Table 'hurricanepub.mt_mods' doesn't exist in /var/www/hurricanepub/template/admin/modSetupUnofficial.php:34 Stack trace: #0 /var/www/hurricanepub/template/admin/modSetupUnofficial.php(34): mysqli_query() #1 {main} thrown in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 34
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: The ultimate mod

Post by andyk1 » Mon Dec 19, 2022 4:13 am

Try it with php 8.0. If not try to create the table with php 7.4 while you have a chance.
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Mon Dec 19, 2022 6:00 am

Thanks Andy but I am not going to back down my php to many other things can go wrong besides when it was on windows I was running php 8.1.11 and it worked
Is it suppose to create a new table in mysql ?
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Mon Dec 19, 2022 2:52 pm

spd2612 wrote: Mon Dec 19, 2022 12:35 am I installed ultimate mod 8.1.1 in my new install of meteotemplate which is working great runs PHP 8.1.13, apache2
it added all the links in the CP but when I click I get a error this page isnt working and when a check the error I get looks like its looking for a table thats not there I reclicked on the test connection in main setup and its ok how does this table 'hurricanepub.mt_mods get created

Warning: Undefined array key "HTTP_X_FORWARDED_FOR" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 116

Warning: Undefined array key "HTTP_CLIENT_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 117

Warning: Undefined array key "HTTP_CF_CONNECTING_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 118

Fatal error: Uncaught mysqli_sql_exception: Table 'hurricanepub.mt_mods' doesn't exist in /var/www/hurricanepub/template/admin/modSetupUnofficial.php:34 Stack trace: #0 /var/www/hurricanepub/template/admin/modSetupUnofficial.php(34): mysqli_query() #1 {main} thrown in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 34
@Davidefa

I have recreated the user and gave the right permissions, its username@localhost changed the sql connect in main setup to localhost, but
modSetupUnofficial.php still will not create the table. This is Ubunto 22.04 Linux and it is installed in template folder all the rest of the site works great I really dont know how to manually create this table in mysqli
My database is updating weather data just fine as seen in phpmyadmin

Been messing with it but still have this error

Deprecated: Function date_sunrise() is deprecated in /var/www/hurricanepub/template/header.php on line 141

Deprecated: Function date_sunset() is deprecated in /var/www/hurricanepub/template/header.php on line 142

Deprecated: Function date_sunrise() is deprecated in /var/www/hurricanepub/template/header.php on line 313

Deprecated: Function date_sunset() is deprecated in /var/www/hurricanepub/template/header.php on line 314

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/hurricanepub/template/admin/pluginSetupUnofficial.php:56 Stack trace: #0 {main} thrown in /var/www/hurricanepub/template/admin/pluginSetupUnofficial.php on line 56
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Tue Dec 20, 2022 5:26 pm

This is what I know hopefully @davidefa will see this my server is as follows
Ubunto 22.04 Apache2
mysql Ver 8.0.31
php 8.1.13

modSetupUnofficial.php will not create the table in Mysql I had to create it manually, may or may not have it correct but it got rid of the mysqli error These errors are after I created the table in mysql manually.
I tested mysql with a simple php code and my user was able to write to it stand alone and create a table

I TESTED MYsql with this code

Code: Select all

<?php 

error_reporting(E_ALL);
ini_set('display_errors', 1);


$DB_HOST = 'localhost'; // Replace
$DB_USER = 'username'; // with
$DB_PASS = 'password'; // your
$DB_NAME = 'yur db'; // own


$db = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME);
if($db->connect_errno > 0) {
  die('Connection failed [' . $db->connect_error . ']');
}

$sql = "CREATE TABLE mt_mods
(id int(11) NOT NULL AUTO_INCREMENT,
 `NAMESPACE` varchar(80) NOT NULL,
  		    `VERSION` varchar(10) NOT NULL,
  		    `STATUS` int(6) NOT NULL,
  		    `DATE` date NOT NULL,
  	 	    PRIMARY KEY (`ID`),
  	 	    UNIQUE KEY `ID` (`ID`)
	  	    ) ENGINE  =  MyISAM  DEFAULT CHARSET  = utf8 COLLATE  = utf8_unicode_ci;");



$result = mysqli_query($db,$sql);

    if(!$result) {
        die('There was an error running the query [' . $db->error . ']');
    }

    else {

        echo "Successful query.";

    }

?>
ERRORS IN ultimateMod_1.1

IN modSetupUnofficial.php

Code: Select all

// check if table exixts...
    $result = mysqli_query($con,"SHOW COLUMNS FROM `mt_mods`");
    if (mysqli_errno($con))
        {
	    // create table
	    mysqli_query($con,
		    "CREATE  TABLE  `$dbName`.`mt_mods` (
  		    `ID` int(11) NOT NULL AUTO_INCREMENT,
  		    `NAMESPACE` varchar(80) NOT NULL,
  		    `VERSION` varchar(10) NOT NULL,
  		    `STATUS` int(6) NOT NULL,
  		    `DATE` date NOT NULL,
  	 	    PRIMARY KEY (`ID`),
  	 	    UNIQUE KEY `ID` (`ID`)
	  	    ) ENGINE  =  MyISAM  DEFAULT CHARSET  = utf8 COLLATE  = utf8_unicode_ci;");
IN pluginsetupunofficial.php
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/hurricanepub/template/admin/pluginSetupUnofficial.php:56 Stack trace: #0 {main} thrown in /var/www/hurricanepub/template/admin/pluginSetupUnofficial.php on line 56

IN modSetupUnofficial.php
Warning: Undefined array key "HTTP_X_FORWARDED_FOR" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 116

Warning: Undefined array key "HTTP_CLIENT_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 117

Warning: Undefined array key "HTTP_CF_CONNECTING_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 118

Fatal error: Uncaught mysqli_sql_exception: Unknown column 'NAMESPACE' in 'order clause' in /var/www/hurricanepub/template/admin/modSetupUnofficial.php:51 Stack trace: #0 /var/www/hurricanepub/template/admin/modSetupUnofficial.php(51): mysqli_query() #1 {main} thrown in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 51

IN blockSetupUnofficial.php
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/hurricanepub/template/admin/blockSetupUnofficial.php:63 Stack trace: #0 {main} thrown in /var/www/hurricanepub/template/admin/blockSetupUnofficial.php on line 63
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: The ultimate mod

Post by davidefa » Wed Dec 21, 2022 10:14 pm

Ok, need to verify the problem...
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Wed Dec 21, 2022 10:41 pm

Thanks David
It worked when i was in windows with PHP 8.1.11 but I think mysql was 5.7
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Thu Dec 22, 2022 12:51 am

I think I got part figured out, got it tested in blockSetupUnofficial.php and pluginSetupUnofficial.php

IN blockSetupUnofficial.php
line 63
for($i=0;$i<count($blocksAvailable);$i++)
change to
for($i=0;$i<count((array)$blocksAvailable);$i++)

IN pluginSetupUnofficial.php
line 56
for($i=0;$i<count($pluginsAvailable);$i++)
Change to
for($i=0;$i<count((array)$pluginsAvailable);$i++)

The above cleared the fatal error in those to files



still have the issue with modSetupUnofficial.php and there are multiple warnings

Warning: Undefined array key "HTTP_X_FORWARDED_FOR" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 116

Warning: Undefined array key "HTTP_CLIENT_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 117

Warning: Undefined array key "HTTP_CF_CONNECTING_IP" in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 118

Fatal error: Uncaught mysqli_sql_exception: Table 'hurricanepub.mt_mods' doesn't exist in /var/www/hurricanepub/template/admin/modSetupUnofficial.php:34 Stack trace: #0 /var/www/hurricanepub/template/admin/modSetupUnofficial.php(34): mysqli_query() #1 {main} thrown in /var/www/hurricanepub/template/admin/modSetupUnofficial.php on line 34
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Thu Dec 22, 2022 4:28 pm

Ok here is the issue Dave, the above fix also needs done in modSetupUnofficial.php which I have done.
The Mysql error above is because create database in modSetupUnofficial.php is not creating it in MYsql 8.0.31. I do not understand that as testing the connection in main setup and creating one with that script I have a couple of posts up will create a table .
Meteotemplate is able to write data to the Mysql database as my station data update's
It may be that it cant create as I imported my tables from a backup. I have tryed using root as update with no change in behavior
I dont know how to create the needed table manually or I would try it.
For now to get past the fatal mysql error I created a table MT_MODS and 3 colums in it, just to get past the error
of course https://hurricanepub.com/template/admin ... ficial.php has no mods listed in it

Would really appreciate some help here
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Mon Dec 26, 2022 5:47 pm

I Made some progress on this mod to make it work on PHP 8.1.XX

This change takes away the Fatal error: Uncaught mysqli_sql_exception:
and allows it to create the Database in MYSQL
In
modSetupUnofficial.php
Line 19 and 20 add above "session_start();"

Code: Select all

    $driver = new mysqli_driver();
    $driver -> report_mode = MYSQLI_REPORT_OFF;
This is for PHP 8.1.xx

This mod does allow some of it to work you can go into regular block, and Plugins
select and see & download all of them
It still does not populate the columns in the mt_mods in MYSql
so nothing is showing in CP / Unofficial Plugins or Unofficial Blocks but no errors.
Still working on it if anyone wants to help that knows more then me
which does not take much It would be great...
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: The ultimate mod

Post by andyk1 » Tue Dec 27, 2022 5:17 am

spd2612 wrote: Mon Dec 19, 2022 6:00 am Thanks Andy but I am not going to back down my php to many other things can go wrong besides when it was on windows I was running php 8.1.11 and it worked
Is it suppose to create a new table in mysql ?
As far as I know... when you add a new sensor it should ask you in https://www.XXX.com/admin/index.php which is your Extra Sensors section of Database to save it or just display without saving in your Db.
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Tue Dec 27, 2022 1:09 pm

Andy the ultimate mod seems to be working for me after my last update with the exception of the unofficial section I think the problem there might be that I am not connecting to Davids repository
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Tue Dec 27, 2022 3:17 pm

@davidefa

Ok I am guessing this is why nothing is showing in Latest Unofficial version
But the error dosent appear to be anything I can fix looks like it would be a @davidefa fix

This is what I see as the repository
http://realrunning.netsons.org/template ... p?type=mod

http://realrunning.netsons.org/template ... php?errors

And it gives this error

Fatal error: Uncaught ValueError: mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L" in /home/gepnuiib/public_html/template/scripts/functions.php:28 Stack trace: #0 /home/gepnuiib/public_html/template/scripts/functions.php(28): mb_http_input('UTF-8') #1 /home/gepnuiib/public_html/template/plugins/repository/web/blocks.php(26): include('/home/gepnuiib/...') #2 {main} thrown in /home/gepnuiib/public_html/template/scripts/functions.php on line 28
Last edited by spd2612 on Fri Jan 06, 2023 2:49 pm, edited 1 time in total.
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: The ultimate mod

Post by andyk1 » Wed Dec 28, 2022 8:14 pm

Yeah I'm seeing the same. I am guessing wherever his repository was kept is off line.
Image

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Thu Dec 29, 2022 5:07 am

Yes here is what I end up with now I think I have the code cleaned up to run php 8.1.13
8.1 did have allot of changes
It now cretes the table and colums and no errors I think it just cant reach the repository
latest dosent populate

Image
Attachments
unofficialplugins.png
unofficialplugins.png (94.76 KiB) Viewed 1890 times
unofficialmods.png
unofficialmods.png (39.29 KiB) Viewed 1890 times
blocksetupunofficial.png
blocksetupunofficial.png (71.09 KiB) Viewed 1890 times
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Fri Jan 06, 2023 2:48 pm

@ davidefa

Dave Anybody
Can I have the files to make my own repository
No one is on these forums anymore
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

spd2612
Forecaster
Forecaster
Posts: 165
Joined: Thu Jan 23, 2020 4:00 pm
Location: Fort Myers
Station model: WS-5000/GW1100
Software: ECOWITT Plugin
Contact:

Re: The ultimate mod

Post by spd2612 » Sat Jan 14, 2023 4:46 pm

Not sure why but this did start working
Seems all good now
@davidefa If you need any testing done I would be happy to help
Image

Ambient Weather WS-5000
Ultrasonic Anemometer
Thermo-Hygrometer Sensor WH31E
Soil Moisture Sensor WH31SM
Lightning Detection WH31L

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: The ultimate mod

Post by davidefa » Sun Feb 05, 2023 2:00 pm

Sorry for not being present on the forum lately.
- I had a crash on the repository server ( did not solve it too fast ), this was the cause for the mod not showing any update available
- noticed too that the code that checks the presence of a table fails in php 8.x, the solution is the one you proposed ( setting report_mode = MYSQLI_REPORT_OFF ), maybe this should be made 'sitewide', bud did not check it.
- the fatal error on scripts/functions.php line 28 is removed by commenting the line ( was not functional even in php < 8.0 )
- regarding the repository plugin, I never finished it, never created the page to add/remove/edit blocks/plugins/mods, it has to be done via phpmyadmin ( you have also to create the mt_blocks table via the attached sql )
Attachments
repository_0.1_mt_blocks.sql.zip
(12.91 KiB) Downloaded 29 times
Image

Post Reply