I’d like to post something but Akismet wo’nt let me so if this works now my Content is below…
-
Johnny-Five PIN Takeover and more problems
A Squirrel finds it's nuts under the deepest snow. So where is the bug!?
-
Hey Guys
As i mentioned in an earlier post, i’ve got problems using Johnny-Five and the standard Raspberry Pi GPIOs. Asked to make a now Post about it so here i am.My Problem is, that i’m currently using the standard GPIO PINs of the Raspberry without a special plugin for simple switches. Now i wanted to add my RGB Stripe controler (the stuff on Breadboard 2) and use it with the Johnny-Five RGB function. But as soon as i activate the J5 plugin, all of my switches are blocked or at least not responding at all. And the worst was, as i tried to set a color for the stripe, Pimatic suddenly felt the urge to execute a few rules i made for the switches. So my RF Switch turned off and the PC had no Power anymore. Guess the J5 was doing some stuff with the wrong PINs as i tried to set PWM signals.
So how do i get both working correctly?
Heres my wiring Setup…
I forgot to include the 4 channel Relais Card. It’s connected to PINS 32,34,36,38 and 40 directly on the Raspberry. Sorry for the messy look it’s my first time using this software
My RaspberryPi is version 2B and the Arduino Nano is connected via USB. On the second breadboard is my RGB Setup. Let me know if You need my conf file or something
Another annoying thing since i installed on Rasbian Stretch is my web interface is looking like this:
I can’t delete devices from pages using drag and drop and the pages headers are hidden. Even deleting and re-installing Pimatic wo’nt solve this bad look. It’s not only displayed like this in Firefox. On Mobile devices it looks normal.One last thing. Since i connected the second DHT22 sensor for my bedroom, using 10 meters of Cat7 cable i’ve got a huge error log with errors Like
"error [pimatic-homeduino,HomeduinoDHTSensor]: Error getting attribute value temp_bedroom.temperature: timeout_error"
I found a Thread about this error https://forum.pimatic.org/topic/2392/dht22-extreme-values. Is the problem solved installing the new firmware to the Arduino?A Squirrel finds it's nuts under the deepest snow. So where is the bug!?
-
@khaki93 said in Johnny-Five PIN Takeover and more problems:
Another annoying thing since i installed on Rasbian Stretch is my web interface is looking like this:
I also have a setup on Rasbian Stretch which works flawlessly for me. EDIT: I have tested my setup with Chrome and Firefox on Windows 10 and Safari which works fine for me
Presumably it is a browser issue.
- Which Web Browser and Client are you mainly using to display the frontend?
- Do you you use more than one device to display the frontend? Does it look the same on all devices?
- Maybe you have zoomed the browser display?! Make sure the browser zoom function is set to 100%
- Clean the browser cache
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@khaki93 said in Johnny-Five PIN Takeover and more problems:
Now i wanted to add my RGB Stripe controler (the stuff on Breadboard 2) and use it with the Johnny-Five RGB function. But as soon as i activate the J5 plugin, all of my switches are blocked or at least not responding at all. And the worst was, as i tried to set a color for the stripe, Pimatic suddenly felt the urge to execute a few rules i made for the switches.
Thanks for the detailed setup description. I think all GPIO pins except the one used for RGB should be excluded from use with J5. I’ll post instruction on how this can be done later. Which pins do you you use for RGB?
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig
Thanks for the reply@mwittig said in Johnny-Five PIN Takeover and more problems:
I also have a setup on Rasbian Stretch which works flawlessly for me. EDIT: I have tested my setup with Chrome and Firefox on Windows 10 and Safari which works fine for me
Presumably it is a browser issue.
- Which Web Browser and Client are you mainly using to display the frontend?
- Do you you use more than one device to display the frontend? Does it look the same on all devices?
- Maybe you have zoomed the browser display?! Make sure the browser zoom function is set to 100%
- Clean the browser cache
I’m using the Firefox V56.0.2 64-Bit on Windows 10 and 7. Cache is empty and the Zoom is 100% but it still looks the same. Besides the PC I’m using the frontend on my Smartphone (android with Chrome mobile) where everything looks allright.
@mwittig said in Johnny-Five PIN Takeover and more problems:
Thanks for the detailed setup description. I think all GPIO pins except the one used for RGB should be excluded from use with J5. I’ll post instruction on how this can be done later. Which pins do you you use for RGB?
Would be great Do you include this information in the J5 readme too?
I think this belongs to feature Requests but i want to ask anyways. Would it be possible to include a diy menu using the i2c display and a Rotary encoder? With my configuration the Pi shows when idle the Temperature. If i toggle one of the switches the display shows the Switch action. I want to call every Sensor or switch state through turning the rotary and maybe when pressing it, toggle the highlited device. So i do’nt always have to boot the PC if i want to take a look at the switch states etc. I’d code a plugin myself if i knew how to
Best Regards
A Squirrel finds it's nuts under the deepest snow. So where is the bug!?
-
@mwittig
Merry Christmas everyoneAre there any news about how to exclude the J5 Pins?
Below I’ve got an updated version of my wiring. As you can see, i added the RGB Wiring and IR components. The RGBs are connected to the GPIOs 14,15 and 18 while the IR Receiver uses 23 and the transmitter 24.
Even though everything is wired correctly and the Hardware is working, i can’t get any signal into or out of Pimatic As described HERE i added a button device, set up the required rules and by pressing one of them an Error is displayed: Error: spawn /bin/sh ENOENT. Well i’ll try to make it work and tell you about the progress.The frontend still isn’t displayed correctly but only on the PC i use the most
Happy Holidays and have fun with Pimatic
A Squirrel finds it's nuts under the deepest snow. So where is the bug!?
-
@mwittig
Happy new Year everybody Hope y’all started it wellI’ve just got a small update about what i found on the Johnny Five project Page. There is a possibility to configure which of the Pins shouldn’t be used by J5 but i didn’t figure out a way to create a config file for that Purpose. Simply writing it in the Pimatic config file gives me an Error. Next I’ll try looking through the J5 plugin folder. There i already found a index.js containing something that looks like configuration code for me. Well let’s play around and see what happens
Tiny success
I edited the Index.js file. Now Johnny Five is’nt taking over all of the Pins anymore but my Pinout doesnt work since only GPIO18 Supports PWM. At least I’ve now got a flickering red led which i can dim to whatever Value. Maybe the easiest solution would be to add a I²C PWM ChipAnyways for you how to do it:
To include or exclude Pins in Johnny Five you have to edit this file:
pimatic-app/node_modules/pimatic-johnny-five/node_modules/raspi-io/dist/index.js
There you’ll find a section looking like this: Code
Just change the settings here to the Values you like Heres a Link to the configuration scheme and another Link to the Johnny Five Pinout scheme.
For example to activate 3 Pins: CodeA Squirrel finds it's nuts under the deepest snow. So where is the bug!?
-
@mwittig
Here i am again
After a lot of errors i’ve got a working RGB Led stripe and am able to set every color and brightness i want to. It doesn’t even flicker any more Here is how i did it:I bought a PWM expander Board as shown HERE and connected it with the I²C Pins, that are used by the Display too. In The File mentioned earlier (index.js) i only changed
includePins: includePins,
to:includePins: ['SDA0', 'SCL0'],
so Johnny Five won’t take over my whole Pi again.The Expander Board is connected as Shown in the image below
As you can see, the Display is looped through the PCA9685 board and still works fine with the LCD Plugin. I just had to find out the adress used by the PCA9685. With the commandi2cdetect -y 1
you’ll get a table with all connected I²C devices and as seen in J5 Readme it only could be something between “0x40”-“0x4F”. With the gathered information, i reconfigured the J5 Plugin to look like this:J5 Config
{ "plugin": "johnny-five", "boards": [ { "id": "1", "boardType": "raspi-io" }, { "id": "2", "port": "1", "controller": "PCA9685", "boardType": "expander" }, { "id": "3", "port": "1", "address": "0x40", "controller": "PCA9685", "boardType": "expander" } ], "active": true },
After that, the only thing left was to add devices and rules as @mwittig told me here with the only difference, that the J5led device now uses Board 2 and the Pins 0-2 for the RGB Colors.
A Squirrel finds it's nuts under the deepest snow. So where is the bug!?