-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
MQTT truncated with multiple DS18B20 sensors #114
Comments
maybe you need to increment the MQTT_MAX_PACKET_SIZE |
Change in sonoff.ino line 125 MESSZ to a higher value. You'll then also have to increase MQTT_MAX_PACKET_SIZE. |
Thanks - MESSZ was the problem! And it was sitting right there in the comment!!! |
@ramsaymike, I'm looking to attach DS18B20 Sensors to either the Sonoff Basic or POW and monitor the temperature of my aquarium. How are you physically attaching the DS18B20? |
With respect to the Sonoff Basic the DS18B20 is attached to the same header
that was used to program the unit for power and the data line going to the
unused pin 5 - GPIO14 - on the header. Works great with TASMOTA. I have
tried 4 sensors without any problems - other than increasing MESSZ if you
use MQTT.
…On Mon, Feb 27, 2017 at 6:50 AM, 2delarosa ***@***.***> wrote:
@ramsaymike <https://github.com/ramsaymike>, I'm looking to attach
DS18B20 Sensors to either the Sonoff Basic or POW and monitor the
temperature of my aquarium. How are you physically attaching the DS18B20?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANGcPgSFaaNNXsCwu3CP_fFlUQUAK_Z3ks5rgsaOgaJpZM4MMdEk>
.
|
Thanks. Any need for calibration from the software side? |
I did not do any - I use many of these sensors and for the cost, they are
very good. I sometimes think about creating individual offsets but for my
application (general house stuff) there really is no need.
…On Mon, Feb 27, 2017 at 7:16 AM, 2delarosa ***@***.***> wrote:
Thanks. Any need for calibration from the software side?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANGcPoAhZSER4ZftwR--1QtjvQLpVwsmks5rgsymgaJpZM4MMdEk>
.
|
The DS18x20 is factory calibrated but readings differ about +/- 0.5°C. |
Thanks. I ordered several sensors to try them out. |
4.0.0 20170303 * Add define to remove config migration code for versions below 3.0 (See Wiki-Upgrade-Migration path) * Free memory by switching from String to char[] * Raised Sonoff Led PWM frequency from 200Hz to 432Hz in search of stability (hardware watchdog timeouts) (#122) * Increase message size and suggested minimum MQTT_MAX_PACKET_SIZE to 512 (#114, #124) * Remove runtime warning message regarding MQTT_MAX_PACKET_SIZE too small as it is now moved to compile time (#124) * Fix possible panics with web console and http commands while UDP syslog is active (#127) * Add optional static IP address (#129) * Add define ENERGY_RESOLUTION in user_config.h to allow user control over precision (#136)
Looks OK to me. Make sure you have a pull-up resister (I use 10k) between
data and vcc.
…On Wed, Mar 22, 2017 at 7:38 AM, lkhaskjdhlkashd ***@***.***> wrote:
Thank you very much for this great piece of software!
I'm trying to connect a 18B20 temp sensor to a Sonoff Basic, but i cant
get a reading.
I connected the sensor to pin 1-4-5, the same pins i used for flashing the
sonoff, is this correct?
pin 1 - vcc
pin 4 - gnd
pin 5 - data
the on/off switch works perfect but i cant seem to get any reading from
the sensor.
What do i do wrong?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANGcPh9h5xTMHAay2qe5r9dfQuWfXXEDks5roQhLgaJpZM4MMdEk>
.
|
a pull-up resister should not be needed (it is done internally to the esp, but
it doesn't hurt to try it), are you sure you set the gpio for the right sensor
type in the software?
…On Wed, 22 Mar 2017, ramsaymike wrote:
Looks OK to me. Make sure you have a pull-up resister (I use 10k) between
data and vcc.
On Wed, Mar 22, 2017 at 7:38 AM, lkhaskjdhlkashd ***@***.***>
wrote:
> Thank you very much for this great piece of software!
>
> I'm trying to connect a 18B20 temp sensor to a Sonoff Basic, but i cant
> get a reading.
>
> I connected the sensor to pin 1-4-5, the same pins i used for flashing the
> sonoff, is this correct?
> pin 1 - vcc
> pin 4 - gnd
> pin 5 - data
>
> the on/off switch works perfect but i cant seem to get any reading from
> the sensor.
> What do i do wrong?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#114 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ANGcPh9h5xTMHAay2qe5r9dfQuWfXXEDks5roQhLgaJpZM4MMdEk>
> .
>
|
For some reason mine would not work without it....
On Wed, Mar 22, 2017 at 8:14 AM, David Lang <notifications@github.com>
wrote:
… a pull-up resister should not be needed (it is done internally to the esp,
but
it doesn't hurt to try it), are you sure you set the gpio for the right
sensor
type in the software?
On Wed, 22 Mar 2017, ramsaymike wrote:
> Looks OK to me. Make sure you have a pull-up resister (I use 10k) between
> data and vcc.
>
> On Wed, Mar 22, 2017 at 7:38 AM, lkhaskjdhlkashd <
***@***.***>
> wrote:
>
>> Thank you very much for this great piece of software!
>>
>> I'm trying to connect a 18B20 temp sensor to a Sonoff Basic, but i cant
>> get a reading.
>>
>> I connected the sensor to pin 1-4-5, the same pins i used for flashing
the
>> sonoff, is this correct?
>> pin 1 - vcc
>> pin 4 - gnd
>> pin 5 - data
>>
>> the on/off switch works perfect but i cant seem to get any reading from
>> the sensor.
>> What do i do wrong?
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#114
issuecomment-288373158>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/
ANGcPh9h5xTMHAay2qe5r9dfQuWfXXEDks5roQhLgaJpZM4MMdEk>
>> .
>>
>
>
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANGcPrIcfAgKPfEgE7Lllfcs-XCbUS4jks5roRCvgaJpZM4MMdEk>
.
|
4.0.0 20170303 * Add define to remove config migration code for versions below 3.0 (See Wiki-Upgrade-Migration path) * Free memory by switching from String to char[] * Raised Sonoff Led PWM frequency from 200Hz to 432Hz in search of stability (hardware watchdog timeouts) (arendst#122) * Increase message size and suggested minimum MQTT_MAX_PACKET_SIZE to 512 (arendst#114, arendst#124) * Remove runtime warning message regarding MQTT_MAX_PACKET_SIZE too small as it is now moved to compile time (arendst#124) * Fix possible panics with web console and http commands while UDP syslog is active (arendst#127) * Add optional static IP address (arendst#129) * Add define ENERGY_RESOLUTION in user_config.h to allow user control over precision (arendst#136)
Trying to use multiple DS18B20 sensors with Sonoff Basic It seems that the MQTT message is truncated at 239 characters for some reason - part way through sensor 3 address. This is seen in both the console and Mosquitto. The web interface reports all data (well, up to the 4 I tried anyway) as expected. Any ideas?
The text was updated successfully, but these errors were encountered: