dehsgr / homebridge-mobilealerts

This is a homebridge plugin for several Mobile-Alerts (Technoline) devices
ISC License
9 stars 1 forks source link

No values inside homekit #3

Closed svobluk closed 6 years ago

svobluk commented 6 years ago

Does anyone have problems to receive data to the homebridge/homekit? Seems since I have installed homebridge and configured mobilealerts plugin, it does not fetch data. Inside homebridge I'm receiving error: Could not get data for sensor XXXXXX. I'm receiving this for all my supported sensor. Is this problem only on my side? or is this known issue?

svobluk commented 6 years ago

SOLVED, it works now.

To all - in case you have same problem as I had, see bellow the root cause.

I had to change german words inside index.js file to the english, I've found this when I was parsing mobile-alerts measurement site!

eg: var MA10200_TEMPERATURE = '.*?<h4>%SERIAL%[\\s\\S]*?.*?Temperatur<\\/h5>[\\s\\S]*?.*?<h4>(.*?) C<\\/h4>'; var MA10200_HUMIDITY = '.*?<h4>%SERIAL%[\\s\\S]*?.*?Luftfeuchtigkeit<\\/h5>[\\s\\S]*?.*?<h4>(.*?)%<\\/h4>';

needs to be changed: var MA10200_TEMPERATURE = '.*?<h4>%SERIAL%[\\s\\S]*?.*?Temperature<\\/h5>[\\s\\S]*?.*?<h4>(.*?) C<\\/h4>'; var MA10200_HUMIDITY = '.*?<h4>%SERIAL%[\\s\\S]*?.*?Humidity<\\/h5>[\\s\\S]*?.*?<h4>(.*?)%<\\/h4>';

dehsgr commented 6 years ago

Yeah, sorry. This is correct. Since MA doesn‘t allow to use their REST-API we‘ve to parse the normal measurements page, which is localized. :-(