Giter Site home page Giter Site logo

Comments (26)

sommo avatar sommo commented on June 12, 2024

all installed via pyhton3 after getting issue with python2.. and mosquitto not already installed.

from infopanel.

sommo avatar sommo commented on June 12, 2024

mosquitto need to be installed into the rpi that execute infopanel right? cause it could accept topic and update via pyhton the info on rgb matrix led, am i right?

from infopanel.

partofthething avatar partofthething commented on June 12, 2024

This line in your error

rgbmatrix/core.cpp:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"

implies to me that you might try installing this lib first and then rerunning the install command

sudo apt install python3-dev

Let me know if it works and I'll update the docs.

from infopanel.

partofthething avatar partofthething commented on June 12, 2024

mosquitto need to be installed into the rpi that execute infopanel right? cause it could accept topic and update via pyhton the info on rgb matrix led, am i right?

To use Mosquitto you need a MQTT server somewhere that you can connect to. You do not need to manually install any mosquitto client libraries on the machine running infopanel because infopanel will install the python paho-mqtt client during its own installation.

from infopanel.

sommo avatar sommo commented on June 12, 2024

I will try it all asap and let you know, thank you! Have a nice Sunday!

from infopanel.

sommo avatar sommo commented on June 12, 2024

was that, "sudo apt install python3-dev" thank you.
i started the infopanel, in yaml i had to remove some comment, cause it failed:

KeyError: 'led-pwm-lsb-nanoseconds',
KeyError: 'led-chain'
and others.. seems it needs to be declared.

from infopanel.

sommo avatar sommo commented on June 12, 2024

for the mqtt part, i configured its yaml to connect to my mqtt (in lan), and i test some message to it and seems to works.
is there a dictionary for all the type of message and setting that could be published to it?
another question, the display has to show data, basicaly there's no need to having animation, what could be the setup to have a cleane dashboard to show data? anyway giraffes make me smile a lot :D

from infopanel.

sommo avatar sommo commented on June 12, 2024

mmmm i'm wrong, i don't understand the logic to set infopanel via mqtt, i tried to send:

mosquitto_pub -d -h 192.168.0.127 -t house/screen/scenes -m welcomewelcome

it recieve:
DEBUG:infopanel.mqtt:house/screen/scenes b'welcomewelcome'

from infopanel.

partofthething avatar partofthething commented on June 12, 2024

To just show numbers and no giraffes, just make a scene filled with sprites that are textual. The traffic scene shown on https://partofthething.com/infopanel/ is an example of this that just shows numbers (e.g. https://partofthething.com/infopanel/source/infopanel.html#infopanel.sprites.DynamicFancyText).

Then set the "mode" to the scene name directly, or set it to an actual mode name that you define that controls that scene. Should be like:

mosquitto_pub -d -h 192.168.0.127 -t house/screen/mode -m welcomewelcome

The display hierarchy is that Sprites make up Scenes, which make up Modes.

from infopanel.

sommo avatar sommo commented on June 12, 2024

ok, so basically i have to:
-configure into yaml file, all the "scene" i need
-via mqtt i can change the mode by calling the scene name

via mqtt i could only change the mode, right?
but how can adjust value into traffic scene?

from infopanel.

sommo avatar sommo commented on June 12, 2024

is there a tree for the mqtt controlling topic to point to? or the purpouse of (e.g. https://partofthething.com/infopanel/source/infopanel.html#infopanel.sprites.DynamicFancyText) is that? cause i opened the link and i'm a bit confused..

from infopanel.

sommo avatar sommo commented on June 12, 2024

traffic has 3 line for static text and a scrolling string bottom.
how could i change I90, 520, VROOM! and the "OH YEAH!" ?

from infopanel.

sommo avatar sommo commented on June 12, 2024

i closed the issue by mistake, sorry

from infopanel.

sommo avatar sommo commented on June 12, 2024

hope you can re-open it cause i can't

from infopanel.

partofthething avatar partofthething commented on June 12, 2024
  • You can set the mode via the mode command, but also a single scene by name if you use that.
  • Examples for the VROOM, etc. are shown in this test config

I don't think we currently have anything like a data map that you're looking for. Just the control table at the bottom of the main page.

from infopanel.

sommo avatar sommo commented on June 12, 2024

Could you make me and example for changing for example VROOM text?

from infopanel.

sommo avatar sommo commented on June 12, 2024

What I don't now is the topic I need to pub via mqtt, my mind let me think so:

mosquitto_pub -d -h 192.168.0.127 -t house/screen/vehicle/text -m test

but is not correct... i don't understand the logic between mqtt topic to the yaml file

from infopanel.

sommo avatar sommo commented on June 12, 2024

thank you for your patience! and for my poor english too

from infopanel.

sommo avatar sommo commented on June 12, 2024

and also what are the equivalente mqtt pub command for changing current temperature and I90 and so on... thank you thank you

from infopanel.

sommo avatar sommo commented on June 12, 2024

of course if i can make a paypal donation, i'm really glad to do it for the project and the patience :)

from infopanel.

partofthething avatar partofthething commented on June 12, 2024

You're helping me identify weaknesses in the documentation so thank you!

If you just want a text item that will update when you publish to MQTT, you want to use a DynamicFancyText sprite and add a data_source config item, like this:

  vehicle:
      type: DynamicFancyText
      text: VROOM!
      data_source: vehicle_data
      pallete:
         text:
            - 255
            - 100
            - 255

Now when you publish to the vehicle_data topic, the text of that sprite should change.

from infopanel.

sommo avatar sommo commented on June 12, 2024

If I add data_source field into yaml I get error while launching infopanel cause it doesnt expect this field:

pi@raspberrypi:~/infopanel $ sudo python3 -m infopanel --config test.yaml
INFO:infopanel.driver:Starting InfoPanel.
DEBUG:infopanel.sprites:Build <Duration at 0, 0. dx/dy: (0, 0), size: (64, 32)>
DEBUG:infopanel.sprites:Build <Duration at 0, 0. dx/dy: (0, 0), size: (64, 32)>
DEBUG:infopanel.sprites:Build <Temperature at 0, 0. dx/dy: (0, 0), size: (64, 32 )>
DEBUG:infopanel.sprites:Build <Temperature at 0, 0. dx/dy: (0, 0), size: (64, 32 )>
DEBUG:infopanel.sprites:Build <Temperature at 0, 0. dx/dy: (0, 0), size: (64, 32 )>
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/pi/infopanel/infopanel/main.py", line 5, in
driver.run()
File "/home/pi/infopanel/infopanel/driver.py", line 252, in run
infopanel = driver_factory(disp, datasrc, conf)
File "/home/pi/infopanel/infopanel/driver.py", line 222, in driver_factory
driver.sprites = sprites.sprite_factory(conf["sprites"], data_src, disp)
File "/home/pi/infopanel/infopanel/sprites.py", line 791, in sprite_factory
sprite.apply_config(sprite_conf)
File "/home/pi/infopanel/infopanel/sprites.py", line 353, in apply_config
conf = Sprite.apply_config(self, conf)
File "/home/pi/infopanel/infopanel/sprites.py", line 145, in apply_config
conf = self.CONF(conf)
File "/usr/local/lib/python3.7/dist-packages/voluptuous-0.12.1-py3.7.egg/volup tuous/schema_builder.py", line 272, in call
return self._compiled([], data)
File "/usr/local/lib/python3.7/dist-packages/voluptuous-0.12.1-py3.7.egg/volup tuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.7/dist-packages/voluptuous-0.12.1-py3.7.egg/volup tuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['data_source']

from infopanel.

sommo avatar sommo commented on June 12, 2024

till now i know whis topic:

changing sprites:
house/screen/mode -m xxxxxx (where xxxxxx could be giraffes/traffic etc based on sprites)

changing brightness:
house/screen/brightness -m x (where x is 0-100)

changing value:
i90: house/screen/travel_time_i90 -m x (where x is a value)
520: house/screen/travel_time_520 -m x (where x is a value)

what can't do / dont know:
-changing text value (ex "OH YEAH" or VROOM)
-changing value for temperature (Current). High and Low works based on what the current is and storage it?

from infopanel.

partofthething avatar partofthething commented on June 12, 2024

Sorry for the trouble, I made a mistake above. I meant to say data_label rather than data_source. (Clearly even I need better docs!)

The config options for this kind of sprite do include a legal data_label, as seen here:

class DynamicFancyText(FancyText):  # pylint:disable=too-many-instance-attributes
    """
    FancyText that can have a changing/live data source.
    This has a ``label`` configuration to render something like:
    ``Label: [value]``
    """
    CONF = FancyText.CONF.extend(
        {
            "label": vol.Coerce(str),
            vol.Optional("data_label"): vol.Coerce(str),
            vol.Optional("label_fmt", default="{}:"): str,
            vol.Optional("val_fmt", default="{}"): str,
            vol.Optional("label_color", default="yellow"): str,
            vol.Optional("value_color", default="green"): str,
        }
    )

from infopanel.

partofthething avatar partofthething commented on June 12, 2024

assuming this works now so closing.

from infopanel.

sommo avatar sommo commented on June 12, 2024

from infopanel.

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.