Coder Social home page Coder Social logo

Comments (10)

ThomDietrich avatar ThomDietrich commented on May 25, 2024 1

@dingausmwald I've added the commit to show the openHAB items only if asked for via command line argument --gen-openhab. There are some other improvements to the function but since you are not using openHAB yet, they are not worth fetching for you.

from miflora-mqtt-daemon.

ThomDietrich avatar ThomDietrich commented on May 25, 2024

Hey @dingausmwald ๐Ÿ‘‹

The openHAB items generation is just a small function that generates text - no actual interaction with openHAB. The project is perfectly fine to be used with node-red.

The function is currently called unconditionally but I was going to add command line arguments and bind the function to one so a user can have these items generated explicitly.

I'm still riddled by the actual error you are seeing. The function is basically building a big string from existing data. I'd bet the error is linked to your configuration. Are there any non-ASCII characters in your flower names? Which line in this function throws the error? It would be great if you could help track down the error!

Btw. I know that node-red supports import and export of flows. Is there anything the script could generate for node-red to be imported for ease of use?

from miflora-mqtt-daemon.

dingausmwald avatar dingausmwald commented on May 25, 2024

No. Alle 6 Sensors called Sensor1 -6 in the config.ini. Maybe its because i used a class4 32gb sd Card and somewhere something went wrong on installation? Everybody is writing a class 10 card is a must. Had to hack my bluetooth like this https://loads.pickle.me.uk/2017/03/18/bluetooth-on-archlinux-on-the-pi-zero-w/

(seems like bt is not properly workin on the 0W, but havent even tried it the regular way). Im fairly new to this and feeling like hacking myself to heaven somehow, everyday, 24/7, since weeks. But i have progress, thanks to you.

from miflora-mqtt-daemon.

ThomDietrich avatar ThomDietrich commented on May 25, 2024

Okay then there must be another issue. Would be great to know where exactly the exception is raised.

I'll leave the issue open till we found a solution.

In the meantime I've implemented the command line arguments thingy. I'm currently testing and will push it this evening. Stay tuned.

If you are having these many issues, why arch linux? Why not Raspbian (or openhabian if you intend to use openHAB)?

I'd still be interested in the node-red question.

from miflora-mqtt-daemon.

dingausmwald avatar dingausmwald commented on May 25, 2024

Im willing to help
unqouotet the line again, here are the last lines of my log with the error:

[2017-08-27 17:36:36] Initial connection to Mi Flora sensor "Sensor6" (C4:7C:8D:65:61:06) successful

[2017-08-27 17:36:36] Announcing Mi Flora devices to MQTT broker for auto-discovery ...

[2017-08-27 17:36:37] Generating openHAB "miflora.items" file ...
Traceback (most recent call last):
File "opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 237, in
flores_to_openhab_items(flores, reporting_mode)
File "opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 88, in flores_to_openhab_items
print('\n'.join(items))
UnicodeEncodeError: 'ascii' codec can't encode character '\xb5' in position 844: ordinal not in range(128)

Arch because i wanted to keep the system lean. Thought less software not needed the faster the system will be (Windows user here). Wrong? Wanted to see how much i can run on the little 0W. Planing an irrigation system with node-red, dashboard, mifloras, sonoff switches, weewx, mosquitto, influxdb and grafana.

Like said, fairly new to all this.

Atm i fetch the mqtt msq with a mqtt node (?) in node-red. With a simple non customizable function node i translate json to javascript and process it (atm i dont even rly know why i translate it to java). There are more input nodes like tcp, udp, http, websocket and so on.. what lets me assume that there is no real need for a better connection to node-red. But im the wrong guy to ask

from miflora-mqtt-daemon.

ThomDietrich avatar ThomDietrich commented on May 25, 2024

can't encode character '\xb5'

http://www.charbase.com/00b5-unicode-micro-sign

Do you have a ยต in your config?

Anyhow, the error shouldn't occur and I'll have another look.

Thought less software not needed the faster the system will

In theory that might be true. However it is hard to configure everything in the best way possible, you might end up with a system hard to maintain and keep up to date with problems every time you want to add a new component. You might be better off using a fitting system for your needs with the right set of tools and settings pre-configured by a big community. Check out raspbian lite (or openhabian, which is raspbian lite with openHAB, mosquitto, node-red, etc. preconfigured).

node-red: okay then. Maybe next time.

from miflora-mqtt-daemon.

ThomDietrich avatar ThomDietrich commented on May 25, 2024

Tested with ยต in the config. Works just fine on my system. My bet would be that your system locale is not set correctly.

from miflora-mqtt-daemon.

ThomDietrich avatar ThomDietrich commented on May 25, 2024

@digausmwald any news? Is this issue resolved?

from miflora-mqtt-daemon.

dingausmwald avatar dingausmwald commented on May 25, 2024

not really, but i haven't tried openHAB or stuff. You shouldnt bother, the problem must have been the arch linux installation made by a newbie (me). Im working with node-red. So far so good, your daemon is running for a good month without problems.

from miflora-mqtt-daemon.

ThomDietrich avatar ThomDietrich commented on May 25, 2024

Happy to hear that! Let me know if anything new comes up ;)

from miflora-mqtt-daemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.