Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MB Weather34/HomeWeatherStation API breaking changes #67

Open
tji21 opened this issue Jan 27, 2021 · 16 comments
Open

MB Weather34/HomeWeatherStation API breaking changes #67

tji21 opened this issue Jan 27, 2021 · 16 comments

Comments

@tji21
Copy link

tji21 commented Jan 27, 2021

Seems that currentconditionsmetar34davis.php isn't pulling in data correctly not sure if it is related to $weather coding if this repo is supported anymore

@lightmaster
Copy link
Owner

What's your URL? Mine is still pulling data and looks accurate.

@tji21
Copy link
Author

tji21 commented Jan 27, 2021 via email

@lightmaster
Copy link
Owner

Check your MB. In mbridge/MBrealtimeupload, the 123rd value (start counting with 0) is your 60 min average temp as reported by your MB. For yours, its reporting 0.4C, which is 32.7F. So your MB is sending your website data that says that the average temp for the last hour is 32.7F, all the site is doing is just reporting whatever its told by your MB.

@tji21
Copy link
Author

tji21 commented Jan 27, 2021

When I run this command against MB api my avg temp is different... are you sure it is still the 123 position against the MBrealtimeupload.txt file?

http://<MB IP>/cgi-bin/template.cgi?template=[DD].[MM].[YY]+[HH]:[mm][APM]%0D[th0temp-avg60]%BAC&contenttype=text/plain;charset=iso-8859-1

And possible API changed from MB --
https://weather34.com/homeweatherstation/weather34-api.html

@lightmaster lightmaster changed the title currentconditionsmetar34davis.php MB Weather34/HomeWeatherStation API breaking changes Jan 28, 2021
@lightmaster lightmaster reopened this Jan 28, 2021
@lightmaster
Copy link
Owner

It seems that either accidentally or intentionally, the existing values on the API used for this template and it's sister templates have been changed, whereas existing values should never be changed and only new ones added to the end, to prevent situations just like this. I'm trying to get in contact with Boris to figure out what happened and the best way to rectify this, since it creates the horrible situation where users have their site running perfectly fine, and then a power outage occurs and when it turns back on, the MB auto updates and now breaks their site.

Gimme a little and I have a temporary work around for you until it gets a permanent fix.

@lightmaster
Copy link
Owner

lightmaster commented Jan 28, 2021

For the moment while this gets straightened out, in your MB, go to your Services/Events page. At the bottom, create a new HTTP Request with Event Type set to Periodical. Then hit Add Service Event.

Once the page refreshes, you should see a new blank entry at the bottom. Change the time from every 10 minutes to every 10 seconds. Under URL, you'll start it by entering the URL for your website's mbridge folder, in your case https://www.ingoldsby.com/pws/mbridge/, followed by this code:

mb.php?d=[DD]/[MM]/[YYYY] [hh]:[mm]:[ss] [th0temp-act:--] [th0hum-act:--] [th0dew-act:--] [wind0avgwind-act:--] [wind0wind-act:--] [wind0dir-act:--] [rain0rate-act:--] [rain0total-daysum:--] [thb0seapress-act:--] [wind0dir-avg5:--] [wind0wind-act=bft.0:--] m/s C hPa mm [wind0wind-avg5:--] [thb0seapress-val60:--] [rain0total-monthsum:--] [rain0total-yearsum:--] [rain0total-ydaysum:--] [thb0temp-act:--] [thb0hum-act:--] [wind0chill-act:--] [th0temp-val60:--] [th0temp-dmax:--] [th0temp-dmaxtime:--] [th0temp-dmin:--] [th0temp-dmintime:--] [wind0avgwind-dmax:--] [wind0avgwind-dmaxtime:--] [wind0wind-dmax:--] [wind0wind-dmaxtime:--] [thb0seapress-dmax:--] [thb0seapress-dmaxtime:--] [thb0seapress-dmin:--] [thb0seapress-dmintime:--] [mbsystem-swversion:--] [mbsystem-buildnum:--] [wind0wind-max10:--] [mbsystem-platform:--] -- [uv0index-act:--] [rain0total-sum24h] [sol0rad-act:--] [wind0dir-avg10:--] [rain0total-sum60:--] [th0dew-mmax:--] [th0dew-mmaxtime:--] [th0dew-mmin:--] [th0dew-mmintime:--] [th0dew-ydmax:--] [th0dew-ydmaxtime:--] [th0dew-ymax:--] [th0dew-ymaxtime:--] [th0dew-ymin:--] [th0dew-ymintime:--] [uv0index-dmax:--] [th0hum-dmax:--] [th0hum-dmaxtime:--] [th0hum-dmin:--] [th0hum-dmintime:--] [th0dew-dmax:--] [th0dew-dmaxtime:--] [th0dew-dmin:--] [th0dew-dmintime:--] [th0temp-val15:—] [th0hum-val15:—] [th0dew-val15:—] [thb0temp-val15:—] [thb0hum-val15.0:--] [wind0wind-avg15:—] [wind0wind-avg30:—] [lgt0energy-act:--] [lgt0dist-act:--] [lgt0dist-age:--] [lgt0total-daysum.0:--] [lgt0total-monthsum.0:--] [lgt0total-yearsum.0:--] [sol0rad-dmax:--] [mbsystem-uptime:—-] [th0temp-ydmax:--] [th0temp-ydmaxtime:--] [th0temp-ydmin:--] [th0temp-ydmintime:--] [th0temp-mmax:--] [th0temp-mmaxtime:--] [th0temp-mmin:--] [th0temp-mmintime:--] [th0temp-ymax:--] [th0temp-ymaxtime:--] [th0temp-ymin:--] [th0temp-ymintime:--] [wind0wind-ydmax:--] [wind0wind-ydmaxtime:--] [wind0wind-mmax:--] [wind0wind-mmaxtime:--] [wind0wind-ymax:--] [wind0wind-ymaxtime:--] [rain0total-ydmax:--] [rain0total-mmax:--] [rain0total-mmintime:--] [rain0total-ymax:--] [rain0total-ymaxtime:--] [sol0rad-dmax:--] [sol0rad-dmaxtime:--] [sol0rad-ydmax:--] [sol0rad-ydmaxtime:--] [sol0rad-mmax:--] [sol0rad-mmaxtime:--] [sol0rad-ymax:--] [sol0rad-ymaxtime:—] [uv0index-dmaxtime:--] [uv0index-ydmax:--] [uv0index-ydmaxtime:--] [uv0index-mmax:--] [uv0index-mmaxtime:--] [uv0index-ymax:--] [uv0index-ymaxtime:--] [th0dew-ydmin:--] [th0dew-ydmintime:--] [mbsystem-lastgooddata:--] [th0temp-avg60:--] [rain0total-nonzerotime:--] [th0temp-amax:--] [th0temp-amaxtime:--] [th0temp-amin:--] [th0temp-amintime:--] [th0dew-amax:--] [th0dew-amaxtime:--] [th0dew-amin:--] [th0dew-amintime:--] [wind0wind-amax:--] [wind0wind-amaxtime:--] [thb0seapress-ydmax:--] [thb0seapress-ydmaxtime:--] [thb0seapress-ydmin:--] [thb0seapress-ydmintime:--] [thb0seapress-mmax:--] [thb0seapress-mmaxtime:--] [thb0seapress-mmin:--] [thb0seapress-mmintime:--] [thb0seapress-ymax:--] [thb0seapress-ymaxtime:--] [thb0seapress-ymin:--] [thb0seapress-ymintime:--] [thb0seapress-amax:--] [thb0seapress-amaxtime:--] [thb0seapress-amin:--] [thb0seapress-amintime:--] [rain0total-allsum:--] [th0temp-davg:--] [mbsystem-lunarsegment:--] [mbsystem-lunarpercent:--] [mbsystem-daylength:--] [mbsystem-moonrise:--] [mbsystem-moonset:--] [wind0wind-davg:--] [th0hum-mmax:--] [th0hum-mmaxtime:--] [th0hum-mmin:--] [th0hum-mmintime:--] [th0hum-ymax:--] [th0hum-ymaxtime:--] [th0hum-ymin:--] [th0hum-ymintime:--] [th0hum-ydmax:--] [th0hum-ydmaxtime:--] [th0hum-ydmin:--] [th0hum-ydmintime:--] [thb0lowbat-act:--] [th0lowbat-act:--] [rain0total-max@M1] [rain0total-max@Y1] [air0pm-act:--] [th0temp-avg5:--] [thb0seapress-avg5:--] [uv0index-avg5:--] [wind0avgwind-avg5:--] [sol0rad-avg5:--] [th0dew-avg5:--] [rain0rate-avg5:--] [th0hum-avg5:--] [th0temp-yavg:--] [wind0wind-yavg:--] [th0temp-starttime:--] [wind0wind-starttime:--] [thb0seapress-starttime:--] [rain0total-starttime:--] [rain0total-ymintime:--] _[forecast-text:]

So the final result for you will look like this:

https://www.example.com/pws/mbridge/mb.php?d=[DD]/[MM]/[YYYY] [hh]:[mm]:[ss] [th0temp-act:--] [th0hum-act:--] [th0dew-act:--] [wind0avgwind-act:--] [wind0wind-act:--] [wind0dir-act:--] [rain0rate-act:--] [rain0total-daysum:--] [thb0seapress-act:--] [wind0dir-avg5:--] [wind0wind-act=bft.0:--] m/s C hPa mm [wind0wind-avg5:--] [thb0seapress-val60:--] [rain0total-monthsum:--] [rain0total-yearsum:--] [rain0total-ydaysum:--] [thb0temp-act:--] [thb0hum-act:--] [wind0chill-act:--] [th0temp-val60:--] [th0temp-dmax:--] [th0temp-dmaxtime:--] [th0temp-dmin:--] [th0temp-dmintime:--] [wind0avgwind-dmax:--] [wind0avgwind-dmaxtime:--] [wind0wind-dmax:--] [wind0wind-dmaxtime:--] [thb0seapress-dmax:--] [thb0seapress-dmaxtime:--] [thb0seapress-dmin:--] [thb0seapress-dmintime:--] [mbsystem-swversion:--] [mbsystem-buildnum:--] [wind0wind-max10:--] [mbsystem-platform:--] -- [uv0index-act:--] [rain0total-sum24h] [sol0rad-act:--] [wind0dir-avg10:--] [rain0total-sum60:--] [th0dew-mmax:--] [th0dew-mmaxtime:--] [th0dew-mmin:--] [th0dew-mmintime:--] [th0dew-ydmax:--] [th0dew-ydmaxtime:--] [th0dew-ymax:--] [th0dew-ymaxtime:--] [th0dew-ymin:--] [th0dew-ymintime:--] [uv0index-dmax:--] [th0hum-dmax:--] [th0hum-dmaxtime:--] [th0hum-dmin:--] [th0hum-dmintime:--] [th0dew-dmax:--] [th0dew-dmaxtime:--] [th0dew-dmin:--] [th0dew-dmintime:--] [th0temp-val15:—] [th0hum-val15:—] [th0dew-val15:—] [thb0temp-val15:—] [thb0hum-val15.0:--] [wind0wind-avg15:—] [wind0wind-avg30:—] [lgt0energy-act:--] [lgt0dist-act:--] [lgt0dist-age:--] [lgt0total-daysum.0:--] [lgt0total-monthsum.0:--] [lgt0total-yearsum.0:--] [sol0rad-dmax:--] [mbsystem-uptime:—-] [th0temp-ydmax:--] [th0temp-ydmaxtime:--] [th0temp-ydmin:--] [th0temp-ydmintime:--] [th0temp-mmax:--] [th0temp-mmaxtime:--] [th0temp-mmin:--] [th0temp-mmintime:--] [th0temp-ymax:--] [th0temp-ymaxtime:--] [th0temp-ymin:--] [th0temp-ymintime:--] [wind0wind-ydmax:--] [wind0wind-ydmaxtime:--] [wind0wind-mmax:--] [wind0wind-mmaxtime:--] [wind0wind-ymax:--] [wind0wind-ymaxtime:--] [rain0total-ydmax:--] [rain0total-mmax:--] [rain0total-mmintime:--] [rain0total-ymax:--] [rain0total-ymaxtime:--] [sol0rad-dmax:--] [sol0rad-dmaxtime:--] [sol0rad-ydmax:--] [sol0rad-ydmaxtime:--] [sol0rad-mmax:--] [sol0rad-mmaxtime:--] [sol0rad-ymax:--] [sol0rad-ymaxtime:—] [uv0index-dmaxtime:--] [uv0index-ydmax:--] [uv0index-ydmaxtime:--] [uv0index-mmax:--] [uv0index-mmaxtime:--] [uv0index-ymax:--] [uv0index-ymaxtime:--] [th0dew-ydmin:--] [th0dew-ydmintime:--] [mbsystem-lastgooddata:--] [th0temp-avg60:--] [rain0total-nonzerotime:--] [th0temp-amax:--] [th0temp-amaxtime:--] [th0temp-amin:--] [th0temp-amintime:--] [th0dew-amax:--] [th0dew-amaxtime:--] [th0dew-amin:--] [th0dew-amintime:--] [wind0wind-amax:--] [wind0wind-amaxtime:--] [thb0seapress-ydmax:--] [thb0seapress-ydmaxtime:--] [thb0seapress-ydmin:--] [thb0seapress-ydmintime:--] [thb0seapress-mmax:--] [thb0seapress-mmaxtime:--] [thb0seapress-mmin:--] [thb0seapress-mmintime:--] [thb0seapress-ymax:--] [thb0seapress-ymaxtime:--] [thb0seapress-ymin:--] [thb0seapress-ymintime:--] [thb0seapress-amax:--] [thb0seapress-amaxtime:--] [thb0seapress-amin:--] [thb0seapress-amintime:--] [rain0total-allsum:--] [th0temp-davg:--] [mbsystem-lunarsegment:--] [mbsystem-lunarpercent:--] [mbsystem-daylength:--] [mbsystem-moonrise:--] [mbsystem-moonset:--] [wind0wind-davg:--] [th0hum-mmax:--] [th0hum-mmaxtime:--] [th0hum-mmin:--] [th0hum-mmintime:--] [th0hum-ymax:--] [th0hum-ymaxtime:--] [th0hum-ymin:--] [th0hum-ymintime:--] [th0hum-ydmax:--] [th0hum-ydmaxtime:--] [th0hum-ydmin:--] [th0hum-ydmintime:--] [thb0lowbat-act:--] [th0lowbat-act:--] [rain0total-max@M1] [rain0total-max@Y1] [air0pm-act:--] [th0temp-avg5:--] [thb0seapress-avg5:--] [uv0index-avg5:--] [wind0avgwind-avg5:--] [sol0rad-avg5:--] [th0dew-avg5:--] [rain0rate-avg5:--] [th0hum-avg5:--] [th0temp-yavg:--] [wind0wind-yavg:--] [th0temp-starttime:--] [wind0wind-starttime:--] [thb0seapress-starttime:--] [rain0total-starttime:--] [rain0total-ymintime:--] _[forecast-text:]

Once you have all that in the URL text box, click Save at the bottom and wait for the page to refresh again. Now go to Weather Nets and find your Home Weather Station - Weather34 entry and change the Upload Interval to no upload, then scroll down and hit Save.

If you look back at your website, you should see it updating every 10 seconds with all the numbers looking right again.

@tji21
Copy link
Author

tji21 commented Jan 28, 2021 via email

@lightmaster
Copy link
Owner

There are a lot of issues with breaking backwards compatibility without any warning (as you've found out), so I'm gonna try to get Boris to restore backwards compatibility. If you're using both sites, then you can upload both versions simultaneously, just to 2 different directories. Just don't turn off the Weather Nets part, and in the Services tab, change the URL to point to the other directory. Something like Weather Nets points to example.com/pws2/mbridge and Services tab points to example.com/pws/mbridge.

@tji21
Copy link
Author

tji21 commented Jan 28, 2021

Thanks put in temp fix and API issue is resolved.. !

  • I duplicated the mbridge directory that is being shared and created a second one called mbridge_test
  • Setup an http event to run every 10 minutes to the test directory using your code https://www.ingoldsby.com/pws/mbridge_test/mb.php?d=[DD]/[MM]/[YYYY] [hh]:[mm]:[ss] [th0temp-act:--] [th0hum-act:--] [th0dew-act:--] [wind0avgwind-act:--] [wind0wind-act:--] [wind0dir-act:--] [rain0rate-act:--] [rain0total-daysum:--] [thb0seapress-act:--] [wind0dir-avg5:--] [wind0wind-act=bft.0:--] m/s C hPa mm [wind0wind-avg5:--] [thb0seapress-val60:--] [rain0total-monthsum:--] [rain0total-yearsum:--] [rain0total-ydaysum:--] [thb0temp-act:--] [thb0hum-act:--] [wind0chill-act:--] [th0temp-val60:--] [th0temp-dmax:--] [th0temp-dmaxtime:--] [th0temp-dmin:--] [th0temp-dmintime:--] [wind0avgwind-dmax:--] [wind0avgwind-dmaxtime:--] [wind0wind-dmax:--] [wind0wind-dmaxtime:--] [thb0seapress-dmax:--] [thb0seapress-dmaxtime:--] [thb0seapress-dmin:--] [thb0seapress-dmintime:--] [mbsystem-swversion:--] [mbsystem-buildnum:--] [wind0wind-max10:--] [mbsystem-platform:--] -- [uv0index-act:--] [rain0total-sum24h] [sol0rad-act:--] [wind0dir-avg10:--] [rain0total-sum60:--] [th0dew-mmax:--] [th0dew-mmaxtime:--] [th0dew-mmin:--] [th0dew-mmintime:--] [th0dew-ydmax:--] [th0dew-ydmaxtime:--] [th0dew-ymax:--] [th0dew-ymaxtime:--] [th0dew-ymin:--] [th0dew-ymintime:--] [uv0index-dmax:--] [th0hum-dmax:--] [th0hum-dmaxtime:--] [th0hum-dmin:--] [th0hum-dmintime:--] [th0dew-dmax:--] [th0dew-dmaxtime:--] [th0dew-dmin:--] [th0dew-dmintime:--] [th0temp-val15:—] [th0hum-val15:—] [th0dew-val15:—] [thb0temp-val15:—] [thb0hum-val15.0:--] [wind0wind-avg15:—] [wind0wind-avg30:—] [lgt0energy-act:--] [lgt0dist-act:--] [lgt0dist-age:--] [lgt0total-daysum.0:--] [lgt0total-monthsum.0:--] [lgt0total-yearsum.0:--] [sol0rad-dmax:--] [mbsystem-uptime:—-] [th0temp-ydmax:--] [th0temp-ydmaxtime:--] [th0temp-ydmin:--] [th0temp-ydmintime:--] [th0temp-mmax:--] [th0temp-mmaxtime:--] [th0temp-mmin:--] [th0temp-mmintime:--] [th0temp-ymax:--] [th0temp-ymaxtime:--] [th0temp-ymin:--] [th0temp-ymintime:--] [wind0wind-ydmax:--] [wind0wind-ydmaxtime:--] [wind0wind-mmax:--] [wind0wind-mmaxtime:--] [wind0wind-ymax:--] [wind0wind-ymaxtime:--] [rain0total-ydmax:--] [rain0total-mmax:--] [rain0total-mmintime:--] [rain0total-ymax:--] [rain0total-ymaxtime:--] [sol0rad-dmax:--] [sol0rad-dmaxtime:--] [sol0rad-ydmax:--] [sol0rad-ydmaxtime:--] [sol0rad-mmax:--] [sol0rad-mmaxtime:--] [sol0rad-ymax:--] [sol0rad-ymaxtime:—] [uv0index-dmaxtime:--] [uv0index-ydmax:--] [uv0index-ydmaxtime:--] [uv0index-mmax:--] [uv0index-mmaxtime:--] [uv0index-ymax:--] [uv0index-ymaxtime:--] [th0dew-ydmin:--] [th0dew-ydmintime:--] [mbsystem-lastgooddata:--] [th0temp-avg60:--] [rain0total-nonzerotime:--] [th0temp-amax:--] [th0temp-amaxtime:--] [th0temp-amin:--] [th0temp-amintime:--] [th0dew-amax:--] [th0dew-amaxtime:--] [th0dew-amin:--] [th0dew-amintime:--] [wind0wind-amax:--] [wind0wind-amaxtime:--] [thb0seapress-ydmax:--] [thb0seapress-ydmaxtime:--] [thb0seapress-ydmin:--] [thb0seapress-ydmintime:--] [thb0seapress-mmax:--] [thb0seapress-mmaxtime:--] [thb0seapress-mmin:--] [thb0seapress-mmintime:--] [thb0seapress-ymax:--] [thb0seapress-ymaxtime:--] [thb0seapress-ymin:--] [thb0seapress-ymintime:--] [thb0seapress-amax:--] [thb0seapress-amaxtime:--] [thb0seapress-amin:--] [thb0seapress-amintime:--] [rain0total-allsum:--] [th0temp-davg:--] [mbsystem-lunarsegment:--] [mbsystem-lunarpercent:--] [mbsystem-daylength:--] [mbsystem-moonrise:--] [mbsystem-moonset:--] [wind0wind-davg:--] [th0hum-mmax:--] [th0hum-mmaxtime:--] [th0hum-mmin:--] [th0hum-mmintime:--] [th0hum-ymax:--] [th0hum-ymaxtime:--] [th0hum-ymin:--] [th0hum-ymintime:--] [th0hum-ydmax:--] [th0hum-ydmaxtime:--] [th0hum-ydmin:--] [th0hum-ydmintime:--] [thb0lowbat-act:--] [th0lowbat-act:--] [rain0total-max@M1] [rain0total-max@Y1] [air0pm-act:--] [th0temp-avg5:--] [thb0seapress-avg5:--] [uv0index-avg5:--] [wind0avgwind-avg5:--] [sol0rad-avg5:--] [th0dew-avg5:--] [rain0rate-avg5:--] [th0hum-avg5:--] [th0temp-yavg:--] [wind0wind-yavg:--] [th0temp-starttime:--] [wind0wind-starttime:--] [thb0seapress-starttime:--] [rain0total-starttime:--] [rain0total-ymintime:--] _[forecast-text:]
  • Updated my settings preferences for the weather site to look in mbridge_test for now
    image

Repository owner deleted a comment from dtrop1 Feb 9, 2021
@lightmaster
Copy link
Owner

@tji21 Boris gave a very generic response that amounted to "not my issue, talk about it on the forum". Guess no one gives a damn about maintaining backwards compatibility in an API, which is a critical functionality in an API since you have no idea if/when users of it will update to knewer versions.

I'll start working on porting the template over to the new format, since it looks like nothing was actually lost or really gained in the change, just rearranged to screw with other templates that use it.

To anyone else that stumbled upon this with the issue that odd things are showing up in your site's data, see #67 (comment) for the format to create a weather service instead of using the Weather Network for your site. My template will always maintain backwards compatibility wherever possible, so I'll figure out a way for the template to determine if you are using the old or new format and for it adjust the data as it needs to to continue to work correctly. This way, even if you keep using the old format as a Weather Service, you won't lose functionality.

@tji21
Copy link
Author

tji21 commented Feb 9, 2021

@tji21 Boris gave a very generic response that amounted to "not my issue, talk about it on the forum". Guess no one gives a damn about maintaining backwards compatibility in an API, which is a critical functionality in an API since you have no idea if/when users of it will update to knewer versions.

I'll start working on porting the template over to the new format, since it looks like nothing was actually lost or really gained in the change, just rearranged to screw with other templates that use it.

To anyone else that stumbled upon this with the issue that odd things are showing up in your site's data, see #67 (comment) for the format to create a weather service instead of using the Weather Network for your site. My template will always maintain backwards compatibility wherever possible, so I'll figure out a way for the template to determine if you are using the old or new format and for it adjust the data as it needs to to continue to work correctly. This way, even if you keep using the old format as a Weather Service, you won't lose functionality.

Wow thanks for all the leg work to see if Boris could assist but sounds like not so much.... appreciate your updating the template and happy to test things with you and reverse my workaround to validate your solution when you have time.

Thanks again for continuing to support this template

@lightmaster
Copy link
Owner

So with me being locked out of being able to update the API through Boris, and with Brian screwing around with the API to intentionally break backwards compatibility, my options moving forward with using the "official" API are very limited. Considering that he moved some values to new spots and literally left the old spot blank, as well as the fact that there is no real limit to the size of an API, so no reason not to add the new values he wanted to the end, I'm left to conclude that Brian made these changes for the sole purpose of blocking this version of the template, even though this "version" is the original template. He has removed several values that are critical to functionality for us, like knowing the average temp outside.

Ranting about things I can't change aside, I see no way forward for this original MB-HomeWeatherStation template to be able to keep using the API that I have no control over. If I bent over backwards and figured out some way to twist our template to work around his breaking changes, who's to say he won't make it worse tomorrow. Therefore, I think the best and only way forward is to abandon Brian's API, and instead use the Weather Services tab to create our own API that can not be changed or manipulated by anyone except each user individually. This way, no matter what happens outside of your home, you will still have the same values being sent to the same URL you've been using.

Honestly, this feels like a better solution anyways, since you, the User, have full control over the API that Your Website uses, rather than how you currently have ZERO control over it.

I will be updating the Readme for this GitHub Repo to include directions on how to setup your own API through the Weather Services tab.

@lightmaster
Copy link
Owner

Also, I will be leaving this "issue" open for the foreseeable future so that any user that has this problem and comes straight to the issues section to report it, will hopefully see this first and know what to do. #67 (comment) holds the instructions until I get the Readme updated.

@Rob3r7o
Copy link

Rob3r7o commented Feb 17, 2021

sorry, I am also using this template and from a few days I have problems with Pressure Temperature.. values.
(the values write in database php are wrong)
I have edited the mbridge / mb.php file

my new values ​​are:

// check if using new or old API
if (is_numeric ($ meteobridgeapi [176])) {
// new api
$ temp = $ meteobridgeapi [2];
$ barometer = $ meteobridgeapi [10];
$ raintoday = $ meteobridgeapi [9];
$ uv = $ meteobridgeapi [178];
$ windgust = $ meteobridgeapi [40];
$ windspeed = $ meteobridgeapi [5];
$ solar = $ meteobridgeapi [45];
$ dewpoint = $ meteobridgeapi [4];
$ rainrate = $ meteobridgeapi [8];
$ direction = $ meteobridgeapi [11];
} else {
// old API
$ temp = $ meteobridgeapi [2];
$ barometer = $ meteobridgeapi [10];
$ raintoday = $ meteobridgeapi [9];
$ uv = $ meteobridgeapi [43];
$ windgust = $ meteobridgeapi [40];
$ windspeed = $ meteobridgeapi [5];
$ solar = $ meteobridgeapi [45];
$ dewpoint = $ meteobridgeapi [4];
$ rainrate = $ meteobridgeapi [8];
$ direction = $ meteobridgeapi [7];

I did well?
The data looks right now, but I'm not a programmer.

@lightmaster
Copy link
Owner

@Rob3r7o There are values that the template needs to fully function that Brian has removed from the API. While that approach will get part of it working, most of the API processing occurs within the livedata.php file, and it needs values that are not available anymore. Check out #67 (comment) for instructions to create your own API from the MB (its really super simple to do). In the second code box, replace https://example.com/pws with the URL to your site.

If you have any trouble, email me support @ baxleyweather {dot} com the remote access URL to your MB, the password (feel free to make a temporary one and change afterwards), and the URL to your website, and I'll get it setup for you.

@weather34
Copy link
Contributor

weather34 commented Oct 13, 2021

So with me being locked out of being able to update the API through Boris, and with Brian screwing around with the API to intentionally break backwards compatibility, my options moving forward with using the "official" API are very limited.

William this really made me sad , think you could have simply got in touch I could have resolved this for you .

seems trust is hard to find these days amongst developers . sorry for the inconvenience caused but I didn't do anything intentionally and if I had been aware I would have rectified this immediately with a solution .

changes to API were made due to the limitation of how much data can be used in GET request , with advent of Air Quality support and various other second station setups in Meteobridge the only way to support the newer capabilities was to adjust the API and remove some values.
Nothing was done with intention of breaking things and certainly wouldn't have deliberately caused you any inconvenience .

In truth I wasn't even aware this was still in development or widely used I actually you lost interest due to the releases made by Wim Van de Kuil , I simply have tried to carry on .I can only sincerely apologize.

Brian (aka weather34)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants