Hi, I have been able to get this to work in the past and now its not working.
I get this error message when I try to verify the feed
"Error fetching feed:
Wrong mime-type. Need application/xml, text/csv, or variants."
I have change the first line on the php file from text/xml to application/xml but I am still having the same problem
<?php header("content-type: application/xml; charset=utf-8"); ?>
<?php
$contents = file_get_contents("http://the_url");...
DATA: (modified from http://the_url")
<eeml xmlns='http://www.eeml.org/xsd/005' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd'>
<environment>
<data id='0'>
<tag>Temperature</tag>
<value minValue='-20' maxValue='40'>1</value>
<unit symbol='C' type='derivedSI'>Celsius</unit>
</data>
<data id='1'>
<tag>Wind Speed</tag>
<value minValue='0' maxValue='100'>3</value>
<unit symbol='mph' type='derivedSI'>MPH</unit>
</data>
<data id='2'>
<tag>Humidity</tag>
<value minValue='0' maxValue='100'>82</value>
<unit symbol='%' type='derivedSI'>%</unit>
</data>
<data id='3'>
<tag>Pressure</tag>
<value minValue='0' maxValue='2000'></value>
<unit symbol='mB' type='derivedSI'>mB</unit>
</data>
<data id='4'>
<tag>Wind Direction</tag>
<value minValue='0' maxValue='360'>0</value>
<unit symbol='' type='derivedSI'></unit>
</data>
</environment>
</eeml>




Re: Error fetching feed: Wrong mime-type. Need ...
This appears to be related to the issue posted here - we're still looking into it and hope to have a solution shortly.
Re: Error fetching feed: Wrong mime-type. Need ...
Hi there,
this was a problem at our end, which should have been resolved now. Perhaps you can try creating your feed again, and verify that it is able to retrieve the feed as intended.
Apologies for any inconvenience.
Sam
Pachube Support
Re: Error fetching feed: Wrong mime-type. Need ...
Hi, the old one is online now, the new feed should update within 15 mins
Cheers
Re: Error fetching feed: Wrong mime-type. Need ...
I'm having this problem also. It's been quite a while since the last posting and surely this has been fixed. Does automatic mode actually work? I've seen mentions of several people trying and then giving up and going to manual mode.
Re: Error fetching feed: Wrong mime-type. Need ...
Automatic mode definitely works, and as far as we know the content-type issue is no longer a problem - please send an email to support at pachube dot com and let us know (a) the URL you are trying to add as an automatic feed; and (b) the error you are getting when you do so.
Re: Error fetching feed: Wrong mime-type. Need ...
Thank you, I sent the mail a minute ago, the error is exactly the one at the start of this thread. I included every thing I thought you might need to help me solve this problem.
Re: Error fetching feed: Wrong mime-type. Need ...
Got it! the user calebengineering has a post that relates directly to this problem. Arduino + wishield+pachube
After making the source changes he pointed out it started working. Thanks
Re: Error fetching feed: Wrong mime-type. Need ...
Glad to hear you figured out the solution -- can you please post it here, or post a link to it here so that others can benefit.
(Incidentally, if you sent a message to support, it was not received, so please make sure you have the correct info, check here: http://www.pachube.com/contact )
Re: Error fetching feed: Wrong mime-type. Need ...
It's odd that you didn't get the message I sent. I used your support page and checked the box that sent a copy to me. I got the copy and you didn't get the message. Odd, maybe there's something wrong with the support page?
At any rate, I used the information at: http://community.pachube.com/node/410#comment-1068 to change the Wishield source in a couple of places and I was able to get pachube to grab the data. However, it is unreliable and that could be a problem with the network connection or something somewhere along the path. Still trying out ideas though. This latest problem is not relevant to this thread so I won't go into detail and hijack the thread.
Re: Error fetching feed: Wrong mime-type. Need ...
Could you point me to the 'support page' that you used, i.e. give me the link? We don't actually have a support page (hence the email address and link to our contact page in the 2nd message above) so I'd like to make sure there aren't other messages going astray. Thanks.
Re: Error fetching feed: Wrong mime-type. Need ...
Ah, I think I see what you did - you used the community site 'contact' link for the support account - found your email hidden by a spam filter.
There are a few things wrong with what you were sending:
WiServer.println("<html>"); WiServer.println("<meta http-equiv=\"Content-Type\" Content=\"application/xml\" />"); WiServer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); WiServer.println("<eeml>\n<environment>"); WiServer.print("<data id=\"0\">\n<value>"); WiServer.print(realPower); WiServer.println("</value>\n</data>"); WiServer.print("<data id=\"1\">\n<value>"); WiServer.print(Vrms); WiServer.println("</value>\n</data>"); WiServer.print("<data id=\"2\">\n<value>"); WiServer.print(Irms); WiServer.println("</value>\n</data>"); WiServer.print("<data id=\"3\">\n<value>"); WiServer.print(freq); WiServer.println("</value>\n</data>"); WiServer.println("</environment>\n</eeml>"); WiServer.println("</html>");First, the XML should not be wrapped in 'html' -- it's not an HTML page, it's just XML. Second the EEML element correctly needs more attributes as defined in the XSD. See here for the bare minimum info you need: http://www.eeml.org/xml/005/minimal.xml
Hope that helps, though it sounds like you've got there by now.
Re: Error fetching feed: Wrong mime-type. Need ...
Thank you for going to the trouble of chasing down the mail. I sent it to
using the page at http://community.pachube.com/contact
I just clicked on the 'contact us' button on this page up at the top of this page.
I realized what I was doing wrong and fixed it and Pachube started picking up the data. However, it was hit and miss both from some network problem somewhere and the server you folks had go nuts earlier this week so I changed the Arduino to just give back the data a a single simple line, "A, B, C, etc" so I could grab it with a laptop and forward it really simply using a basic batch script running in a dos window. I didn't want to download python, process, visual basic or any one of a couple of dozen possible things to just grab and forward data so curl and a batch file worked really well. Plus, I can interrogate the Arduino directly and see what is happening with it at any given time. I can also grab the data anytime I want to from anywhere that way.
Now it's time to start the next phase of the project......whatever that turns out to be.