Comments (10)
@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.
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.
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.
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.
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.
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.
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.
@digausmwald any news? Is this issue resolved?
from miflora-mqtt-daemon.
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.
Happy to hear that! Let me know if anything new comes up ;)
from miflora-mqtt-daemon.
Related Issues (20)
- Its possible to change MAC address in MyFlora sensor? HOT 2
- Bluepy error after apt update && upgrade HOT 1
- Daemon connects and collects data but does not publish to openhab HOT 3
- `$ sudo hcitool lescan` - Input/Output error HOT 2
- Anyone with problems? ->Miflora Firmware 3.3.5 HOT 4
- Failed to retrieve data from Mi Flora sensor but `bluetoothctl` detects all data HOT 2
- Light measurement disturbed by flashing LED HOT 1
- Installation fails HOT 8
- Add config option for "expire_after" HOT 2
- running as service in python3.10 HOT 3
- Api changes in miflora break miflora-mqtt-daemon HOT 4
- Brightness value wrong HOT 6
- MQTT Push - Topic not case sensitive HOT 2
- Last Message timestamp HOT 2
- Project dependencies may have API risk issues HOT 1
- Running on ESP32 HOT 1
- Change unit of light sensor from "lux" to "lx" HOT 1
- Support for Flower Care Max sensor?
- one sensor stopped answering, but works in the app HOT 2
- Error: The MAC address "..." seems to be in the wrong format. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miflora-mqtt-daemon.