binarybucks / homA

An extensible framework for the smart home
Eclipse Public License 1.0
137 stars 24 forks source link

Negative longitude numbers are turned into "true" #130

Open claudiuo opened 10 years ago

claudiuo commented 10 years ago

Trying to set the longitude value to a negative number (which is the case in the western hemisphere) I discovered that the value is set to true instead of the real value. So this: publish.js -t "/sys/294028-solar/longitude" -p "-111.890810" -r doesn't work. I tried all kinds of combinations until I found this issue: https://github.com/substack/node-optimist/issues/79

Indeed, setting the payload like: publish.js -t "/sys/294028-solar/longitude" --payload=-111.890810 -r seems to work.

It is a bug in optimist so not much you can do, I thought maybe you could mention in the docs for solar and weather this issue.

Thanks for all your work, it is really great!

binarybucks commented 10 years ago

Ah yes, this was reported somewhere else before and as you mentioned a bug in optimist. Alternatively you can also use mosquitto_pub if you've the Mosquitto Python tools installed. Could you submit a pull request with updated docs?

On Wed, Mar 12, 2014 at 7:23 PM, claudiuo notifications@github.com wrote:

Trying to set the longitude value to a negative number (which is the case in the western hemisphere) I discovered that the value is set to true instead of the real value. So this: publish.js -t "/sys/294028-solar/longitude" -p "-111.890810" -r doesn't work. I tried all kinds of combinations until I found this issue: substack/node-optimist#79https://github.com/substack/node-optimist/issues/79

Indeed, setting the payload like: publish.js -t "/sys/294028-solar/longitude" --payload=-111.890810 -r seems to work.

It is a bug in optimist so not much you can do, I thought maybe you could mention in the docs for solar and weather this issue.

Thanks for all your work, it is really great!

— Reply to this email directly or view it on GitHubhttps://github.com/binarybucks/homA/issues/130 .

Mit freundlichen Grüßen / With kind regards Alexander Rust

claudiuo commented 10 years ago

That's what I did, I used mosquitto_pub, and was happy to do it since it was the first time ever using it and loved to learn how to do it.

I will do the docs, thanks a lot for suggesting it. I will have to figure it out though, since I never did a pull request. But it is time to learn this as well, so thank you for pushing me to do this.

On Wed, Mar 12, 2014 at 2:04 PM, Alexander Rust notifications@github.comwrote:

Ah yes, this was reported somewhere else before and as you mentioned a bug in optimist. Alternatively you can also use mosquitto_pub if you've the Mosquitto Python tools installed. Could you submit a pull request with updated docs?

On Wed, Mar 12, 2014 at 7:23 PM, claudiuo notifications@github.com wrote:

Trying to set the longitude value to a negative number (which is the case in the western hemisphere) I discovered that the value is set to true instead of the real value. So this: publish.js -t "/sys/294028-solar/longitude" -p "-111.890810" -r doesn't work. I tried all kinds of combinations until I found this issue: substack/node-optimist#79< https://github.com/substack/node-optimist/issues/79>

Indeed, setting the payload like: publish.js -t "/sys/294028-solar/longitude" --payload=-111.890810 -r seems to work.

It is a bug in optimist so not much you can do, I thought maybe you could mention in the docs for solar and weather this issue.

Thanks for all your work, it is really great!

Reply to this email directly or view it on GitHub< https://github.com/binarybucks/homA/issues/130> .

Mit freundlichen Grüßen / With kind regards Alexander Rust

Reply to this email directly or view it on GitHubhttps://github.com/binarybucks/homA/issues/130#issuecomment-37457228 .

simonvanderveldt commented 9 years ago

Is this still something that needs fixing? As it's also already been added to the docs.

I found this commit from Turfjs/turf-point that was done to address the same issue, maybe it can be of help?