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

PID_USE_LOCAL_SENSOR does not work with AM2301 #10

Open
colinl opened this issue Jan 16, 2019 · 5 comments
Open

PID_USE_LOCAL_SENSOR does not work with AM2301 #10

colinl opened this issue Jan 16, 2019 · 5 comments

Comments

@colinl
Copy link
Owner

colinl commented Jan 16, 2019

With PID_USE_LOCAL_SENSOR for pid loop if the sensor is an AM2301 it does not pick up the sensor value.
In xdrv_92_pid.ino PID_Show_Sensor it explicitly looks for "DS18B20" in the json string. If the sensor is an AM2301 then this is "AM2301" instead.

@colinl
Copy link
Owner Author

colinl commented Jan 16, 2019

A probable workaround is to change line 185 from

const char* value = data_json["DS18B20"]["Temperature"];

to

const char* value = data_json["AM2301"]["Temperature"];

@petersendk
Copy link

Hi, im newbe and try to implement the ads 1115 analog value for A0 for the pid. i tried "ads1115" for local sensor and this did not work.
I need little help in the lines 179 "PID_Show_Sensor: mqtt_data: %s", mqtt_data)" and line 185 "data_json["ADS1115"]["Temperature"];"
console showes this when running the pid loop:
PID_Show_Sensor: mqtt_data: {"Time":"2019-01-19T00:24:35","ADS1115":{"A0":3304,"A1":17630,"A2":3303,"A3":3294}}
thks in advance

@colinl
Copy link
Owner Author

colinl commented Jan 19, 2019

@petersendk could you start a new issue for this please

@petersendk
Copy link

i did find out this morning, i use ADS1115 for sensor and A0 instead of temperature and your workaround works fine the pid is working. ( sorry for not making new issue i will next time thks )

@colinl
Copy link
Owner Author

colinl commented Jan 19, 2019

@petersendk glad you got it working.

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

No branches or pull requests

2 participants